ruby-changes:21483
From: naruse <ko1@a...>
Date: Thu, 27 Oct 2011 09:59:56 +0900 (JST)
Subject: [ruby-changes:21483] naruse:r33532 (trunk): * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.
naruse 2011-10-27 09:59:46 +0900 (Thu, 27 Oct 2011) New Revision: 33532 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33532 Log: * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined. patched by The Written Word Inc. [ruby-core:40422] [Bug #5489] Modified files: trunk/ChangeLog trunk/include/ruby/ruby.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 33531) +++ include/ruby/ruby.h (revision 33532) @@ -258,6 +258,22 @@ # define SSIZET2NUM(v) INT2NUM(v) #endif +#ifndef SIZE_MAX +# if SIZEOF_SIZE_T > SIZEOF_LONG && defined(HAVE_LONG_LONG) +# define SIZE_MAX ULLONG_MAX +# define SIZE_MIN ULLONG_MIN +# elif SIZEOF_SIZE_T == SIZEOF_LONG +# define SIZE_MAX ULONG_MAX +# define SIZE_MIN ULONG_MIN +# elif SIZEOF_SIZE_T == SIZEOF_INT +# define SIZE_MAX UINT_MAX +# define SIZE_MIN UINT_MIN +# else +# define SIZE_MAX USHRT_MAX +# define SIZE_MIN USHRT_MIN +# endif +#endif + #ifndef SSIZE_MAX # if SIZEOF_SIZE_T > SIZEOF_LONG && defined(HAVE_LONG_LONG) # define SSIZE_MAX LLONG_MAX Index: ChangeLog =================================================================== --- ChangeLog (revision 33531) +++ ChangeLog (revision 33532) @@ -1,3 +1,8 @@ +Thu Oct 27 09:57:56 2011 NARUSE, Yui <naruse@r...> + + * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined. + patched by The Written Word Inc. [ruby-core:40422] [Bug #5489] + Thu Oct 27 08:47:38 2011 Martin Bosslet <Martin.Bosslet@g...> * ext/psych/parser.c: remove unused variable. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/