pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Clean up *printf macros to avoid conflict with format archetypes
Date: Wed, 26 Sep 2018 21:35:06 +0000
Message-ID: <E1g5HSc-0002Qg-RS@gemulon.postgresql.org> (raw)

Clean up *printf macros to avoid conflict with format archetypes.

We must define the macro "printf" with arguments, else it can mess
up format archetype attributes in builds where PG_PRINTF_ATTRIBUTE
is just "printf".  Fortunately, that's easy to do now that we're
requiring C99; we can use __VA_ARGS__.

On the other hand, it's better not to use __VA_ARGS__ for the rest
of the *printf crew, so that one can take the addresses of those
functions without surprises.

I'd proposed doing this some time ago, but forgot to make it happen;
buildfarm failures subsequent to 96bf88d52 reminded me.

Discussion: https://postgr.es/m/22709.1535135640@sss.pgh.pa.us
Discussion: https://postgr.es/m/20180926190934.ea4xvzhkayuw7gkx@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8b91d258844afa58e856ac354f9ba9745ff9ffb2

Modified Files
--------------
src/include/port.h         | 20 +++++++-------------
src/pl/plperl/plperl.h     |  5 -----
src/pl/plpython/plpython.h |  5 -----
3 files changed, 7 insertions(+), 23 deletions(-)



Message-ID: <E1g5HSc-0002Qg-RS@gemulon.postgresql.org>
Permalink:  ../E1g5HSc-0002Qg-RS@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g5HSc-0002Qg-RS@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Clean up *printf macros to avoid conflict with format archetypes
  In-Reply-To: <E1g5HSc-0002Qg-RS@gemulon.postgresql.org>
  References: <E1g5HSc-0002Qg-RS@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox