Fix compiler warning for MSVC in libpq_pipeline.c

DEBUG was already defined by the MSVC toolchain for "Debug" builds. On
these systems the unconditional #define DEBUG was causing a 'DEBUG': macro
redefinition warning.

Here we rename DEBUG to DEBUG_OUPUT and also get rid of the #define which
defined this constant.  This appears to have been left in the code by
mistake.

Discussion: https://postgr.es/m/CAApHDvqTTgDm38s4HRj03nhzhzQ1oMOj-RXFUB1pE6Bj07jyuQ@mail.gmail.com
This commit is contained in:
David Rowley 2021-04-07 09:51:33 +12:00
parent c5b7ba4e67
commit 3b82d990ab

View File

@ -35,8 +35,7 @@ const char *const progname = "libpq_pipeline";
char *tracefile = NULL; /* path to PQtrace() file */ char *tracefile = NULL; /* path to PQtrace() file */
#define DEBUG #ifdef DEBUG_OUTPUT
#ifdef DEBUG
#define pg_debug(...) do { fprintf(stderr, __VA_ARGS__); } while (0) #define pg_debug(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
#else #else
#define pg_debug(...) #define pg_debug(...)