diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2012-03-08 10:28:56 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-10 15:37:01 +0100 |
commit | bc3a6c75f84f36e8323e0576f1323a183c20d009 (patch) | |
tree | 40dc63f7a4f8f38b9cdc8895807ce612721a07cd /src | |
parent | 7a1a0fc76b7a60483e8ef728102d10d39f0c7a23 (diff) |
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 <bradley.hughes@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qprocessordetection.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |