mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Suppress some compiler warnings in plperl on Windows.
Perl's XSUB.h header defines macros to replace libc functions. Our header port_win32.h does something similar earlier, so XSUB.h causes compiler warnings about macro redefinition. Undefine our macros before including XSUB.h. Thomas Munro Discussion: https://postgr.es/m/CAEepm%3D3%3DTDYEXUEcHpEx%2BTwc31wo7PA0oBAiNt6sWmq93MW02A%40mail.gmail.com
This commit is contained in:
parent
fbb2e9a030
commit
0996e4be04
@ -70,6 +70,31 @@
|
||||
* before ppport.h, so use a #define flag to control inclusion here.
|
||||
*/
|
||||
#ifdef PG_NEED_PERL_XSUB_H
|
||||
/*
|
||||
* On Windows, port_win32.h defines macros for a lot of these same functions.
|
||||
* To avoid compiler warnings when XSUB.h redefines them, #undef our versions.
|
||||
*/
|
||||
#ifdef WIN32
|
||||
#undef accept
|
||||
#undef bind
|
||||
#undef connect
|
||||
#undef fopen
|
||||
#undef kill
|
||||
#undef listen
|
||||
#undef lstat
|
||||
#undef mkdir
|
||||
#undef open
|
||||
#undef putenv
|
||||
#undef recv
|
||||
#undef rename
|
||||
#undef select
|
||||
#undef send
|
||||
#undef socket
|
||||
#undef stat
|
||||
#undef unlink
|
||||
#undef vfprintf
|
||||
#endif
|
||||
|
||||
#include "XSUB.h"
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user