diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-05-15 12:18:49 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-05-15 12:18:49 +0300 |
commit | a82a17475d8a8a91df5fd1448b0f93772f590ecd (patch) | |
tree | cc6319d09aeed9bc2280942b1db51d3716d57b06 | |
parent | 4773c70aa4c938c367ee179f7301f70a4efabc0e (diff) | |
download | postgresql-a82a17475d8a8a91df5fd1448b0f93772f590ecd.tar.gz postgresql-a82a17475d8a8a91df5fd1448b0f93772f590ecd.zip |
Silence warnings about redefining popen on Mingw-w64.
Mingw-w64 headers map popen/pclose to _popen and _pclose, but we want to use
our popen wrapper rather than the Mingw-w64. #undef the Mingw's version.
-rw-r--r-- | src/include/port.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/port.h b/src/include/port.h index 0c2b2369215..3d7f2675545 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -302,6 +302,18 @@ extern FILE *pgwin32_fopen(const char *, const char *); #endif /* + * Mingw-w64 headers #define popen and pclose to _popen and _pclose. We want + * to use our popen wrapper, rather than plain _popen, so override that. For + * consistency, use our version of pclose, too. + */ +#ifdef popen +#undef popen +#endif +#ifdef pclose +#undef pclose +#endif + +/* * system() and popen() replacements to enclose the command in an extra * pair of quotes. */ |