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

Commit0996e4b

Browse files
committed
Suppress some compiler warnings in plperl on Windows.
Perl's XSUB.h header defines macros to replace libc functions. Our headerport_win32.h does something similar earlier, so XSUB.h causes compilerwarnings about macro redefinition. Undefine our macros before includingXSUB.h.Thomas MunroDiscussion:https://postgr.es/m/CAEepm%3D3%3DTDYEXUEcHpEx%2BTwc31wo7PA0oBAiNt6sWmq93MW02A%40mail.gmail.com
1 parentfbb2e9a commit0996e4b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎src/pl/plperl/plperl.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,31 @@
7070
* before ppport.h, so use a #define flag to control inclusion here.
7171
*/
7272
#ifdefPG_NEED_PERL_XSUB_H
73+
/*
74+
* On Windows, port_win32.h defines macros for a lot of these same functions.
75+
* To avoid compiler warnings when XSUB.h redefines them, #undef our versions.
76+
*/
77+
#ifdefWIN32
78+
#undef accept
79+
#undef bind
80+
#undef connect
81+
#undef fopen
82+
#undef kill
83+
#undef listen
84+
#undef lstat
85+
#undef mkdir
86+
#undef open
87+
#undef putenv
88+
#undef recv
89+
#undef rename
90+
#undef select
91+
#undef send
92+
#undef socket
93+
#undef stat
94+
#undef unlink
95+
#undef vfprintf
96+
#endif
97+
7398
#include"XSUB.h"
7499
#endif
75100

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp