]> Savannah Git Hosting - gnulib.git/commitdiff
wait-process: Adjust native Windows support.
authorBruno Haible <bruno@clisp.org>
Wed, 10 May 2017 18:42:33 +0000 (20:42 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 10 May 2017 18:42:33 +0000 (20:42 +0200)
* lib/wait-process.c: Use the usual condition for recognizing a native
Windows platform.

ChangeLog
lib/wait-process.c

index a173eb5c85d898c9a21ceee05e14512c6606d291..1807004a2958107f8d7864663dada64ad4a0b89a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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".
index 62b10da4b87dbd0e461065b50c559c2a80cccaac..fab7dfb2b35a1c7b7dfbdd03af57d07db8a71eb1 100644 (file)
 #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