Commit 89f602a7 by Mumit Khan Committed by Jeff Law

pexecute.c (__CYGWIN32__): Rename to

        * pexecute.c (__CYGWIN32__): Rename to
        (__CYGWIN__): this.
        * xmalloc.c: Likewise.
        Changes to support i386-pc-uwin.
        * configure.in (*-*-uwin*): Workaround for vfork bug.
        * configure: Regenerate.
        * pexecute.c (pexecute): Be like standard Unix.
        (pwait): Likewise.
        * xmalloc.c (first_break): Define.
        (xmalloc_set_program_name): Use.
        (xmalloc): Use.

From-SVN: r25694
parent 926bb5ed
Thu Mar 11 01:22:58 1999 Mumit Khan <khan@xraylith.wisc.edu>
* pexecute.c (__CYGWIN32__): Rename to
(__CYGWIN__): this.
* xmalloc.c: Likewise.
Changes to support i386-pc-uwin.
* configure.in (*-*-uwin*): Workaround for vfork bug.
* configure: Regenerate.
* pexecute.c (pexecute): Be like standard Unix.
(pwait): Likewise.
* xmalloc.c (first_break): Define.
(xmalloc_set_program_name): Use.
(xmalloc): Use.
Thu Mar 11 01:07:55 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> Thu Mar 11 01:07:55 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc * config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc
......
...@@ -1656,12 +1656,19 @@ EOF ...@@ -1656,12 +1656,19 @@ EOF
;; ;;
*-*-uwin*)
# Under some versions of uwin, vfork is notoriously buggy and the test
# can hang configure; on other versions, vfork exists just as a stub.
# FIXME: This should be removed once vfork in uwin's runtime is fixed.
ac_cv_func_vfork_works=no
;;
esac esac
# We haven't set the list of objects yet. Use the standard autoconf # We haven't set the list of objects yet. Use the standard autoconf
# tests. This will only work if the compiler works. # tests. This will only work if the compiler works.
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:1672: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
...@@ -1672,12 +1679,12 @@ cross_compiling=$ac_cv_prog_cc_cross ...@@ -1672,12 +1679,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 1676 "configure" #line 1683 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
...@@ -1703,19 +1710,19 @@ if test $ac_cv_prog_cc_works = no; then ...@@ -1703,19 +1710,19 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1707: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:1714: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
for ac_func in $funcs for ac_func in $funcs
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:1714: checking for $ac_func" >&5 echo "configure:1721: 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 1719 "configure" #line 1726 "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. */
...@@ -1738,7 +1745,7 @@ $ac_func(); ...@@ -1738,7 +1745,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1749: \"$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
...@@ -1767,19 +1774,19 @@ done ...@@ -1767,19 +1774,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless! # for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:1771: checking for working alloca.h" >&5 echo "configure:1778: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+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 1776 "configure" #line 1783 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <alloca.h> #include <alloca.h>
int main() { int main() {
char *p = alloca(2 * sizeof(int)); char *p = alloca(2 * sizeof(int));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_alloca_h=yes ac_cv_header_alloca_h=yes
else else
...@@ -1800,12 +1807,12 @@ EOF ...@@ -1800,12 +1807,12 @@ EOF
fi fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6 echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:1804: checking for alloca" >&5 echo "configure:1811: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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 1809 "configure" #line 1816 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -1833,7 +1840,7 @@ int main() { ...@@ -1833,7 +1840,7 @@ int main() {
char *p = (char *) alloca(1); char *p = (char *) alloca(1);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_func_alloca_works=yes ac_cv_func_alloca_works=yes
else else
...@@ -1865,12 +1872,12 @@ EOF ...@@ -1865,12 +1872,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:1869: checking whether alloca needs Cray hooks" >&5 echo "configure:1876: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_os_cray'+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 1874 "configure" #line 1881 "configure"
#include "confdefs.h" #include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2) #if defined(CRAY) && ! defined(CRAY2)
webecray webecray
...@@ -1895,12 +1902,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 ...@@ -1895,12 +1902,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do for ac_func in _getb67 GETB67 getb67; 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:1899: checking for $ac_func" >&5 echo "configure:1906: 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 1904 "configure" #line 1911 "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. */
...@@ -1923,7 +1930,7 @@ $ac_func(); ...@@ -1923,7 +1930,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1934: \"$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
...@@ -1950,7 +1957,7 @@ done ...@@ -1950,7 +1957,7 @@ done
fi fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:1954: checking stack direction for C alloca" >&5 echo "configure:1961: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1958,7 +1965,7 @@ else ...@@ -1958,7 +1965,7 @@ else
ac_cv_c_stack_direction=0 ac_cv_c_stack_direction=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1962 "configure" #line 1969 "configure"
#include "confdefs.h" #include "confdefs.h"
find_stack_direction () find_stack_direction ()
{ {
...@@ -1977,7 +1984,7 @@ main () ...@@ -1977,7 +1984,7 @@ main ()
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
} }
EOF EOF
if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_c_stack_direction=1 ac_cv_c_stack_direction=1
else else
...@@ -1999,12 +2006,12 @@ EOF ...@@ -1999,12 +2006,12 @@ EOF
fi fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2003: checking for ANSI C header files" >&5 echo "configure:2010: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_stdc'+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 2008 "configure" #line 2015 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -2012,7 +2019,7 @@ else ...@@ -2012,7 +2019,7 @@ else
#include <float.h> #include <float.h>
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:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2023: \"$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*
...@@ -2029,7 +2036,7 @@ rm -f conftest* ...@@ -2029,7 +2036,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2033 "configure" #line 2040 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
EOF EOF
...@@ -2047,7 +2054,7 @@ fi ...@@ -2047,7 +2054,7 @@ fi
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2051 "configure" #line 2058 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
...@@ -2068,7 +2075,7 @@ if test "$cross_compiling" = yes; then ...@@ -2068,7 +2075,7 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2072 "configure" #line 2079 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <ctype.h> #include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
...@@ -2079,7 +2086,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); ...@@ -2079,7 +2086,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
EOF EOF
if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
...@@ -2103,12 +2110,12 @@ EOF ...@@ -2103,12 +2110,12 @@ EOF
fi fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:2107: checking for pid_t" >&5 echo "configure:2114: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_pid_t'+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 2112 "configure" #line 2119 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -2137,17 +2144,17 @@ fi ...@@ -2137,17 +2144,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
echo "configure:2141: checking for vfork.h" >&5 echo "configure:2148: checking for vfork.h" >&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 2146 "configure" #line 2153 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <vfork.h> #include <vfork.h>
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:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2158: \"$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*
...@@ -2172,18 +2179,18 @@ else ...@@ -2172,18 +2179,18 @@ else
fi fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
echo "configure:2176: checking for working vfork" >&5 echo "configure:2183: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6 echo $ac_n "checking for vfork""... $ac_c" 1>&6
echo "configure:2182: checking for vfork" >&5 echo "configure:2189: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vfork'+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 2187 "configure" #line 2194 "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 vfork(); below. */ which can conflict with char vfork(); below. */
...@@ -2206,7 +2213,7 @@ vfork(); ...@@ -2206,7 +2213,7 @@ vfork();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2217: \"$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_vfork=yes" eval "ac_cv_func_vfork=yes"
else else
...@@ -2228,7 +2235,7 @@ fi ...@@ -2228,7 +2235,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork ac_cv_func_vfork_works=$ac_cv_func_vfork
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2232 "configure" #line 2239 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Thanks to Paul Eggert for this test. */ /* Thanks to Paul Eggert for this test. */
#include <stdio.h> #include <stdio.h>
...@@ -2323,7 +2330,7 @@ main() { ...@@ -2323,7 +2330,7 @@ main() {
} }
} }
EOF EOF
if { (eval echo configure:2327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_vfork_works=yes ac_cv_func_vfork_works=yes
else else
...@@ -2350,19 +2357,19 @@ fi ...@@ -2350,19 +2357,19 @@ fi
fi fi
for v in $vars; do for v in $vars; do
echo $ac_n "checking for $v""... $ac_c" 1>&6 echo $ac_n "checking for $v""... $ac_c" 1>&6
echo "configure:2354: checking for $v" >&5 echo "configure:2361: checking for $v" >&5
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then if eval "test \"`echo '$''{'libiberty_cv_var_$v'+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 2359 "configure" #line 2366 "configure"
#include "confdefs.h" #include "confdefs.h"
int *p; int *p;
int main() { int main() {
extern int $v; p = &$v; extern int $v; p = &$v;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "libiberty_cv_var_$v=yes" eval "libiberty_cv_var_$v=yes"
else else
...@@ -2388,12 +2395,12 @@ EOF ...@@ -2388,12 +2395,12 @@ EOF
for ac_func in $checkfuncs for ac_func in $checkfuncs
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:2392: checking for $ac_func" >&5 echo "configure:2399: 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 2397 "configure" #line 2404 "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. */
...@@ -2416,7 +2423,7 @@ $ac_func(); ...@@ -2416,7 +2423,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2427: \"$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
......
...@@ -276,6 +276,13 @@ if test -z "${setobjs}"; then ...@@ -276,6 +276,13 @@ if test -z "${setobjs}"; then
AC_DEFINE(HAVE_SYS_ERRLIST) AC_DEFINE(HAVE_SYS_ERRLIST)
;; ;;
*-*-uwin*)
# Under some versions of uwin, vfork is notoriously buggy and the test
# can hang configure; on other versions, vfork exists just as a stub.
# FIXME: This should be removed once vfork in uwin's runtime is fixed.
ac_cv_func_vfork_works=no
;;
esac esac
# We haven't set the list of objects yet. Use the standard autoconf # We haven't set the list of objects yet. Use the standard autoconf
......
...@@ -230,18 +230,18 @@ pwait (pid, status, flags) ...@@ -230,18 +230,18 @@ pwait (pid, status, flags)
#endif /* MSDOS */ #endif /* MSDOS */
#if defined (_WIN32) #if defined (_WIN32) && ! defined (__UWIN__)
#include <process.h> #include <process.h>
#ifdef __CYGWIN32__ #ifdef __CYGWIN__
#define fix_argv(argvec) (argvec) #define fix_argv(argvec) (argvec)
extern int _spawnv (); extern int _spawnv ();
extern int _spawnvp (); extern int _spawnvp ();
#else /* ! __CYGWIN32__ */ #else /* ! __CYGWIN__ */
/* This is a kludge to get around the Microsoft C spawn functions' propensity /* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguments. */ to remove the outermost set of double quotes from all arguments. */
...@@ -279,7 +279,7 @@ fix_argv (argvec) ...@@ -279,7 +279,7 @@ fix_argv (argvec)
return (const char * const *) argvec; return (const char * const *) argvec;
} }
#endif /* __CYGWIN32__ */ #endif /* __CYGWIN__ */
#include <io.h> #include <io.h>
#include <fcntl.h> #include <fcntl.h>
...@@ -396,7 +396,7 @@ pwait (pid, status, flags) ...@@ -396,7 +396,7 @@ pwait (pid, status, flags)
int *status; int *status;
int flags; int flags;
{ {
#ifdef __CYGWIN32__ #ifdef __CYGWIN__
return wait (status); return wait (status);
#else #else
int termstat; int termstat;
...@@ -416,10 +416,10 @@ pwait (pid, status, flags) ...@@ -416,10 +416,10 @@ pwait (pid, status, flags)
*status = (((termstat) & 0xff) << 8); *status = (((termstat) & 0xff) << 8);
return pid; return pid;
#endif /* __CYGWIN32__ */ #endif /* __CYGWIN__ */
} }
#endif /* _WIN32 */ #endif /* _WIN32 && ! __UWIN__ */
#ifdef OS2 #ifdef OS2
...@@ -602,7 +602,7 @@ pfinish () ...@@ -602,7 +602,7 @@ pfinish ()
/* include for Unix-like environments but not for Dos-like environments */ /* include for Unix-like environments but not for Dos-like environments */
#if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \ #if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \
&& ! defined (_WIN32) && ! (defined (_WIN32) && ! defined (__UWIN__))
extern int execv (); extern int execv ();
extern int execvp (); extern int execvp ();
...@@ -731,4 +731,4 @@ pwait (pid, status, flags) ...@@ -731,4 +731,4 @@ pwait (pid, status, flags)
return pid; return pid;
} }
#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! _WIN32 */ #endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! __UWIN__) */
...@@ -43,22 +43,22 @@ PTR sbrk PARAMS ((ptrdiff_t)); ...@@ -43,22 +43,22 @@ PTR sbrk PARAMS ((ptrdiff_t));
/* The program name if set. */ /* The program name if set. */
static const char *name = ""; static const char *name = "";
#if ! defined (_WIN32) || defined (__CYGWIN32__) #if ! defined (_WIN32) || defined (__CYGWIN__) || defined (__UWIN__)
/* The initial sbrk, set when the program name is set. Not used for win32 /* The initial sbrk, set when the program name is set. Not used for win32
ports other than cygwin32. */ ports other than cygwin32. */
static char *first_break = NULL; static char *first_break = NULL;
#endif #endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
void void
xmalloc_set_program_name (s) xmalloc_set_program_name (s)
const char *s; const char *s;
{ {
name = s; name = s;
#if ! defined (_WIN32) || defined (__CYGWIN32__) #if ! defined (_WIN32) || defined (__CYGWIN__) || defined (__UWIN__)
/* Win32 ports other than cygwin32 don't have brk() */ /* Win32 ports other than cygwin32 don't have brk() */
if (first_break == NULL) if (first_break == NULL)
first_break = (char *) sbrk (0); first_break = (char *) sbrk (0);
#endif /* ! _WIN32 || __CYGWIN32 __ */ #endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
} }
PTR PTR
...@@ -72,7 +72,7 @@ xmalloc (size) ...@@ -72,7 +72,7 @@ xmalloc (size)
newmem = malloc (size); newmem = malloc (size);
if (!newmem) if (!newmem)
{ {
#if ! defined (_WIN32) || defined (__CYGWIN32__) #if ! defined (_WIN32) || defined (__CYGWIN__) || defined (__UWIN__)
extern char **environ; extern char **environ;
size_t allocated; size_t allocated;
...@@ -89,7 +89,7 @@ xmalloc (size) ...@@ -89,7 +89,7 @@ xmalloc (size)
"\n%s%sCan not allocate %lu bytes\n", "\n%s%sCan not allocate %lu bytes\n",
name, *name ? ": " : "", name, *name ? ": " : "",
(unsigned long) size); (unsigned long) size);
#endif /* ! _WIN32 || __CYGWIN32 __ */ #endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
xexit (1); xexit (1);
} }
return (newmem); return (newmem);
...@@ -107,7 +107,7 @@ xcalloc (nelem, elsize) ...@@ -107,7 +107,7 @@ xcalloc (nelem, elsize)
newmem = calloc (nelem, elsize); newmem = calloc (nelem, elsize);
if (!newmem) if (!newmem)
{ {
#if ! defined (_WIN32) || defined (__CYGWIN32__) #if ! defined (_WIN32) || defined (__CYGWIN__)
extern char **environ; extern char **environ;
size_t allocated; size_t allocated;
...@@ -124,7 +124,7 @@ xcalloc (nelem, elsize) ...@@ -124,7 +124,7 @@ xcalloc (nelem, elsize)
"\n%s%sCan not allocate %lu bytes\n", "\n%s%sCan not allocate %lu bytes\n",
name, *name ? ": " : "", name, *name ? ": " : "",
(unsigned long) (nelem * elsize)); (unsigned long) (nelem * elsize));
#endif /* ! _WIN32 || __CYGWIN32 __ */ #endif /* ! _WIN32 || __CYGWIN __ */
xexit (1); xexit (1);
} }
return (newmem); return (newmem);
......
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