DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR Pending] Link: http://www.fltk.org/str.php?L2582 Version: 1.3.0 The problem: autoconf/configure generate a single config.h file that defines the WORDS_BIGENDIAN preprocessor variable and that, under Mac OS, can be used with different endianness when compiling for the ppc or the intel architectures. The proposed solution: 1. Put this: dnl Architecture checks... if test "$uname" != Darwin; then AC_C_BIGENDIAN fi in configure.in. Thus, the configure-based computation of the WORDS_BIGENDIAN preprocessor variable won't be done for the Mac. 2. Put this: /* * WORDS_BIGENDIAN: * * Byte order of your machine: 1 = big-endian, 0 = little-endian. */ #ifdef __APPLE__ #include "mac_endianness.h" #else #define WORDS_BIGENDIAN 0 #endif in configh.in. Thus, the mac platform will define its WORDS_BIGENDIAN variable through another file. 3. Put this: #ifdef __APPLE__ # ifdef __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # else # define WORDS_BIGENDIAN 0 # endif #endif in mac_endianness.h. Thus, the WORDS_BIGENDIAN will take its correct value whatever the Mac architecture built for. This solution requires a new top-level file, mac_endianness.h. The autoconf doc suggests that is the good way to proceed: http://www.gnu.org/software/autoconf/manual/autoconf.html#Header-Templates Any comments, thoughts ? May I commit this ? Link: http://www.fltk.org/str.php?L2582 Version: 1.3.0 _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
