From: Ian Lance Taylor Date: Wed, 1 Oct 1997 15:15:06 +0000 (+0000) Subject: pexecute.c: Use spawn if __CYGWIN32__. X-Git-Tag: releases/egcs-1.0.0~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=281de624e33db467fd888e0ac4c4a8a1cad1fa73;p=thirdparty%2Fgcc.git pexecute.c: Use spawn if __CYGWIN32__. * pexecute.c: Use spawn if __CYGWIN32__. * pexecute.c: Include "config.h" first, as per autoconf manual (from Paul Eggert ). From-SVN: r15825 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 238920634f4f..c5876bc67c45 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Wed Oct 1 11:13:25 1997 Ian Lance Taylor + + * pexecute.c: Use spawn if __CYGWIN32__. + + * pexecute.c: Include "config.h" first, as per autoconf manual + (from Paul Eggert ). + Wed Oct 1 01:44:36 1997 Philippe De Muyter * m68k/x-mot3300 (XCFLAGS): Disable as's long/short jump diff --git a/gcc/pexecute.c b/gcc/pexecute.c index db43a2efde4b..dc2aacd2ba53 100644 --- a/gcc/pexecute.c +++ b/gcc/pexecute.c @@ -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 #include #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 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 ? \