From 4af2e5420d913b982b81d1f9cf879f3c4769ddbd Mon Sep 17 00:00:00 2001 From: mzillgit Date: Fri, 22 May 2015 11:16:31 +0000 Subject: [PATCH] - detect correct endianess for older GCC versions on powerpc --- src/hal/inc/platform_endian.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hal/inc/platform_endian.h b/src/hal/inc/platform_endian.h index 224e449..9bc7a5a 100644 --- a/src/hal/inc/platform_endian.h +++ b/src/hal/inc/platform_endian.h @@ -32,6 +32,14 @@ #if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) #define PLATFORM_IS_BIGENDIAN 1 #endif + +#else + +/* older versions of GCC have __BYTE_ORDER__ not defined! */ +#ifdef __PPC__ +#define PLATFORM_IS_BIGENDIAN 1 +#endif + #endif /* __BYTE_ORDER__ */ #endif /* __GNUC__ */ #endif