Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sys/arch/powerpc/include/reloc.h has bad enum ...



Hello,

The enum in the file .../reloc.h contains the enum reloc_type that has
more than 32 members.  This becomes a problem when trying to use the
header ..../aout_machdep.h which contains:

       enum reloc_type r_type   :  5;  /* relocation type */

(2 ** 5 == 32).  Some compilers report this as an error.  I've used the
patch below. Perhaphs a more permenant solution is needed.

        enjoy,
                Andrew

*** src/sys/arch/powerpc/include/reloc.h.orig   Fri Dec  6 15:11:21 1996
--- src/sys/arch/powerpc/include/reloc.h        Fri Dec  6 15:11:27 1996
***************
*** 70,77 ****
        RELOC_PLT16_HI,
        RELOC_PLT16_HA,
      /* ABI defines this as 32nd entry, but we ignore this, at least
for now */
!       RELOC_SDAREL,
!       RELOC_MAX
  };
  
  #endif        /* _MACH_RELOC_H_ */
--- 70,81 ----
        RELOC_PLT16_HI,
        RELOC_PLT16_HA,
      /* ABI defines this as 32nd entry, but we ignore this, at least
for now */
! /*    RELOC_SDAREL,
!       RELOC_MAX */
! };
! 
! enum {
!       RELOC_MAX = 33,
  };
  
  #endif        /* _MACH_RELOC_H_ */



Home | Main Index | Thread Index | Old Index