diff options
author | Marti Maria <info@littlecms.com> | 2014-04-17 19:51:02 +0200 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2014-04-17 19:51:02 +0200 |
commit | 1948a466f43e5ccd4b3e2f47e3e3d337c9400ed9 (patch) | |
tree | eaecd90c1f291c57a633f7cc13b2b266ac9db779 /include | |
parent | 74ba39195a0cf87c43f46a2fabd9c2168692822d (diff) | |
download | lcms2-1948a466f43e5ccd4b3e2f47e3e3d337c9400ed9.tar.gz |
Fix (again) endianess detection on PowerPC
Diffstat (limited to 'include')
-rw-r--r-- | include/lcms2.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/include/lcms2.h b/include/lcms2.h index a0eeea7..b4cd889 100644 --- a/include/lcms2.h +++ b/include/lcms2.h @@ -23,7 +23,7 @@ // //--------------------------------------------------------------------------------- // -// Version 2.6 +// Version 2.7beta0 // #ifndef _lcms2_H @@ -75,7 +75,7 @@ extern "C" { #endif // Version/release -#define LCMS_VERSION 2060 +#define LCMS_VERSION 2070 // I will give the chance of redefining basic types for compilers that are not fully C99 compliant #ifndef CMS_BASIC_TYPES_ALREADY_DEFINED @@ -184,27 +184,19 @@ typedef int cmsBool; # define CMS_USE_BIG_ENDIAN 1 #endif -# ifdef TARGET_CPU_PPC -# if TARGET_CPU_PPC -# define CMS_USE_BIG_ENDIAN 1 -# endif -# endif #if defined(__powerpc__) || defined(__ppc__) || defined(TARGET_CPU_PPC) +# if __powerpc__ || __ppc__ || TARGET_CPU_PPC # define CMS_USE_BIG_ENDIAN 1 -# if defined (__GNUC__) && defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) -# if __BYTE_ORDER == __LITTLE_ENDIAN -// // Don't use big endian for PowerPC little endian mode +# if defined (__GNUC__) && defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) +# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + // Don't use big endian for PowerPC little endian mode # undef CMS_USE_BIG_ENDIAN # endif +# endif # endif #endif -// WORDS_BIGENDIAN takes precedence -#if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN) -# define CMS_USE_BIG_ENDIAN 1 -#endif - #ifdef macintosh # ifdef __BIG_ENDIAN__ # define CMS_USE_BIG_ENDIAN 1 @@ -214,6 +206,12 @@ typedef int cmsBool; # endif #endif +// WORDS_BIGENDIAN takes precedence +#if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN) +# define CMS_USE_BIG_ENDIAN 1 +#endif + + // Calling convention -- this is hardly platform and compiler dependent #ifdef CMS_IS_WINDOWS_ # if defined(CMS_DLL) || defined(CMS_DLL_BUILD) |