diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-14 08:27:44 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-14 08:27:44 +0000 |
commit | 5c16b21f44c3f035c87ad7fcb3df868700960a39 (patch) | |
tree | 69969442805fd0daa0f8d71019144c36d0c4e662 /thread.c | |
parent | 08af3f1b3980c3392ee3a8701d2eee08dba9e6a4 (diff) |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1203,6 +1203,9 @@ COMPILER_WARNING_PUSH #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 *timeout, const rb_hrtime_t end) 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; |