Define `MRB_ENDIAN_BIG` automatically; ref #4190

You had to define this macro on big endian platforms, but it is very
error-prone. So define the macro automatically if possible.
parent 2fdb309e
......@@ -58,12 +58,16 @@
# endif
#endif
/* define on big endian machines; used by MRB_NAN_BOXING, etc. */
#ifndef MRB_ENDIAN_BIG
# if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
# define MRB_ENDIAN_BIG
# endif
#endif
/* represent mrb_value in boxed double; conflict with MRB_USE_FLOAT and MRB_WITHOUT_FLOAT */
//#define MRB_NAN_BOXING
/* define on big endian machines; used by MRB_NAN_BOXING */
//#define MRB_ENDIAN_BIG
/* represent mrb_value as a word (natural unit of data for the processor) */
//#define MRB_WORD_BOXING
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment