diff options
author | Ian Lance Taylor <ian@cygnus.com> | 1997-10-01 15:15:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@cygnus.com> | 1997-10-01 15:15:06 +0000 |
commit | 525eafbf983b8b138a2e2f7f3239f0c776fa61c6 (patch) | |
tree | eb969fc17c26a5a2e212dcbcdf5cbb43ce43a940 | |
parent | 8bfadca7e71f83493717eeb739606d642cc52528 (diff) |
* pexecute.c: Use spawn if __CYGWIN32__.
* pexecute.c: Include "config.h" first, as per autoconf manual
(from Paul Eggert <eggert@twinsun.com>).
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@15825 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/pexecute.c | 17 |
2 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 238920634f4..c5876bc67c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/pexecute.c b/gcc/pexecute.c index db43a2efde4..dc2aacd2ba5 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 <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 ? \ |