waitpid.c (wait): Define as a macro that calls _cwait, so that this function works...
authorEli Zaretskii <eliz@gnu.org>
Wed, 24 May 2017 21:35:59 +0000 (21:35 +0000)
committerDJ Delorie <dj@gcc.gnu.org>
Wed, 24 May 2017 21:35:59 +0000 (17:35 -0400)
2017-05-24  Eli Zaretskii  <eliz@gnu.org>
* libiberty/waitpid.c (wait) [__MINGW32__]: Define as a macro
that calls _cwait, so that this function works on MinGW.

From-SVN: r248430

libiberty/ChangeLog
libiberty/waitpid.c

index 14e7e3258f970be5d0f3480dd660133c4304c214..c779928934acfa5dc04c8a7b64f01eaba0140aeb 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-24  Eli Zaretskii  <eliz@gnu.org>
+
+       * waitpid.c (wait) [__MINGW32__]: Define as a macro
+       that calls _cwait, so that this function works on MinGW.
+
 2017-05-02  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        * d-demangle.c (dlang_hexdigit): New function.
index fd519d7696e074573f37b204c0a8485d5a2b8d0f..c0e9c3e0ca995a513df59c19fe6e3ded8274e608 100644 (file)
@@ -23,6 +23,11 @@ does the return value.  The third argument is unused in @libib{}.
 #include <sys/wait.h>
 #endif
 
+#ifdef __MINGW32__
+#include <process.h>
+#define wait(s)  _cwait(s,pid,_WAIT_CHILD)
+#endif
+
 pid_t
 waitpid (pid_t pid, int *stat_loc, int options ATTRIBUTE_UNUSED)
 {