Commit ece0e59f by Christopher Faylor Committed by DJ Delorie

configure.in: Remove special pex-cygwin consideration.

* configure.in: Remove special pex-cygwin consideration.
* configure: Regenerate.
* pex-cygwin.c: Remove.
* Makefile.in: Remove pex-cygwin.[co] lines.

From-SVN: r61744
parent f5128e88
2003-01-24 Christopher Faylor <cgf@redhat.com>
* configure.in: Remove special pex-cygwin consideration.
* configure: Regenerate.
* pex-cygwin.c: Remove.
* Makefile.in: Remove pex-cygwin.[co] lines.
2003-01-24 Zack Weinberg <zack@codesourcery.com> 2003-01-24 Zack Weinberg <zack@codesourcery.com>
* Makefile.in (CFILES): Add pex-*.c. * Makefile.in (CFILES): Add pex-*.c.
......
...@@ -141,7 +141,7 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \ ...@@ -141,7 +141,7 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
memset.c mkstemps.c \ memset.c mkstemps.c \
objalloc.c obstack.c \ objalloc.c obstack.c \
partition.c \ partition.c \
pex-cygwin.c pex-djgpp.c pex-mpw.c pex-msdos.c pex-os2.c \ pex-djgpp.c pex-mpw.c pex-msdos.c pex-os2.c \
pex-unix.c pex-win32.c \ pex-unix.c pex-win32.c \
putenv.c \ putenv.c \
random.c regex.c rename.c rindex.c \ random.c regex.c rename.c rindex.c \
...@@ -184,7 +184,7 @@ CONFIGURED_OFILES = asprintf.o atexit.o \ ...@@ -184,7 +184,7 @@ CONFIGURED_OFILES = asprintf.o atexit.o \
getcwd.o getpagesize.o \ getcwd.o getpagesize.o \
index.o insque.o \ index.o insque.o \
memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o \ memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o \
pex-cygwin.o pex-djgpp.o pex-mpw.o pex-msdos.o pex-os2.o \ pex-djgpp.o pex-mpw.o pex-msdos.o pex-os2.o \
pex-unix.o pex-win32.o \ pex-unix.o pex-win32.o \
putenv.o \ putenv.o \
random.o rename.o rindex.o \ random.o rename.o rindex.o \
...@@ -455,7 +455,6 @@ objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h ...@@ -455,7 +455,6 @@ objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h obstack.o: config.h $(INCDIR)/obstack.h
partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/partition.h $(INCDIR)/partition.h
pex-cygwin.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
pex-djgpp.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h pex-djgpp.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
pex-mpw.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h pex-mpw.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
pex-msdos.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ pex-msdos.o: config.h pex-common.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
......
...@@ -2995,7 +2995,6 @@ fi ...@@ -2995,7 +2995,6 @@ fi
# Figure out which version of pexecute to use. # Figure out which version of pexecute to use.
case "${host}" in case "${host}" in
*-*-cygwin*) pexecute=pex-cygwin.o ;;
*-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;; *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
*-*-msdosdjgpp*) pexecute=pex-djgpp.o ;; *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
*-*-msdos*) pexecute=pex-msdos.o ;; *-*-msdos*) pexecute=pex-msdos.o ;;
...@@ -3004,21 +3003,21 @@ case "${host}" in ...@@ -3004,21 +3003,21 @@ case "${host}" in
esac esac
for ac_hdr in unistd.h for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3012: checking for $ac_hdr" >&5 echo "configure:3011: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3017 "configure" #line 3016 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:3021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -3047,12 +3046,12 @@ done ...@@ -3047,12 +3046,12 @@ done
for ac_func in getpagesize for ac_func in getpagesize
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3051: checking for $ac_func" >&5 echo "configure:3050: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3056 "configure" #line 3055 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -3075,7 +3074,7 @@ $ac_func(); ...@@ -3075,7 +3074,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -3100,7 +3099,7 @@ fi ...@@ -3100,7 +3099,7 @@ fi
done done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:3104: checking for working mmap" >&5 echo "configure:3103: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3108,7 +3107,7 @@ else ...@@ -3108,7 +3107,7 @@ else
ac_cv_func_mmap_fixed_mapped=no ac_cv_func_mmap_fixed_mapped=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3112 "configure" #line 3111 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test. /* Thanks to Mike Haertel and Jim Avera for this test.
...@@ -3136,11 +3135,24 @@ else ...@@ -3136,11 +3135,24 @@ else
#include <fcntl.h> #include <fcntl.h>
#include <sys/mman.h> #include <sys/mman.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
/* This mess was copied from the GNU getpagesize.h. */ /* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE #ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
/* Assume that all systems that can run configure have sys/param.h. */ /* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H # ifndef HAVE_SYS_PARAM_H
...@@ -3248,7 +3260,7 @@ main() ...@@ -3248,7 +3260,7 @@ main()
} }
EOF EOF
if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_mmap_fixed_mapped=yes
else else
...@@ -3272,7 +3284,7 @@ fi ...@@ -3272,7 +3284,7 @@ fi
echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
echo "configure:3276: checking for working strncmp" >&5 echo "configure:3288: checking for working strncmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3280,7 +3292,7 @@ else ...@@ -3280,7 +3292,7 @@ else
ac_cv_func_strncmp_works=no ac_cv_func_strncmp_works=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3284 "configure" #line 3296 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Test by Jim Wilson and Kaveh Ghazi. /* Test by Jim Wilson and Kaveh Ghazi.
...@@ -3344,7 +3356,7 @@ main () ...@@ -3344,7 +3356,7 @@ main ()
} }
EOF EOF
if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_strncmp_works=yes ac_cv_func_strncmp_works=yes
else else
......
...@@ -427,7 +427,6 @@ fi ...@@ -427,7 +427,6 @@ fi
# Figure out which version of pexecute to use. # Figure out which version of pexecute to use.
case "${host}" in case "${host}" in
*-*-cygwin*) pexecute=pex-cygwin.o ;;
*-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;; *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
*-*-msdosdjgpp*) pexecute=pex-djgpp.o ;; *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
*-*-msdos*) pexecute=pex-msdos.o ;; *-*-msdos*) pexecute=pex-msdos.o ;;
......
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Cygwin specialization.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
Libiberty is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "pex-common.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include <process.h>
#include <io.h>
#include <fcntl.h>
#include <signal.h>
extern int _spawnv ();
extern int _spawnvp ();
/* Win32 supports pipes, and Cygwin provides waitpid. */
int
pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
const char *program;
char * const *argv;
const char *this_pname;
const char *temp_base;
char **errmsg_fmt, **errmsg_arg;
int flags;
{
int pid;
int pdes[2], org_stdin, org_stdout;
int input_desc, output_desc;
int retries, sleep_interval;
/* Pipe waiting from last process, to be used as input for the next one.
Value is STDIN_FILE_NO if no pipe is waiting
(i.e. the next command is the first of a group). */
static int last_pipe_input;
/* If this is the first process, initialize. */
if (flags & PEXECUTE_FIRST)
last_pipe_input = STDIN_FILE_NO;
input_desc = last_pipe_input;
/* If this isn't the last process, make a pipe for its output,
and record it as waiting to be the input to the next process. */
if (! (flags & PEXECUTE_LAST))
{
if (_pipe (pdes, 256, O_BINARY) < 0)
{
*errmsg_fmt = "pipe";
*errmsg_arg = NULL;
return -1;
}
output_desc = pdes[WRITE_PORT];
last_pipe_input = pdes[READ_PORT];
}
else
{
/* Last process. */
output_desc = STDOUT_FILE_NO;
last_pipe_input = STDIN_FILE_NO;
}
if (input_desc != STDIN_FILE_NO)
{
org_stdin = dup (STDIN_FILE_NO);
dup2 (input_desc, STDIN_FILE_NO);
close (input_desc);
}
if (output_desc != STDOUT_FILE_NO)
{
org_stdout = dup (STDOUT_FILE_NO);
dup2 (output_desc, STDOUT_FILE_NO);
close (output_desc);
}
pid = (flags & PEXECUTE_SEARCH ? _spawnvp : _spawnv)
(_P_NOWAIT, program, argv);
if (input_desc != STDIN_FILE_NO)
{
dup2 (org_stdin, STDIN_FILE_NO);
close (org_stdin);
}
if (output_desc != STDOUT_FILE_NO)
{
dup2 (org_stdout, STDOUT_FILE_NO);
close (org_stdout);
}
if (pid == -1)
{
*errmsg_fmt = install_error_msg;
*errmsg_arg = program;
return -1;
}
return pid;
}
int
pwait (pid, status, flags)
int pid;
int *status;
int flags ATTRIBUTE_UNUSED;
{
return waitpid (pid, status, 0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment