mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
bef93a2ddf
commit
ed28d151a3
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,9 @@ Init_limits(void)
|
||||||
rb_define_const(rb_define_module("RbConfig"), "Limits", h);
|
rb_define_const(rb_define_module("RbConfig"), "Limits", h);
|
||||||
|
|
||||||
#ifdef HAVE_LONG_LONG
|
#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 MAX2NUM(name) ULL2NUM(name ## _MAX)
|
||||||
#define MIN2NUM(name) LL2NUM(name ## _MIN)
|
#define MIN2NUM(name) LL2NUM(name ## _MIN)
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue