[krbdev.mit.edu #2564] Use macros to detect endianness whenever possible

Alexandra Ellwood via RT rt-comment at krbdev.mit.edu
Fri May 21 15:08:07 EDT 2004


The krb5 build system should (where it needs to know the endianness of the machine)
prefer the compile-time macros __BIG_ENDIAN__ and __LITTLE_ENDIAN__ or 
BYTE_ORDER (from endian.h) over the autoconf-generated variables if they are available.  
This will make cross-compilation to systems with different endianness possible for 
compilers that provide these variables.

This is needed for Darwin i386 builds.

Note that in the Darwin case, we need to check the compiler variables at compile time and
not in an autoconf test.  With the Apple mach-o compiler, a single gcc invocation can build a
fat object file with code for multiple architectures (ie: "CFLAGS=-arch pcc -arch i386").

This bug exists to track the need for this support in krb5.  The original bug was 2551 which 
was a report of the problem in AES and Berkeley db.


More information about the krb5-bugs mailing list