diff options
| author | Antony Dovgal <tony2001@php.net> | 2007-09-04 18:46:21 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2007-09-04 18:46:21 +0000 |
| commit | 2198abb1c447b09943befa720072ef86acd7162a (patch) | |
| tree | 94ab6f3eb82f21816e955604f295cacc1f86d653 /ext/date | |
| parent | b9424cdfaf8386b8baac1b0842e33f42a1ac3274 (diff) | |
| download | php-git-2198abb1c447b09943befa720072ef86acd7162a.tar.gz | |
MFH: detect endianness in compile time when using Apple's GCC (fixes universal binary build)
Diffstat (limited to 'ext/date')
| -rw-r--r-- | ext/date/lib/parse_tz.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c index 1d2ff86e3f..d55553bced 100644 --- a/ext/date/lib/parse_tz.c +++ b/ext/date/lib/parse_tz.c @@ -33,6 +33,16 @@ #endif #include "timezonedb.h" +#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) +# if defined(__LITTLE_ENDIAN__) +# undef WORDS_BIGENDIAN +# else +# if defined(__BIG_ENDIAN__) +# define WORDS_BIGENDIAN +# endif +# endif +#endif + #ifdef WORDS_BIGENDIAN #define timelib_conv_int(l) (l) #else |
