diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/ALAC/EndianPortable.c | 8 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2013-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com> + + * src/ALAC/EndianPortable.c + Fall back to compiler's __BYTE_ORDER__ for endian-ness detection. + 2013-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com> * configure.ac src/common.h src/ima_adpcm.c src/ms_adpcm.c src/paf.c diff --git a/src/ALAC/EndianPortable.c b/src/ALAC/EndianPortable.c index 3aafb3b..5d17a1b 100644 --- a/src/ALAC/EndianPortable.c +++ b/src/ALAC/EndianPortable.c @@ -42,6 +42,14 @@ #define TARGET_RT_LITTLE_ENDIAN 0 #elif defined (TARGET_OS_WIN32) #define TARGET_RT_LITTLE_ENDIAN 1 +#elif defined (__BYTE_ORDER__) + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define TARGET_RT_LITTLE_ENDIAN 1 +#else +#define TARGET_RT_LITTLE_ENDIAN 0 +#endif + #endif uint16_t Swap16NtoB(uint16_t inUInt16) |