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

ruby-changes:52529

From: shyouhei <ko1@a...>
Date: Fri, 14 Sep 2018 17:27:50 +0900 (JST)
Subject: [ruby-changes:52529] shyouhei:r64740 (trunk): PRI_64_PREFIX "u" is called PRIu64

shyouhei	2018-09-14 17:27:44 +0900 (Fri, 14 Sep 2018)

  New Revision: 64740

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

  Log:
    PRI_64_PREFIX "u" is called PRIu64
    
    See also ISO9899:1999 section 7.8.1 paragraph 3.
    
    The #ifndef is for C compilers older than C99.

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 64739)
+++ thread.c	(revision 64740)
@@ -1203,6 +1203,9 @@ COMPILER_WARNING_PUSH https://github.com/ruby/ruby/blob/trunk/thread.c#L1203
 #if defined(__GNUC__) && __GNUC__ == 7 && __GNUC_MINOR__ <= 3
 COMPILER_WARNING_IGNORED(-Wmaybe-uninitialized)
 #endif
+#ifndef PRIu64
+#define PRIu64 PRI_64_PREFIX "u"
+#endif
 /*
  * @end is the absolute time when @ts is set to expire
  * Returns true if @end has past
@@ -1215,7 +1218,7 @@ hrtime_update_expire(rb_hrtime_t *timeou https://github.com/ruby/ruby/blob/trunk/thread.c#L1218
 
     if (now > end) return 1;
     thread_debug("hrtime_update_expire: "
-                 "%"PRI_64_PREFIX"u > %"PRI_64_PREFIX"u\n",
+                 "%"PRIu64" > %"PRIu64"\n",
                  (uint64_t)end, (uint64_t)now);
     *timeout = end - now;
     return 0;

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

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