summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/mrbconf.h3
1 files changed, 2 insertions, 1 deletions
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