[前][次][番号順一覧][スレッド一覧]

ruby-changes:45402

From: nobu <ko1@a...>
Date: Tue, 31 Jan 2017 11:07:56 +0900 (JST)
Subject: [ruby-changes:45402] nobu:r57475 (trunk): limits.c.tmpl: fallback ULLONG_MAX

nobu	2017-01-31 11:01:31 +0900 (Tue, 31 Jan 2017)

  New Revision: 57475

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57475

  Log:
    limits.c.tmpl: fallback ULLONG_MAX
    
    * template/limits.c.tmpl (ULLONG_MAX): add a fallback definition.
      On old CentOS lacks ULLONG_MAX.

  Modified files:
    trunk/template/limits.c.tmpl
Index: template/limits.c.tmpl
===================================================================
--- template/limits.c.tmpl	(revision 57474)
+++ template/limits.c.tmpl	(revision 57475)
@@ -58,6 +58,9 @@ Init_limits(void) https://github.com/ruby/ruby/blob/trunk/template/limits.c.tmpl#L58
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]