mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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.
This commit is contained in:
+7
-3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user