diff options
author | Bruno Haible <bruno@clisp.org> | 2017-05-10 20:42:33 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-05-10 20:42:33 +0200 |
commit | 1888a27a1e48e4f8b9006c164ba1d1218a143c28 (patch) | |
tree | 902a2d1ecf2085be442a80bf1ae6e62b2a7d5f7d | |
parent | 8621e5684369381a9c6a8803df3d7957eb8bff1a (diff) | |
download | gnulib-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-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/wait-process.c | 8 |
2 files changed, 10 insertions, 4 deletions
@@ -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 |