summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-05-10 20:42:33 +0200
committerBruno Haible <bruno@clisp.org>2017-05-10 20:42:33 +0200
commit1888a27a1e48e4f8b9006c164ba1d1218a143c28 (patch)
tree902a2d1ecf2085be442a80bf1ae6e62b2a7d5f7d
parent8621e5684369381a9c6a8803df3d7957eb8bff1a (diff)
downloadgnulib-1888a27a1e48e4f8b9006c164ba1d1218a143c28.tar.gz
wait-process: Adjust native Windows support.
* lib/wait-process.c: Use the usual condition for recognizing a native Windows platform.
-rw-r--r--ChangeLog6
-rw-r--r--lib/wait-process.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a173eb5c85..1807004a29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2017-05-10 Bruno Haible <bruno@clisp.org>
+ wait-process: Adjust native Windows support.
+ * lib/wait-process.c: Use the usual condition for recognizing a native
+ Windows platform.
+
+2017-05-10 Bruno Haible <bruno@clisp.org>
+
doc: New chapter "Native Windows Support".
* doc/gnulib.texi (Native Windows Support): New chapter.
* doc/windows-libtool.texi: Small wording changes.
diff --git a/lib/wait-process.c b/lib/wait-process.c
index 62b10da4b8..fab7dfb2b3 100644
--- a/lib/wait-process.c
+++ b/lib/wait-process.c
@@ -39,14 +39,14 @@
#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
-#if defined _MSC_VER || defined __MINGW32__
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
/* The return value of spawnvp() is really a process handle as returned
by CreateProcess(). Therefore we can kill it using TerminateProcess. */
-#define kill(pid,sig) TerminateProcess ((HANDLE) (pid), sig)
+# define kill(pid,sig) TerminateProcess ((HANDLE) (pid), sig)
#endif