summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-18 08:59:57 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-18 08:59:57 +0000
commit80e35fa21c27ff442ba5f796e118b078e57a0fee (patch)
tree43f550f596671698ec1b3b4a0fe3128def980c81
parentcedd050e4d5c97db2f584b2a6a452fc326e0bc4b (diff)
merges r33532 from trunk into ruby_1_9_2.
-- * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined. patched by The Written Word Inc. [ruby-core:40422] [Bug #5489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@34675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--include/ruby/ruby.h16
-rw-r--r--version.h2
3 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5916250c70..f60b13f8fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 27 09:57:56 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.
+ patched by The Written Word Inc. [ruby-core:40422] [Bug #5489]
+
Tue Feb 14 00:00:19 2012 okkez <okkez000@gmail.com>
* thread_pthread.c (rb_thread_create_timer_thread): fix memory
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index e6a3e653ba..0294b08363 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -256,6 +256,22 @@ VALUE rb_ull2inum(unsigned LONG_LONG);
# 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
diff --git a/version.h b/version.h
index c31c3d5be8..4e38487086 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 316
+#define RUBY_PATCHLEVEL 317
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1