From: Bruno Haible Date: Wed, 10 May 2017 18:42:33 +0000 (+0200) Subject: wait-process: Adjust native Windows support. X-Git-Tag: v1.0~6177 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1888a27a1e48e4f8b9006c164ba1d1218a143c28;p=gnulib.git wait-process: Adjust native Windows support. * lib/wait-process.c: Use the usual condition for recognizing a native Windows platform. --- diff --git a/ChangeLog b/ChangeLog index a173eb5c85..1807004a29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-05-10 Bruno Haible + + 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 doc: New chapter "Native Windows Support". 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 +# define WIN32_LEAN_AND_MEAN +# include /* 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