Permalink
Browse files

Merge pull request #3325 from kazuho/kazuho/detect-64bit

set `MRB_64BIT` if the sizeof(size_t) is 8
  • Loading branch information...
matz committed Dec 7, 2016
2 parents dffb4d8 + b491f4b commit 2b0dd1f48194e59ff839ec97d0fde7df76f325ea
Showing with 4 additions and 1 deletion.
  1. +4 −1 include/mrbconf.h
View
@@ -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

0 comments on commit 2b0dd1f

Please sign in to comment.