diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-22 16:36:43 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-11-22 16:36:43 +0900 |
| commit | 03e399accf4d833b3e9e4fba00ee22c65e1dca95 (patch) | |
| tree | 6b24e184d48006fd7c4064915918f155c5706967 /include/mrbconf.h | |
| parent | de415b7bc0d59e4cd7f08ed19246d467f1acb350 (diff) | |
| parent | b21b02465e6643879394b41494a3462079347a92 (diff) | |
| download | mruby-03e399accf4d833b3e9e4fba00ee22c65e1dca95.tar.gz mruby-03e399accf4d833b3e9e4fba00ee22c65e1dca95.zip | |
Merge pull request #3262 from dabroz/feature-nanbox64fix
Fixed NaN boxing for 64-bit configrations
Diffstat (limited to 'include/mrbconf.h')
| -rw-r--r-- | include/mrbconf.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h index ab5dd1a03..d47f46ae4 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -7,6 +7,20 @@ #ifndef MRUBYCONF_H #define MRUBYCONF_H +/* architecture selection: */ +/* specify -DMRB_32BIT or -DMRB_64BIT to override */ +#if !defined(MRB_32BIT) && !defined(MRB_64BIT) +#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64) || defined(__aarch64__) +#define MRB_64BIT +#else +#define MRB_32BIT +#endif +#endif + +#if defined(MRB_32BIT) && defined(MRB_64BIT) +#error Cannot build for 32 and 64 bit architecture at the same time +#endif + /* configuration options: */ /* add -DMRB_USE_FLOAT to use float instead of double for floating point numbers */ //#define MRB_USE_FLOAT |
