Re: printf format selection vs. reality - Mailing list pgsql-hackers

From Tom Lane
Subject Re: printf format selection vs. reality
Date
Msg-id 12705.1527113044@sss.pgh.pa.us
Whole thread Raw
In response to Re: printf format selection vs. reality  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: documentation fixes for partition pruning, round two
Next
From: Thomas Munro
Date:
Subject: Re: printf format selection vs. reality