]> granicus.if.org Git - postgresql/commitdiff
Un-break ecpg tests for Windows.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Jun 2019 15:07:54 +0000 (11:07 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Jun 2019 15:07:54 +0000 (11:07 -0400)
Declaring a function "inline" still doesn't work with Windows compilers
(C99? what's that?), unless the macro provided by pg_config.h is
in-scope, which it is not in our ECPG test programs.  So the workaround
I tried to use in commit 7640f9312 doesn't work for Windows.  Revert
the change in printf_hack.h, and instead just blacklist that file
in cpluspluscheck --- since it's a not-installed test file, we don't
really need to verify its C++ cleanliness anyway.

src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
src/interfaces/ecpg/test/printf_hack.h
src/tools/pginclude/cpluspluscheck

index adef3b6a261e55d120fc0ef40efa5a8557ec3ff2..8586650e879befb0813d937cbb30a9269c31aac9 100644 (file)
@@ -33,7 +33,7 @@
  * print_double(x) has the same effect as printf("%g", x), but is intended
  * to produce the same formatting across all platforms.
  */
-static inline void
+static void
 print_double(double x)
 {
 #ifdef WIN32
index 85ec13ec6ed0275d5cd5f52bb8d5bbc37c1fc6c0..bf312549b4fc4cbef9c0430cb3b0293880256545 100644 (file)
@@ -29,7 +29,7 @@
  * print_double(x) has the same effect as printf("%g", x), but is intended
  * to produce the same formatting across all platforms.
  */
-static inline void
+static void
 print_double(double x)
 {
 #ifdef WIN32
index ebff9ca0359835fb53406bf6c481e5b1a8f5ab65..9debc34e791dd0463a3b03b62a03159441c644e7 100644 (file)
@@ -30,7 +30,7 @@
  * print_double(x) has the same effect as printf("%g", x), but is intended
  * to produce the same formatting across all platforms.
  */
-static inline void
+static void
 print_double(double x)
 {
 #ifdef WIN32
index 1c061d5e87e14384c72ea00bef5f4927b6b0bbc2..ef584c0d548e1ea03d1cef30deacf6478efc0140 100644 (file)
@@ -2,7 +2,7 @@
  * print_double(x) has the same effect as printf("%g", x), but is intended
  * to produce the same formatting across all platforms.
  */
-static inline void
+static void
 print_double(double x)
 {
 #ifdef WIN32
index 38617843665e15fba4cac655a2d90a851cb4e29d..b3fc75de48a31529e10220c6f7f541cc6a109b7f 100755 (executable)
@@ -105,6 +105,8 @@ do
 
        # regression.h is not actually C, but ECPG code.
        test "$f" = src/interfaces/ecpg/test/regression.h && continue
+       # printf_hack.h produces "unused function" warnings.
+       test "$f" = src/interfaces/ecpg/test/printf_hack.h && continue
 
        # pg_trace.h and utils/probes.h can include sys/sdt.h from SystemTap,
        # which itself contains C++ code and so won't compile with a C++