Fix macro-redefinition warning on MSVC.
authorTom Lane
Sun, 3 Sep 2017 15:01:08 +0000 (11:01 -0400)
committerTom Lane
Sun, 3 Sep 2017 15:01:08 +0000 (11:01 -0400)
In commit 9d6b160d7, I tweaked pg_config.h.win32 to use
"#define HAVE_LONG_LONG_INT_64 1" rather than defining it as empty,
for consistency with what happens in an autoconf'd build.
But Solution.pm injects another definition of that macro into
ecpg_config.h, leading to justifiable (though harmless) compiler whining.
Make that one consistent too.  Back-patch, like the previous patch.

Discussion: https://postgr.es/m/CAEepm=1dWsXROuSbRg8PbKLh0S=8Ou-V8sr05DxmJOF5chBxqQ@mail.gmail.com

src/tools/msvc/Solution.pm

index aced772b4a02ca7803042855a55bdd63e1ae9677..c5e78ec754a765ab03723c51bf8892beb7da192b 100644 (file)
@@ -399,7 +399,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
          || confess "Could not open ecpg_config.h";
        print O <
 #if (_MSC_VER > 1200)
-#define HAVE_LONG_LONG_INT_64
+#define HAVE_LONG_LONG_INT_64 1
 #define ENABLE_THREAD_SAFETY 1
 EOF
        print O "#define USE_INTEGER_DATETIMES 1\n"