From cc83737d3534cc550e358ab565c03d623c814b91 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 14 Apr 2014 02:39:56 +0100 Subject: [PATCH] Don't allow both ENDIANNESSes to be set See discussion on https://github.com/micropython/micropython/commit/2da81fa80c4cd965f05ad237d81d9764322fde20 Explicitly set `MP_ENDIANNESS_LITTLE` because that's the #define that is used in code elsewhere. --- py/mpconfig.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/mpconfig.h b/py/mpconfig.h index f9c02a6f02..a0b6e9d485 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -187,6 +187,10 @@ typedef double mp_float_t; // Just because most archs are such? #define MP_ENDIANNESS_LITTLE (1) #endif +// Ensure we don't accidentally set both endiannesses +#if MP_ENDIANNESS_BIG +#define MP_ENDIANNESS_LITTLE (0) +#endif // printf format spec to use for machine_int_t and friends #ifndef INT_FMT