|
endian.h is part of glibc (in 2.3 and 2.7 that I've checked) and can be found in the /include directory. It typically includes bits/endian.h, which in turn references system dependent files deeper down.
I have modified cpp/include/IceUtil/Config.h to reflect the constants defined in endian.h. This compiles the files - I still have to get all the 3rd party libraries built, so I can't link it yet. But I think this is heading in the right direction.
I'll complete the work & let you know it goes. Are there any documents to help me with cross-compiling Ice? I've a lot of experience at doing it with fairly tricky apps, like Python & ACE, but it always helps if there's some specific documentation.
My cross development environment is GCC-4.2.3, GLIBC-2.7 with NPTL & TLS.
Regards,
Jeff Gray
----------
//
// Endianness
//
// Most CPUs support only one endianness, with the notable exceptions
// of Itanium (IA64) and MIPS.
//
#ifdef __GLIBC__
# include <endian.h>
#endif
#if defined(__i386) || defined(_M_IX86) || defined(__x86_64) || \
defined(_M_X64) || defined(_M_IA64) || defined(__alpha__) || \
(__BYTE_ORDER == __LITTLE_ENDIAN) || defined(__MIPSEL__)
# define ICE_LITTLE_ENDIAN
#elif defined(__sparc) || defined(__sparc__) || defined(__hppa) || \
defined(__ppc__) || defined(__powerpc) || defined(_ARCH_COM) || \
(__BYTE_ORDER == __BIG_ENDIAN) || defined(__MIPSEB__)
# define ICE_BIG_ENDIAN
#else
# error "Unknown architecture"
#endif
-----------------
|