diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2014-09-02 17:55:56 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2014-09-04 18:31:50 +0200 |
commit | e35841e37456f4c5bc494a1674bb3f014a4d93c1 (patch) | |
tree | e841ea1eea695f8da04297e567304f74d7cacb3c /src | |
parent | 59385ff2ca16484d84116a91876987f503b64df2 (diff) |
Fix endianness part of QSysInfo::buildAbi() string
Both Q_LITTLE_ENDIAN and Q_BIG_ENDIAN macros are always defined
on all architectures. So, byte order detection results in
"little_endian" value for big endian systems. Test the system
endianness in a right way, according to Q_BYTE_ORDER macro
documentation.
Change-Id: I5523f90567e78d679a3ff2902a8f5377ed39ceb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/archdetect.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp index e35595e727..344c363031 100644 --- a/src/corelib/global/archdetect.cpp +++ b/src/corelib/global/archdetect.cpp @@ -83,10 +83,10 @@ # define ARCH_PROCESSOR "unknown" #endif -// endinanness -#if defined(Q_LITTLE_ENDIAN) +// endianness +#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN # define ARCH_ENDIANNESS "little_endian" -#elif defined(Q_BIG_ENDIAN) +#elif Q_BYTE_ORDER == Q_BIG_ENDIAN # define ARCH_ENDIANNESS "big_endian" #endif |