summaryrefslogtreecommitdiffhomepage
path: root/include/mrbconf.h
diff options
context:
space:
mode:
authorKazuho Oku <[email protected]>2016-12-07 15:31:32 +0900
committerKazuho Oku <[email protected]>2016-12-07 15:31:32 +0900
commitb491f4b06a586916965526597136bd3a255bc9ee (patch)
tree38d7ea1421bfe82bbc0dda08691d9d25f99cf936 /include/mrbconf.h
parentdffb4d82dc83054eade20679f069979d242d9745 (diff)
downloadmruby-b491f4b06a586916965526597136bd3a255bc9ee.tar.gz
mruby-b491f4b06a586916965526597136bd3a255bc9ee.zip
set `MRB_64BIT` if the sizeof(size_t) is 8
Diffstat (limited to 'include/mrbconf.h')
-rw-r--r--include/mrbconf.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h
index d47f46ae4..4796919c2 100644
--- a/include/mrbconf.h
+++ b/include/mrbconf.h
@@ -7,10 +7,13 @@
#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 defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64) || defined(__aarch64__)
+#if UINT64_MAX == SIZE_MAX
#define MRB_64BIT
#else
#define MRB_32BIT