Switch to what I hope is a truly cross-platform endianness check.

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@741 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Richard Newman 19 years ago
parent 23fdab68ca
commit 6f390d6567

@ -40,8 +40,6 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
# include <endian.h> /* attempt to define endianness */
#endif
#include "compat/solaris.h"
/*
* My best guess at if you are big-endian or little-endian. This may
* need adjustment.
@ -49,10 +47,10 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
* code elsewhere in SEMS, which started off using just __BYTE_ORDER. I
* extended it to work on Solaris, too.
*/
#if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN)
#if (defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN))
# define HASH_LITTLE_ENDIAN 1
# define HASH_BIG_ENDIAN 0
#elif (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN)
#elif (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN))
# define HASH_LITTLE_ENDIAN 0
# define HASH_BIG_ENDIAN 1
#else

Loading…
Cancel
Save