pgsql: plpython: Avoid the need to redefine *printf macros

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: plpython: Avoid the need to redefine *printf macros
Date: 2023-01-25 17:59:51
Message-ID: E1pKk3r-005RxC-Kd@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

plpython: Avoid the need to redefine *printf macros

Until now we undefined and then redefined a lot of *printf macros due to
worries about conflicts with Python.h macro definitions. Current Python.h
doesn't define any *printf macros, and older versions just defined snprintf,
vsnprintf, guarded by #if defined(MS_WIN32) && !defined(HAVE_SNPRINTF).

Thus we can replace the undefine/define section with a single
#define HAVE_SNPRINTF 1

Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/20230124165814.2njc7gnvubn2amh6@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/23c12329a755ad9c70135463d3f067241daf1dcc

Modified Files
--------------
src/pl/plpython/plpython.h | 48 +++-------------------------------------------
1 file changed, 3 insertions(+), 45 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2023-01-25 18:17:50 Re: pgsql: Rename contrib module basic_archive to basic_wal_module
Previous Message Robert Haas 2023-01-25 17:49:45 Re: pgsql: Rename contrib module basic_archive to basic_wal_module