Skip to content
Snippets Groups Projects
Commit 4e4772bb authored by Damien George's avatar Damien George
Browse files

py: Add further autodetection of endianess in mpconfig.h.

This patch was needed for gcc 4.4.
parent 26b512ea
No related branches found
No related tags found
No related merge requests found
......@@ -710,9 +710,18 @@ typedef double mp_float_t;
#define MP_ENDIANNESS_LITTLE (1)
#elif defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || defined (_BIG_ENDIAN)
#define MP_ENDIANNESS_LITTLE (0)
#else
#include <endian.h>
#if defined(__BYTE_ORDER)
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define MP_ENDIANNESS_LITTLE (1)
#else
#define MP_ENDIANNESS_LITTLE (0)
#endif
#else
#error endianness not defined and cannot detect it
#endif
#endif
#define MP_ENDIANNESS_BIG (!MP_ENDIANNESS_LITTLE)
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment