diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-31 02:01:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-31 02:01:31 +0000 |
commit | ed28d151a38feefb9511aebec3216b1f190485f9 (patch) | |
tree | b8c53bd0b6bd0c34f9314eb0bc74eddcbd491a5c /template | |
parent | bef93a2ddf8e17bc636aef7719df56e4c722a722 (diff) | |
download | ruby-ed28d151a38feefb9511aebec3216b1f190485f9.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.tmpl | 3 |
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 |