mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
08af3f1b39
commit
5c16b21f44
1 changed files with 4 additions and 1 deletions
5
thread.c
5
thread.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue