Commit b491f4b0 authored by Kazuho Oku's avatar Kazuho Oku

set `MRB_64BIT` if the sizeof(size_t) is 8

parent dffb4d82
...@@ -7,10 +7,13 @@ ...@@ -7,10 +7,13 @@
#ifndef MRUBYCONF_H #ifndef MRUBYCONF_H
#define MRUBYCONF_H #define MRUBYCONF_H
#include <limits.h>
#include <stdint.h>
/* architecture selection: */ /* architecture selection: */
/* specify -DMRB_32BIT or -DMRB_64BIT to override */ /* specify -DMRB_32BIT or -DMRB_64BIT to override */
#if !defined(MRB_32BIT) && !defined(MRB_64BIT) #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 #define MRB_64BIT
#else #else
#define MRB_32BIT #define MRB_32BIT
......
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