Commit 10a53cae authored by Tom Lane's avatar Tom Lane

Un-break ecpg tests for Windows.

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 7640f931 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.
parent 4b3f1dd7
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* print_double(x) has the same effect as printf("%g", x), but is intended * print_double(x) has the same effect as printf("%g", x), but is intended
* to produce the same formatting across all platforms. * to produce the same formatting across all platforms.
*/ */
static inline void static void
print_double(double x) print_double(double x)
{ {
#ifdef WIN32 #ifdef WIN32
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* print_double(x) has the same effect as printf("%g", x), but is intended * print_double(x) has the same effect as printf("%g", x), but is intended
* to produce the same formatting across all platforms. * to produce the same formatting across all platforms.
*/ */
static inline void static void
print_double(double x) print_double(double x)
{ {
#ifdef WIN32 #ifdef WIN32
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* print_double(x) has the same effect as printf("%g", x), but is intended * print_double(x) has the same effect as printf("%g", x), but is intended
* to produce the same formatting across all platforms. * to produce the same formatting across all platforms.
*/ */
static inline void static void
print_double(double x) print_double(double x)
{ {
#ifdef WIN32 #ifdef WIN32
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* print_double(x) has the same effect as printf("%g", x), but is intended * print_double(x) has the same effect as printf("%g", x), but is intended
* to produce the same formatting across all platforms. * to produce the same formatting across all platforms.
*/ */
static inline void static void
print_double(double x) print_double(double x)
{ {
#ifdef WIN32 #ifdef WIN32
......
...@@ -105,6 +105,8 @@ do ...@@ -105,6 +105,8 @@ do
# regression.h is not actually C, but ECPG code. # regression.h is not actually C, but ECPG code.
test "$f" = src/interfaces/ecpg/test/regression.h && continue 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, # 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++ # which itself contains C++ code and so won't compile with a C++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment