1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-05-03 04:29:18 +00:00
parent 6d32a4e32b
commit 3b62e8e78b
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Fri May 3 13:29:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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.
Fri May 3 13:22:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> Fri May 3 13:22:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* win32/win32.c (poll_child_status): fix build error on older mingw. * win32/win32.c (poll_child_status): fix build error on older mingw.

View file

@ -80,16 +80,21 @@ extern "C++" { /* template without extern "C++" */
# if !defined(_INTPTR_T_DEFINED) # if !defined(_INTPTR_T_DEFINED)
# ifdef _WIN64 # ifdef _WIN64
typedef __int64 intptr_t; typedef __int64 intptr_t;
# define INTPTR_MAX 9223372036854775807I64
# else # else
typedef int intptr_t; typedef int intptr_t;
# define INTPTR_MAX 2147483647
# endif # endif
# define INTPTR_MIN (-INTPTR_MAX-1)
# define _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED
# endif # endif
# if !defined(_UINTPTR_T_DEFINED) # if !defined(_UINTPTR_T_DEFINED)
# ifdef _WIN64 # ifdef _WIN64
typedef unsigned __int64 uintptr_t; typedef unsigned __int64 uintptr_t;
# define UINTPTR_MAX 18446744073709551615UI64
# else # else
typedef unsigned int uintptr_t; typedef unsigned int uintptr_t;
# define UINTPTR_MAX 4294967295U
# endif # endif
# define _UINTPTR_T_DEFINED # define _UINTPTR_T_DEFINED
# endif # endif