aboutsummaryrefslogtreecommitdiffstats
path: root/template
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
commit15e45d3e695b909c8b28c06a199ff826a736345e (patch)
treeb8c53bd0b6bd0c34f9314eb0bc74eddcbd491a5c /template
parent5851a7fb132872072862218f128c86568bcb02e5 (diff)
downloadruby-15e45d3e695b909c8b28c06a199ff826a736345e.tar.gz
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
Diffstat (limited to 'template')
-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 fc95e0b307..f4ecaf62f9 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