summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarti Maria <info@littlecms.com>2013-10-30 13:46:34 +0100
committerMarti Maria <info@littlecms.com>2013-10-30 13:46:34 +0100
commitb4f5c91a2c1582bd284f0d0f49cb43e2c2235a79 (patch)
treeb67b72c56c13c71744fa879251af3822e6b783c0 /include
parentfda1211c344178b05b71b5c8e0b45412b49c0599 (diff)
downloadlcms2-b4f5c91a2c1582bd284f0d0f49cb43e2c2235a79.tar.gz
Fixing endianess detection and memory leaks
Diffstat (limited to 'include')
-rw-r--r--include/lcms2.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/include/lcms2.h b/include/lcms2.h
index 3297e67..c801409 100644
--- a/include/lcms2.h
+++ b/include/lcms2.h
@@ -23,7 +23,7 @@
//
//---------------------------------------------------------------------------------
//
-// Version 2.5
+// Version 2.6b
//
#ifndef _lcms2_H
@@ -72,7 +72,7 @@ extern "C" {
#endif
// Version/release
-#define LCMS_VERSION 2050
+#define LCMS_VERSION 2060
// I will give the chance of redefining basic types for compilers that are not fully C99 compliant
#ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
@@ -177,20 +177,31 @@ typedef int cmsBool;
# define CMS_USE_BIG_ENDIAN 1
#endif
-#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(sparc)
+#if defined(__sgi__) || defined(__sgi) || defined(sparc)
# define CMS_USE_BIG_ENDIAN 1
#endif
-#if defined(__ppc__) || defined(__s390__) || defined(__s390x__)
+#if defined(__s390__) || defined(__s390x__)
# define CMS_USE_BIG_ENDIAN 1
#endif
-#ifdef TARGET_CPU_PPC
-# if TARGET_CPU_PPC
+# 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)
# define CMS_USE_BIG_ENDIAN 1
-# endif
+# if defined (__GNUC__)
+# if ( __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+# // Don't use big endian for PowerPC little endian mode
+# undef CMS_USE_BIG_ENDIAN
+# endif
+# endif
#endif
+
#ifdef macintosh
# ifdef __BIG_ENDIAN__
# define CMS_USE_BIG_ENDIAN 1