diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:38:28 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:38:28 +0000 |
commit | 367c9cb514c9da766488b9bdb218a18e31cb7624 (patch) | |
tree | f9e343be94161a4837f0f1c1d072a35538ae0f63 /lib/util/wordaccess.h | |
parent | 6e88e3326cb0c7f7975b56189278cab3f84ba1bd (diff) | |
download | netpbm-mirror-367c9cb514c9da766488b9bdb218a18e31cb7624.tar.gz netpbm-mirror-367c9cb514c9da766488b9bdb218a18e31cb7624.tar.xz netpbm-mirror-367c9cb514c9da766488b9bdb218a18e31cb7624.zip |
Promote Stable (10.47) to Super Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@2691 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util/wordaccess.h')
-rw-r--r-- | lib/util/wordaccess.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/lib/util/wordaccess.h b/lib/util/wordaccess.h index 28963aee..2eaa2b24 100644 --- a/lib/util/wordaccess.h +++ b/lib/util/wordaccess.h @@ -36,28 +36,39 @@ work with that. We also assume that a char is 8 bits. + + HAVE_GCC_BITCOUNT and HAVE_GCC_BSWAP are set in pm_config.h + + BITS_PER_LONG is the number of bits in long int. */ -#if (!defined(WORDACCESS_GENERIC) \ - && defined(__GNUC__) && defined(__GLIBC__) \ - && (__GNUC__ * 100 + __GNUC_MINOR__ >= 304) ) - #if BYTE_ORDER==BIG_ENDIAN /* defined by GCC */ +#include "pm_config.h" - #include "wordaccess_gcc3_be.h" +#if (!defined(WORDACCESS_GENERIC) && HAVE_GCC_BITCOUNT ) - #elif defined(__ia64__) || defined(__amd64__) || defined(__x86_64__) - /* all these macros are defined by GCC */ + #if BYTE_ORDER == BIG_ENDIAN /* See pm_config.h */ + /* Sun Sparc 64, etc */ + #include "wordaccess_gcc3_be.h" + #elif (BITS_PER_LONG == 64) + /* AMD Athlon 64, Intel x86_64, Intel Itanium, etc. */ #include "wordaccess_64_le.h" - #else + #elif (BITS_PER_LONG == 32) + /* Intel x86_32 (80386, 80486, Pentium), etc. */ + #include "wordaccess_generic.h" - #include "wordaccess_gcc3_le.h" + #else + /* Extremely rare case. + If long is neither 32 nor 64 bits, (say, 128) it comes here. + */ + #define WORDACCESS_GENERIC + #include "wordaccess_generic.h" #endif #else - + /* Non GCC, GCC prior to v.3.4 or WORDACCESS_GENERIC defined */ #include "wordaccess_generic.h" #endif |