Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit10a53ca

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 isin-scope, which it is not in our ECPG test programs. So the workaroundI tried to use in commit7640f93 doesn't work for Windows. Revertthe change in printf_hack.h, and instead just blacklist that filein cpluspluscheck --- since it's a not-installed test file, we don'treally need to verify its C++ cleanliness anyway.
1 parent4b3f1dd commit10a53ca

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-
staticinlinevoid
36+
staticvoid
3737
print_double(doublex)
3838
{
3939
#ifdefWIN32

‎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-
staticinlinevoid
32+
staticvoid
3333
print_double(doublex)
3434
{
3535
#ifdefWIN32

‎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-
staticinlinevoid
33+
staticvoid
3434
print_double(doublex)
3535
{
3636
#ifdefWIN32

‎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-
staticinlinevoid
5+
staticvoid
66
print_double(doublex)
77
{
88
#ifdefWIN32

‎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)

[8]ページ先頭

©2009-2025 Movatter.jp