diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-03 04:29:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-03 04:29:18 +0000 |
commit | 3b62e8e78b682c2eb2d1b5bcea34b49bb3201dfc (patch) | |
tree | 8a570c7aa16a73ee80588e5cd5891f023617ec4a /include | |
parent | 6d32a4e32b334195c0439bd09bfc9b9e7e560b9c (diff) | |
download | ruby-3b62e8e78b682c2eb2d1b5bcea34b49bb3201dfc.tar.gz |
win32.h: INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): also
should be defined when defining intptr_t and uintptr_t.
bigdecimal.c requires the former two now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/win32.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 56fa3e5c0c..fe8613f299 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -80,16 +80,21 @@ extern "C++" { /* template without extern "C++" */ # if !defined(_INTPTR_T_DEFINED) # ifdef _WIN64 typedef __int64 intptr_t; +# define INTPTR_MAX 9223372036854775807I64 # else typedef int intptr_t; +# define INTPTR_MAX 2147483647 # endif +# define INTPTR_MIN (-INTPTR_MAX-1) # define _INTPTR_T_DEFINED # endif # if !defined(_UINTPTR_T_DEFINED) # ifdef _WIN64 typedef unsigned __int64 uintptr_t; +# define UINTPTR_MAX 18446744073709551615UI64 # else typedef unsigned int uintptr_t; +# define UINTPTR_MAX 4294967295U # endif # define _UINTPTR_T_DEFINED # endif |