From 0ea6b8ada00d56de939363e033aab8e9c0d3fdca Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Sun, 17 Mar 2013 13:14:46 +0000 Subject: Add predefined macros for endian detection with the TI toolchains Change-Id: I88768adc8acb3b28b7a774f2e9a285d983c9d76d Reviewed-by: Thiago Macieira --- src/corelib/global/qprocessordetection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index 86023d1703..178afb1db6 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -280,9 +280,9 @@ # if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == Q_BIG_ENDIAN || __BYTE_ORDER__ == Q_LITTLE_ENDIAN) // Reuse __BYTE_ORDER__ as-is, since our Q_*_ENDIAN #defines match the preprocessor defaults # define Q_BYTE_ORDER __BYTE_ORDER__ -# elif defined(__BIG_ENDIAN__) +# elif defined(__BIG_ENDIAN__) || defined(_big_endian__) || defined(_BIG_ENDIAN) # define Q_BYTE_ORDER Q_BIG_ENDIAN -# elif defined(__LITTLE_ENDIAN__) \ +# elif defined(__LITTLE_ENDIAN__) || defined(_little_endian__) || defined(_LITTLE_ENDIAN) \ || defined(_WIN32_WCE) // Windows CE is always little-endian according to MSDN. # define Q_BYTE_ORDER Q_LITTLE_ENDIAN # else -- cgit v1.2.3