diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-09-26 17:35:01 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-09-26 17:35:01 -0400 |
commit | 8b91d258844afa58e856ac354f9ba9745ff9ffb2 (patch) | |
tree | 27036ef0901cc574352ef9276d2c056940a34740 /src/pl/plpython/plpython.h | |
parent | a6b88d682cbec73474a73c9782fb7096e9440a8b (diff) | |
download | postgresql-8b91d258844afa58e856ac354f9ba9745ff9ffb2.tar.gz postgresql-8b91d258844afa58e856ac354f9ba9745ff9ffb2.zip |
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
Diffstat (limited to 'src/pl/plpython/plpython.h')
-rw-r--r-- | src/pl/plpython/plpython.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/pl/plpython/plpython.h b/src/pl/plpython/plpython.h index aefbfc2f82b..eaf3e4a154f 100644 --- a/src/pl/plpython/plpython.h +++ b/src/pl/plpython/plpython.h @@ -127,13 +127,8 @@ typedef int Py_ssize_t; #ifdef vsnprintf #undef vsnprintf #endif -#ifdef __GNUC__ -#define vsnprintf(...) pg_vsnprintf(__VA_ARGS__) -#define snprintf(...) pg_snprintf(__VA_ARGS__) -#else #define vsnprintf pg_vsnprintf #define snprintf pg_snprintf -#endif /* __GNUC__ */ /* * Used throughout, and also by the Python 2/3 porting layer, so it's easier to |