diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-14 05:52:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-14 05:52:06 +0000 |
commit | f83c42d970916f8c2d8b30cb252ce09709c10b60 (patch) | |
tree | 8e4d59f73bdee2ad332251309c68f3e62575d270 /include | |
parent | 77753bd9ec9f40e49d7bed633778f365e96a102a (diff) |
win32.h: fix for VC9
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): split
from intptr_t and uintptr_t, since VC9 defines the latters only in
crtdefs.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/win32.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 0392aad108..ec156c40e7 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -81,24 +81,34 @@ 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; +# endif +# define _INTPTR_T_DEFINED +# endif +# if !defined(INTPTR_MAX) +# ifdef _WIN64 +# define INTPTR_MAX 9223372036854775807I64 +# else # 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 +# if !defined(UINTPTR_MAX) +# ifdef _WIN64 +# define UINTPTR_MAX 18446744073709551615UI64 +# else +# define UINTPTR_MAX 4294967295U +# endif +# endif #endif #ifndef __MINGW32__ # define mode_t int |