Unify conditionals.
authorBruno Haible <bruno@clisp.org>
Sun, 19 Jul 2009 11:13:43 +0000 (13:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 19 Jul 2009 11:13:43 +0000 (13:13 +0200)
ChangeLog
lib/execute.c
lib/pipe.c
lib/pipe.h
lib/spawni.c

index 44d91e6..9ebf21a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2009-07-19  Bruno Haible  <bruno@clisp.org>
 
+       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  <bruno@clisp.org>
+
        Fix handling of closed stdin/stdout/stderr on mingw.
        * lib/w32spawn.h: Include unistd.h.
        (dup_noinherit): Return -1 if the old handle is invalid. Allocate new
index 5127884..253b5a6 100644 (file)
@@ -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 <process.h>
@@ -104,7 +104,7 @@ execute (const char *progname,
         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;
index c63321c..5d91590 100644 (file)
@@ -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 <process.h>
@@ -112,7 +112,7 @@ create_pipe (const char *progname,
             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
index d76e874..03f2c32 100644 (file)
@@ -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 <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -117,7 +117,7 @@ extern pid_t create_pipe_bidi (const char *progname,
                               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
index 484a50b..af41682 100644 (file)
@@ -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