summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-31 02:01:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-31 02:01:31 +0000
commited28d151a38feefb9511aebec3216b1f190485f9 (patch)
treeb8c53bd0b6bd0c34f9314eb0bc74eddcbd491a5c
parentbef93a2ddf8e17bc636aef7719df56e4c722a722 (diff)
limits.c.tmpl: fallback ULLONG_MAX
* template/limits.c.tmpl (ULLONG_MAX): add a fallback definition. On old CentOS lacks ULLONG_MAX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--template/limits.c.tmpl3
1 files changed, 3 insertions, 0 deletions
diff --git a/template/limits.c.tmpl b/template/limits.c.tmpl
index fc95e0b3076..f4ecaf62f97 100644
--- a/template/limits.c.tmpl
+++ b/template/limits.c.tmpl
@@ -58,6 +58,9 @@ Init_limits(void)
rb_define_const(rb_define_module("RbConfig"), "Limits", h);
#ifdef HAVE_LONG_LONG
+#ifndef ULLONG_MAX
+#define ULLONG_MAX ((unsigned LONG_LONG)LLONG_MAX*2+1)
+#endif
#define MAX2NUM(name) ULL2NUM(name ## _MAX)
#define MIN2NUM(name) LL2NUM(name ## _MIN)
#else