From: Toby Peterson Date: 2005-08-03T09:56:57+09:00 Subject: [PATCH] building with multiple -arch flags --Apple-Mail-2-842008344 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed __BIG_ENDIAN__ only overrides the WORDS_BIGENDIAN configure check if __NeXT__ is defined. Since __NeXT__ is not defined on Mac OS X / Darwin, this causes lots of breakage when using multiple -arch flags. - Toby Peterson --Apple-Mail-2-842008344 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="defines.h.diff" Content-Disposition: attachment; filename=defines.h.diff Index: defines.h =================================================================== RCS file: /src/ruby/defines.h,v retrieving revision 1.43 diff -u -r1.43 defines.h --- defines.h 2 Jul 2005 08:11:24 -0000 1.43 +++ defines.h 3 Aug 2005 00:53:00 -0000 @@ -102,6 +102,16 @@ #endif #endif +#if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) +/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may + result in a different endian. Instead trust __BIG_ENDIAN__ and + __LITTLE_ENDIAN__ which are set correctly by -arch. */ +#undef WORDS_BIGENDIAN +#ifdef __BIG_ENDIAN__ +#define WORDS_BIGENDIAN +#endif +#endif + #ifdef __NeXT__ /* NextStep, OpenStep, Rhapsody */ #ifndef S_IRUSR @@ -155,13 +165,6 @@ #ifndef S_ISREG #define S_ISREG(mode) (((mode) & (0170000)) == (0100000)) #endif -/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may - result in a different endian. Instead trust __BIG_ENDIAN__ and - __LITTLE_ENDIAN__ which are set correctly by -arch. */ -#undef WORDS_BIGENDIAN -#ifdef __BIG_ENDIAN__ -#define WORDS_BIGENDIAN -#endif #ifndef __APPLE__ /* NextStep, OpenStep (but not Rhapsody) */ #ifndef GETPGRP_VOID --Apple-Mail-2-842008344--