From bc3a6c75f84f36e8323e0576f1323a183c20d009 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 8 Mar 2012 10:28:56 +0100 Subject: byteorder: Fix compilation for MIPS and GCC < 4.6. Use the pre-processor macros to detect the byte order. This is how it is done for ARM and other platforms. Use the variant of the macro with the most underscores to match our ARM detection. Change-Id: I7d2b34bf45a7f3979b44a1fe2e95f678152a5dcd Reviewed-by: Bradley T. Hughes --- src/corelib/global/qprocessordetection.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index 6231dae5dc..d62794e706 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -188,7 +188,13 @@ # if defined(_MIPS_ARCH_MIPS64) || defined(__mips64) # define Q_PROCESSOR_MIPS_64 # endif +# if defined(__MIPSEL__) +# define Q_BYTE_ORDER Q_LITTLE_ENDIAN +# elif defined(__MIPSEB__) +# define Q_BYTE_ORDER Q_BIG_ENDIAN +# else // Q_BYTE_ORDER not defined, use endianness auto-detection +# endif /* Power family, known variants: 32- and 64-bit -- cgit v1.2.3