Skip to content

Commit 10a53ca

Browse files
committed
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 7640f93 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.
1 parent 4b3f1dd commit 10a53ca

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

src/interfaces/ecpg/test/expected/compat_informix-dec_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* print_double(x) has the same effect as printf("%g", x), but is intended
3434
* to produce the same formatting across all platforms.
3535
*/
36-
static inline void
36+
static void
3737
print_double(double x)
3838
{
3939
#ifdef WIN32

src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* print_double(x) has the same effect as printf("%g", x), but is intended
3030
* to produce the same formatting across all platforms.
3131
*/
32-
static inline void
32+
static void
3333
print_double(double x)
3434
{
3535
#ifdef WIN32

src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* print_double(x) has the same effect as printf("%g", x), but is intended
3131
* to produce the same formatting across all platforms.
3232
*/
33-
static inline void
33+
static void
3434
print_double(double x)
3535
{
3636
#ifdef WIN32

src/interfaces/ecpg/test/printf_hack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* print_double(x) has the same effect as printf("%g", x), but is intended
33
* to produce the same formatting across all platforms.
44
*/
5-
static inline void
5+
static void
66
print_double(double x)
77
{
88
#ifdef WIN32

src/tools/pginclude/cpluspluscheck

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ do
105105

106106
# regression.h is not actually C, but ECPG code.
107107
test "$f" = src/interfaces/ecpg/test/regression.h && continue
108+
# printf_hack.h produces "unused function" warnings.
109+
test "$f" = src/interfaces/ecpg/test/printf_hack.h && continue
108110

109111
# pg_trace.h and utils/probes.h can include sys/sdt.h from SystemTap,
110112
# which itself contains C++ code and so won't compile with a C++

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy