Define both big endian and little endian macros.

This commit is contained in:
Rob Landley 2006-03-25 03:01:59 +00:00
parent 0bafd47e84
commit 90ece609e6

View File

@ -85,11 +85,14 @@
#endif #endif
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
#define BB_BIG_ENDIAN 1 #define BB_BIG_ENDIAN 1
#define BB_LITTLE_ENDIAN 0
#elif __BYTE_ORDER == __BIG_ENDIAN #elif __BYTE_ORDER == __BIG_ENDIAN
#define BB_BIG_ENDIAN 1 #define BB_BIG_ENDIAN 1
#define BB_LITTLE_ENDIAN 0
#else #else
#define BB_BIG_ENDIAN 0 #define BB_BIG_ENDIAN 0
#define BB_LITTLE_ENDIAN 1
#endif #endif
/* ---- Networking ------------------------------------------ */ /* ---- Networking ------------------------------------------ */