# HG changeset patch # User Bruno Haible # Date 1248002023 -7200 # Node ID dad85cd90e2eb9c120f16d078ca60ebb8953ed2d # Parent 21991b412914cf439c1b52aed5142160997cacee Unify conditionals. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-07-19 Bruno Haible + + Unify conditionals. + * lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__ + macros, not at the compiler macros. + * lib/pipe.c: Likewise. + * lib/execute.c: Likewise. + * lib/spawni.c: Likewise. + 2009-07-19 Bruno Haible Fix handling of closed stdin/stdout/stderr on mingw. diff --git a/lib/execute.c b/lib/execute.c --- a/lib/execute.c +++ b/lib/execute.c @@ -35,7 +35,7 @@ #define _(str) gettext (str) -#if defined _MSC_VER || defined __MINGW32__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Woe32 API. */ # include @@ -104,7 +104,7 @@ bool slave_process, bool exit_on_error, int *termsigp) { -#if defined _MSC_VER || defined __MINGW32__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Woe32 API. */ int orig_stdin; diff --git a/lib/pipe.c b/lib/pipe.c --- a/lib/pipe.c +++ b/lib/pipe.c @@ -35,7 +35,7 @@ #define _(str) gettext (str) -#if defined _MSC_VER || defined __MINGW32__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Woe32 API. */ # include @@ -112,7 +112,7 @@ bool slave_process, bool exit_on_error, int fd[2]) { -#if defined _MSC_VER || defined __MINGW32__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Woe32 API. This uses _pipe(), dup2(), and spawnv(). It could also be implemented diff --git a/lib/pipe.h b/lib/pipe.h --- a/lib/pipe.h +++ b/lib/pipe.h @@ -1,5 +1,5 @@ /* Creation of subprocesses, communicating via pipes. - Copyright (C) 2001-2003, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006, 2008-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software: you can redistribute it and/or modify @@ -117,7 +117,7 @@ int fd[2]); /* The name of the "always silent" device. */ -#if defined _MSC_VER || defined __MINGW32__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Woe32 API. */ # define DEV_NULL "NUL" #else diff --git a/lib/spawni.c b/lib/spawni.c --- a/lib/spawni.c +++ b/lib/spawni.c @@ -89,7 +89,7 @@ #define SPAWN_ERROR 127 -#if defined _MSC_VER || defined __MINGW32__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Woe32 API. */ int