X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=endiannessmacros.h;h=581fd6b804eaf932c06b48c83348427de531743a;hp=07981ba51b536a99ce08ba01e755e56cba2c0b8f;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=956cdff34f2d609a7736838b1631cd7957580b8b diff --git a/endiannessmacros.h b/endiannessmacros.h index 07981ba..581fd6b 100644 --- a/endiannessmacros.h +++ b/endiannessmacros.h @@ -9,9 +9,13 @@ * Copyright 2010 Schloss Lab. All rights reserved. * */ - + +/*********************************************************************/ +/*********************************************************************/ +// The following is copied from the staden io_lib-1.12.4 os.h - thanks! /*********************************************************************/ -// The following is copied from the staden io_lib-1.12.4 os.h +/*********************************************************************/ + /* * Author: * MRC Laboratory of Molecular Biology @@ -23,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 @@ -186,4 +171,5 @@ #define le_int1(x) (x) #endif -#endif \ No newline at end of file +#endif +