From 1888a27a1e48e4f8b9006c164ba1d1218a143c28 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 10 May 2017 20:42:33 +0200 Subject: [PATCH] wait-process: Adjust native Windows support. * lib/wait-process.c: Use the usual condition for recognizing a native Windows platform. --- ChangeLog | 6 ++++++ lib/wait-process.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) 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 -- 2.39.5