Re: [Lcms-user] Wrong set of CMS_USE_BIG_ENDIAN macro on Mac after upgrading to lcms 2.6
An ICC-based CMM for color management
Brought to you by:
mm2
From: Haiko K. <hk...@ca...> - 2014-03-24 13:53:46
|
Hi Marti, thanks for the quick answer. "macintosh" is not defined and "__LITTLE_ENDIAN__" is defined. "macintosh" seems to be the old Mac OS 9 platform macro. With GCC it is "__APPLE__" and "__MACH__" defined (see http://sourceforge.net/p/predef/wiki/OperatingSystems/). Regards, Haiko -----Original Message----- From: Mar...@li... [mailto:Mar...@li...] Sent: Montag, 24. März 2014 14:22 To: Haiko Kraatz Cc: lcm...@li... Subject: Re: [Lcms-user] Wrong set of CMS_USE_BIG_ENDIAN macro on Mac after upgrading to lcms 2.6 Quoting Haiko Kraatz <hk...@ca...>: > Hi, > > when using little CMS 2.6 on Mac (using xcode and build i386 and > x86_64 targets with 10.6 SDK) the macro CMS_USE_BIG_ENDIAN is set to > 1. The problem is the check of > > #if defined(__powerpc__) || defined(__ppc__) || > defined(TARGET_CPU_PPC) > > in lcms2.h that returns true. Problem is the TARGET_CPU_PPC. It is > defined to 0 in TargetConditionals.h. I think the check should be > changed to > > #if defined(__powerpc__) || defined(__ppc__) || TARGET_CPU_PPC Hi, thanks for reporting. The condition is tested above and should not be checked in this line. However, there are some lines below, that should fix this misbehavior: #ifdef macintosh # ifdef __BIG_ENDIAN__ # define CMS_USE_BIG_ENDIAN 1 # endif # ifdef __LITTLE_ENDIAN__ # undef CMS_USE_BIG_ENDIAN # endif #endif So, that means you system does not define macintosh or __LITTLE_ENDIAN__ ? Anybody else with this issue? I tried some macs and it passed all tests. Regards Marti |