1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

"%z" printf format specifier is a C99ism

PRIxSIZE is also.  But shimmed in ruby.h

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2018-01-02 06:41:43 +00:00
parent f03146dd70
commit 76091d4388

View file

@ -827,10 +827,11 @@ print_machine_register(size_t reg, const char *reg_name, int col_count, int max_
char buf[64];
#ifdef __LP64__
ret = snprintf(buf, sizeof(buf), " %3.3s: 0x%016zx", reg_name, reg);
ret = snprintf(buf, sizeof(buf), " %3.3s: 0x%016" PRIxSIZE, reg_name, reg);
#else
ret = snprintf(buf, sizeof(buf), " %3.3s: 0x%08zx", reg_name, reg);
ret = snprintf(buf, sizeof(buf), " %3.3s: 0x%08" PRIxSIZE, reg_name, reg);
#endif
#undef zx
if (col_count + ret > max_col) {
fputs("\n", stderr);
col_count = 0;