From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add work-around for VA_ARGS_NARGS() on MSVC.
Date: Thu, 22 Dec 2022 05:34:29 +0000
Message-ID: <E1p8EDs-004pJd-AI@gemulon.postgresql.org> (raw)
Add work-around for VA_ARGS_NARGS() on MSVC.
The previous coding of VA_ARGS_NARGS() always returned 1 on Visual
Studio, because it treats __VA_ARGS__ as a single token unless you jump
through extra hoops. Newer compilers have an option to fix that. Add a
comment about that so that we can remember to clean this up in the
future when our minimum MSVC version advances.
Author: Victor Spirin <v.spirin@postgrespro.ru>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/f450fc57-a147-19d0-e50c-33571c52cc13%40postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3f28bd7337d7c01820283fee51027a9dc9d2295f
Modified Files
--------------
src/include/c.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
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: tmunro@postgresql.org
Subject: Re: pgsql: Add work-around for VA_ARGS_NARGS() on MSVC.
In-Reply-To: <E1p8EDs-004pJd-AI@gemulon.postgresql.org>
References: <E1p8EDs-004pJd-AI@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