fix missing __BIG_ENDIAN__ definition on some platform

e.g: mips-gcc doesn't define __BIG_ENDIAN__

Change-Id: Ic06bf453164ddddc69a523e7845a4993e14a1af2
This commit is contained in:
skal 2014-02-11 12:03:08 -08:00
parent 7fb6095b03
commit a8b6aad155

View File

@ -86,6 +86,12 @@ extern "C" {
#endif
// some endian fix (e.g.: mips-gcc doesn't define __BIG_ENDIAN__)
#if !defined(__BIG_ENDIAN__) && defined(__BYTE_ORDER__) && \
(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#define __BIG_ENDIAN__
#endif
//------------------------------------------------------------------------------
// Derived types and constants