We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4773c70 commit a82a174Copy full SHA for a82a174
src/include/port.h
@@ -301,6 +301,18 @@ extern FILE *pgwin32_fopen(const char *, const char *);
301
#define fopen(a,b) pgwin32_fopen(a,b)
302
#endif
303
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
+#ifdef popen
310
+#undef popen
311
+#endif
312
+#ifdef pclose
313
+#undef pclose
314
315
+
316
/*
317
* system() and popen() replacements to enclose the command in an extra
318
* pair of quotes.
0 commit comments