From e9ceb865b6621739c217f68bebea023069ef63ca Mon Sep 17 00:00:00 2001 From: dearblue Date: Sat, 22 Dec 2018 20:37:51 +0900 Subject: Fix MRB_ENDIAN_BIG is always defined, if byte order macro is not defined --- include/mrbconf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/mrbconf.h b/include/mrbconf.h index 9bdd11af6..b1aec8334 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -60,7 +60,8 @@ /* define on big endian machines; used by MRB_NAN_BOXING, etc. */ #ifndef MRB_ENDIAN_BIG -# if BYTE_ORDER == BIG_ENDIAN +# if (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) || \ + (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) # define MRB_ENDIAN_BIG # endif #endif -- cgit v1.2.3