diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-01 15:15:06 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-01 15:15:06 +0000 |
commit | a73a2af15f8da5101bf1cc890a68e0ac56f43de8 (patch) | |
tree | eb969fc17c26a5a2e212dcbcdf5cbb43ce43a940 /gcc/pexecute.c | |
parent | 9b3b9618c2d7102e72e08123b2cb57f527973955 (diff) | |
download | gcc-a73a2af15f8da5101bf1cc890a68e0ac56f43de8.tar.gz |
* 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15825 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pexecute.c')
-rw-r--r-- | gcc/pexecute.c | 17 |
1 files changed, 14 insertions, 3 deletions
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 ? \ |