X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=endiannessmacros.h;h=581fd6b804eaf932c06b48c83348427de531743a;hp=1e997f57af59e5949551a47070237000dbfd9c8f;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=091640889a47c2fb66b479b3f3262addf3a3fb76 diff --git a/endiannessmacros.h b/endiannessmacros.h index 1e997f5..581fd6b 100644 --- a/endiannessmacros.h +++ b/endiannessmacros.h @@ -27,40 +27,21 @@ * */ -#include -#include - -/*----------------------------------------------------------------------------- - * Detection of endianness. The main part of this is done in autoconf, but - * for the case of MacOS FAT binaries we fall back on auto-sensing based on - * processor type too. - */ - -/* Set by autoconf */ -#define SP_LITTLE_ENDIAN /* Mac FAT binaries or unknown. Auto detect based on CPU type */ #if !defined(SP_BIG_ENDIAN) && !defined(SP_LITTLE_ENDIAN) - + /* * x86 equivalents */ -#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(__i686__) || defined(__i686) -# if defined(SP_BIG_ENDIAN) -# undef SP_BIG_ENDIAN -# endif -# define SP_LITTLE_ENDIAN +#if defined(__i386) || defined(__i386__) || defined(__ia64__) || defined(WIN32) || defined(__arm__) || (defined(__mips__) && defined(__MIPSEL__)) || defined(__SYMBIAN32__) || \ + defined(__x86_64__) || defined(__x86_64) || defined(__i686__) || defined(__i686) || defined(__amd64__) || defined(__amd64) || defined(__LITTLE_ENDIAN__) +#define SP_LITTLE_ENDIAN +#else +#define SP_BIG_ENDIAN #endif -/* - * DEC Alpha - */ -#if defined(__alpha__) || defined(__alpha) -# if defined(SP_LITTLE_ENDIAN) -# undef SP_LITTLE_ENDIAN -# endif -# define SP_BIG_ENDIAN -#endif + /* * SUN Sparc @@ -190,4 +171,5 @@ #define le_int1(x) (x) #endif -#endif \ No newline at end of file +#endif +