diff options
| author | Felix Jones <[email protected]> | 2017-02-16 13:33:46 +0000 |
|---|---|---|
| committer | Felix Jones <[email protected]> | 2017-02-16 13:33:46 +0000 |
| commit | d83aad8d570e4bbffa3bd3ce64e210f78afa425f (patch) | |
| tree | 5389a87c135b1bdf3e23a1ba02e02400b7cf80fc /include/mrbconf.h | |
| parent | 70aa6dc38d75dd6b1e2c76f290bc576e36e36ea3 (diff) | |
| parent | b165708c8deba00685f9a27926c554aaa7f3b0fb (diff) | |
| download | mruby-d83aad8d570e4bbffa3bd3ce64e210f78afa425f.tar.gz mruby-d83aad8d570e4bbffa3bd3ce64e210f78afa425f.zip | |
Merge branch 'master' into android.rake-ndk-clang
Diffstat (limited to 'include/mrbconf.h')
| -rw-r--r-- | include/mrbconf.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h index ab5dd1a03..4796919c2 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -7,6 +7,23 @@ #ifndef MRUBYCONF_H #define MRUBYCONF_H +#include <limits.h> +#include <stdint.h> + +/* architecture selection: */ +/* specify -DMRB_32BIT or -DMRB_64BIT to override */ +#if !defined(MRB_32BIT) && !defined(MRB_64BIT) +#if UINT64_MAX == SIZE_MAX +#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 |
