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

Commita82a174

Browse files
committed
Silence warnings about redefining popen on Mingw-w64.
Mingw-w64 headers map popen/pclose to _popen and _pclose, but we want to useour popen wrapper rather than the Mingw-w64. #undef the Mingw's version.
1 parent4773c70 commita82a174

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎src/include/port.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,18 @@ extern FILE *pgwin32_fopen(const char *, const char *);
301301
#definefopen(a,b) pgwin32_fopen(a,b)
302302
#endif
303303

304+
/*
305+
* Mingw-w64 headers #define popen and pclose to _popen and _pclose. We want
306+
* to use our popen wrapper, rather than plain _popen, so override that. For
307+
* consistency, use our version of pclose, too.
308+
*/
309+
#ifdefpopen
310+
#undef popen
311+
#endif
312+
#ifdefpclose
313+
#undef pclose
314+
#endif
315+
304316
/*
305317
* system() and popen() replacements to enclose the command in an extra
306318
* pair of quotes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp