]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pexecute.c: Use spawn if __CYGWIN32__.
authorIan Lance Taylor <ian@cygnus.com>
Wed, 1 Oct 1997 15:15:06 +0000 (15:15 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 1 Oct 1997 15:15:06 +0000 (15:15 +0000)
        * pexecute.c: Use spawn if __CYGWIN32__.

        * pexecute.c: Include "config.h" first, as per autoconf manual
(from Paul Eggert  <eggert@twinsun.com>).

From-SVN: r15825

gcc/ChangeLog
gcc/pexecute.c

index 238920634f4fe3d6e6def6b6512f515b3c87635c..c5876bc67c458904bc254940e98e83cce77bc8fb 100644 (file)
@@ -1,3 +1,10 @@
+Wed Oct  1 11:13:25 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+        * pexecute.c: Use spawn if __CYGWIN32__.
+
+        * pexecute.c: Include "config.h" first, as per autoconf manual
+       (from Paul Eggert  <eggert@twinsun.com>).
+
 Wed Oct  1 01:44:36 1997  Philippe De Muyter  <phdm@info.ucl.ac.be>
 
        * m68k/x-mot3300 (XCFLAGS): Disable as's long/short jump
index db43a2efde4b04ddc5d1622d566a405aa34fa585..dc2aacd2ba53258de288778cfc47bd35ddc39dc2 100644 (file)
@@ -23,11 +23,14 @@ Boston, MA 02111-1307, USA.  */
 /* This file lives in at least two places: libiberty and gcc.
    Don't change one without the other.  */
 
+#ifdef IN_GCC
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <errno.h>
 
 #ifdef IN_GCC
-#include "config.h"
 #include "gansidecl.h"
 /* ??? Need to find a suitable header file.  */
 #define PEXECUTE_FIRST   1
@@ -217,12 +220,18 @@ pwait (pid, status, flags)
 
 #endif /* MSDOS */
 
-#if defined (_WIN32) && !defined (__CYGWIN32__)
+#if defined (_WIN32)
 
 #include <process.h>
 extern int _spawnv ();
 extern int _spawnvp ();
 
+#ifdef __CYGWIN32__
+
+#define fix_argv(argvec) (argvec)
+
+#else
+
 /* This is a kludge to get around the Microsoft C spawn functions' propensity
    to remove the outermost set of double quotes from all arguments.  */
 
@@ -260,6 +269,8 @@ fix_argv (argvec)
   return (const char * const *) argvec;
 }
 
+#endif /* ! defined (__CYGWIN32__) */
+
 int
 pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
      const char *program;
@@ -478,7 +489,7 @@ pfinish ()
 
 /* include for Unix-like environments but not for Dos-like environments */
 #if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \
-    && (defined (__CYGWIN32__) || ! defined (_WIN32))
+    && ! defined (_WIN32)
 
 #ifdef VMS
 #define vfork() (decc$$alloc_vfork_blocks() >= 0 ? \