Re: printf format selection vs. reality
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-05-23T22:04:04Z
Lists: pgsql-hackers
Sigh, I'm an idiot. I forgot that USE_REPL_SNPRINTF doesn't just replace snprintf, it replaces the entire *printf family; see port.h lines 137ff. So actually we're OK as far as these %z and argument-reordering concerns go. Maybe the comments in configure could use a bit of work though. There's maybe also an argument for reverting b929614f5, because actually that code did do something useful, ie allow us to work on platforms without %ll. But I'm inclined to leave that alone; it's an extra configure test to detect a case that probably no longer occurs in the wild. Moreover, since %ll and %z are both C99-isms, and the former had considerable currency even before C99 (evidence: gaur/pademelon) it's pretty hard to credit that a platform's *printf would fail the %ll test yet pass the %z test. So I think we're likely OK without it, even on dinosaur platforms. regards, tom lane
Commits
-
Remove configure's check for nonstandard "long long" printf modifiers.
- b929614f5e86 11.0 landed