1 #ifndef __ASXXXX_CONFIG_H
2 #define __ASXXXX_CONFIG_H
5 * find out the endianess of host machine
6 * in order to be able to make Mac OS X unified binaries
8 /* This is tricky since these might be defined with a blank replacement list */
9 /* such as on SPARC Solaris. However, configure gets it right, so it's ok */
10 /* that (_BIG_ENDIAN+0) is false, even though it is defined. */
11 #if (__BIG_ENDIAN__+0) || (_BIG_ENDIAN+0)
12 /* 1) trust the compiler */
13 # define WORDS_BIGENDIAN 1
14 #elif __LITTLE_ENDIAN__
16 #elif (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
17 /* 2) trust the header files */
18 # if BYTE_ORDER == BIG_ENDIAN
19 # define WORDS_BIGENDIAN 1
22 /* 3) trust the configure; this actually doesn't work for unified Mac OS X binaries :-( */
23 # undef BUILD_WORDS_BIGENDIAN
24 # if (defined BUILD_WORDS_BIGENDIAN && BUILD_WORDS_BIGENDIAN)
25 # define WORDS_BIGENDIAN 1
27 /* 4) assume that host is a little endian machine */
37 #if !defined TYPE_WORD && defined _WIN32
38 # define TYPE_BYTE char
39 # define TYPE_WORD short
40 # define TYPE_DWORD int
41 # define TYPE_UBYTE unsigned TYPE_BYTE
42 # define TYPE_UWORD unsigned TYPE_WORD
43 # define TYPE_UDWORD unsigned TYPE_DWORD
46 #endif /* __ASXXXX_CONFIG_H */