libgo: Build stubs for some syscall functions not on older systems.
From-SVN: r183577
This commit is contained in:
parent
0c2f01020d
commit
e02ed81e1b
@ -449,6 +449,7 @@ runtime_files = \
|
||||
runtime/go-now.c \
|
||||
runtime/go-new-map.c \
|
||||
runtime/go-new.c \
|
||||
runtime/go-nosys.c \
|
||||
runtime/go-panic.c \
|
||||
runtime/go-print.c \
|
||||
runtime/go-recover.c \
|
||||
|
@ -201,8 +201,8 @@ am__libgo_la_SOURCES_DIST = runtime/go-append.c runtime/go-assert.c \
|
||||
runtime/go-map-delete.c runtime/go-map-index.c \
|
||||
runtime/go-map-len.c runtime/go-map-range.c \
|
||||
runtime/go-nanotime.c runtime/go-now.c runtime/go-new-map.c \
|
||||
runtime/go-new.c runtime/go-panic.c runtime/go-print.c \
|
||||
runtime/go-recover.c runtime/go-reflect.c \
|
||||
runtime/go-new.c runtime/go-nosys.c runtime/go-panic.c \
|
||||
runtime/go-print.c runtime/go-recover.c runtime/go-reflect.c \
|
||||
runtime/go-reflect-call.c runtime/go-reflect-map.c \
|
||||
runtime/go-rune.c runtime/go-runtime-error.c \
|
||||
runtime/go-setenv.c runtime/go-signal.c runtime/go-strcmp.c \
|
||||
@ -239,8 +239,8 @@ am__objects_4 = go-append.lo go-assert.lo go-assert-interface.lo \
|
||||
go-interface-compare.lo go-interface-eface-compare.lo \
|
||||
go-interface-val-compare.lo go-make-slice.lo go-map-delete.lo \
|
||||
go-map-index.lo go-map-len.lo go-map-range.lo go-nanotime.lo \
|
||||
go-now.lo go-new-map.lo go-new.lo go-panic.lo go-print.lo \
|
||||
go-recover.lo go-reflect.lo go-reflect-call.lo \
|
||||
go-now.lo go-new-map.lo go-new.lo go-nosys.lo go-panic.lo \
|
||||
go-print.lo go-recover.lo go-reflect.lo go-reflect-call.lo \
|
||||
go-reflect-map.lo go-rune.lo go-runtime-error.lo go-setenv.lo \
|
||||
go-signal.lo go-strcmp.lo go-string-to-byte-array.lo \
|
||||
go-string-to-int-array.lo go-strplus.lo go-strslice.lo \
|
||||
@ -872,6 +872,7 @@ runtime_files = \
|
||||
runtime/go-now.c \
|
||||
runtime/go-new-map.c \
|
||||
runtime/go-new.c \
|
||||
runtime/go-nosys.c \
|
||||
runtime/go-panic.c \
|
||||
runtime/go-print.c \
|
||||
runtime/go-recover.c \
|
||||
@ -2551,6 +2552,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-nanotime.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-new-map.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-new.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-nosys.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-now.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-panic.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/go-print.Plo@am__quote@
|
||||
@ -2863,6 +2865,13 @@ go-new.lo: runtime/go-new.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o go-new.lo `test -f 'runtime/go-new.c' || echo '$(srcdir)/'`runtime/go-new.c
|
||||
|
||||
go-nosys.lo: runtime/go-nosys.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT go-nosys.lo -MD -MP -MF $(DEPDIR)/go-nosys.Tpo -c -o go-nosys.lo `test -f 'runtime/go-nosys.c' || echo '$(srcdir)/'`runtime/go-nosys.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/go-nosys.Tpo $(DEPDIR)/go-nosys.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/go-nosys.c' object='go-nosys.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o go-nosys.lo `test -f 'runtime/go-nosys.c' || echo '$(srcdir)/'`runtime/go-nosys.c
|
||||
|
||||
go-panic.lo: runtime/go-panic.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT go-panic.lo -MD -MP -MF $(DEPDIR)/go-panic.Tpo -c -o go-panic.lo `test -f 'runtime/go-panic.c' || echo '$(srcdir)/'`runtime/go-panic.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/go-panic.Tpo $(DEPDIR)/go-panic.Plo
|
||||
|
@ -6,9 +6,33 @@
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `epoll_create1' function. */
|
||||
#undef HAVE_EPOLL_CREATE1
|
||||
|
||||
/* Define to 1 if you have the `faccessat' function. */
|
||||
#undef HAVE_FACCESSAT
|
||||
|
||||
/* Define to 1 if you have the `fchmodat' function. */
|
||||
#undef HAVE_FCHMODAT
|
||||
|
||||
/* Define to 1 if you have the `fchownat' function. */
|
||||
#undef HAVE_FCHOWNAT
|
||||
|
||||
/* Define to 1 if you have the `futimesat' function. */
|
||||
#undef HAVE_FUTIMESAT
|
||||
|
||||
/* Define if _Unwind_GetIPInfo is available. */
|
||||
#undef HAVE_GETIPINFO
|
||||
|
||||
/* Define to 1 if you have the `inotify_add_watch' function. */
|
||||
#undef HAVE_INOTIFY_ADD_WATCH
|
||||
|
||||
/* Define to 1 if you have the `inotify_init' function. */
|
||||
#undef HAVE_INOTIFY_INIT
|
||||
|
||||
/* Define to 1 if you have the `inotify_rm_watch' function. */
|
||||
#undef HAVE_INOTIFY_RM_WATCH
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@ -21,24 +45,42 @@
|
||||
/* Define to 1 if you have the <linux/rtnetlink.h> header file. */
|
||||
#undef HAVE_LINUX_RTNETLINK_H
|
||||
|
||||
/* Define to 1 if the system has the type `loff_t'. */
|
||||
#undef HAVE_LOFF_T
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mincore' function. */
|
||||
#undef HAVE_MINCORE
|
||||
|
||||
/* Define to 1 if you have the `mkdirat' function. */
|
||||
#undef HAVE_MKDIRAT
|
||||
|
||||
/* Define to 1 if you have the `mknodat' function. */
|
||||
#undef HAVE_MKNODAT
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if the system has the type `off64_t'. */
|
||||
#undef HAVE_OFF64_T
|
||||
|
||||
/* Define to 1 if you have the `openat' function. */
|
||||
#undef HAVE_OPENAT
|
||||
|
||||
/* Define to 1 if you have the `renameat' function. */
|
||||
#undef HAVE_RENAMEAT
|
||||
|
||||
/* Define to 1 if you have the `sem_timedwait' function. */
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define to 1 if you have the `splice' function. */
|
||||
#undef HAVE_SPLICE
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
@ -101,9 +143,18 @@
|
||||
/* Define to 1 if you have the <sys/utsname.h> header file. */
|
||||
#undef HAVE_SYS_UTSNAME_H
|
||||
|
||||
/* Define to 1 if you have the `tee' function. */
|
||||
#undef HAVE_TEE
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `unlinkat' function. */
|
||||
#undef HAVE_UNLINKAT
|
||||
|
||||
/* Define to 1 if you have the `unshare' function. */
|
||||
#undef HAVE_UNSHARE
|
||||
|
||||
/* Define to 1 if you have the `wait4' function. */
|
||||
#undef HAVE_WAIT4
|
||||
|
||||
|
860
libgo/configure
vendored
860
libgo/configure
vendored
@ -678,7 +678,6 @@ WARN_FLAGS
|
||||
CC_FOR_BUILD
|
||||
enable_static
|
||||
enable_shared
|
||||
CPP
|
||||
OTOOL64
|
||||
OTOOL
|
||||
LIPO
|
||||
@ -695,9 +694,10 @@ OBJCOPY
|
||||
RANLIB
|
||||
LD
|
||||
FGREP
|
||||
SED
|
||||
EGREP
|
||||
GREP
|
||||
SED
|
||||
CPP
|
||||
MAINT
|
||||
MAINTAINER_MODE_FALSE
|
||||
MAINTAINER_MODE_TRUE
|
||||
@ -1591,83 +1591,6 @@ fi
|
||||
|
||||
} # ac_fn_c_try_compile
|
||||
|
||||
# ac_fn_c_try_link LINENO
|
||||
# -----------------------
|
||||
# Try to link conftest.$ac_ext, and return whether this succeeded.
|
||||
ac_fn_c_try_link ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { { ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_link") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
grep -v '^ *+' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
mv -f conftest.er1 conftest.err
|
||||
fi
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext && {
|
||||
test "$cross_compiling" = yes ||
|
||||
$as_test_x conftest$ac_exeext
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_retval=1
|
||||
fi
|
||||
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
|
||||
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
|
||||
# interfere with the next link command; also delete a directory that is
|
||||
# left behind by Apple's compiler. We do this before executing the actions.
|
||||
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
return $ac_retval
|
||||
|
||||
} # ac_fn_c_try_link
|
||||
|
||||
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
|
||||
# -------------------------------------------------------
|
||||
# Tests whether HEADER exists and can be compiled using the include files in
|
||||
# INCLUDES, setting the cache variable VAR accordingly.
|
||||
ac_fn_c_check_header_compile ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
eval "$3=yes"
|
||||
else
|
||||
eval "$3=no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
|
||||
} # ac_fn_c_check_header_compile
|
||||
|
||||
# ac_fn_c_try_cpp LINENO
|
||||
# ----------------------
|
||||
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
|
||||
@ -1747,6 +1670,83 @@ fi
|
||||
|
||||
} # ac_fn_c_try_run
|
||||
|
||||
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
|
||||
# -------------------------------------------------------
|
||||
# Tests whether HEADER exists and can be compiled using the include files in
|
||||
# INCLUDES, setting the cache variable VAR accordingly.
|
||||
ac_fn_c_check_header_compile ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
eval "$3=yes"
|
||||
else
|
||||
eval "$3=no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
|
||||
} # ac_fn_c_check_header_compile
|
||||
|
||||
# ac_fn_c_try_link LINENO
|
||||
# -----------------------
|
||||
# Try to link conftest.$ac_ext, and return whether this succeeded.
|
||||
ac_fn_c_try_link ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { { ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_link") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
grep -v '^ *+' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
mv -f conftest.er1 conftest.err
|
||||
fi
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext && {
|
||||
test "$cross_compiling" = yes ||
|
||||
$as_test_x conftest$ac_exeext
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_retval=1
|
||||
fi
|
||||
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
|
||||
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
|
||||
# interfere with the next link command; also delete a directory that is
|
||||
# left behind by Apple's compiler. We do this before executing the actions.
|
||||
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
return $ac_retval
|
||||
|
||||
} # ac_fn_c_try_link
|
||||
|
||||
# ac_fn_c_check_func LINENO FUNC VAR
|
||||
# ----------------------------------
|
||||
# Tests whether FUNC exists, setting the cache variable VAR accordingly
|
||||
@ -4347,86 +4347,143 @@ fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
|
||||
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
|
||||
if test "${ac_cv_path_SED+set}" = set; then :
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
|
||||
$as_echo_n "checking how to run the C preprocessor... " >&6; }
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
fi
|
||||
if test -z "$CPP"; then
|
||||
if test "${ac_cv_prog_CPP+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
|
||||
for ac_i in 1 2 3 4 5 6 7; do
|
||||
ac_script="$ac_script$as_nl$ac_script"
|
||||
done
|
||||
echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
|
||||
{ ac_script=; unset ac_script;}
|
||||
if test -z "$SED"; then
|
||||
ac_path_SED_found=false
|
||||
# Loop through the user's path and test for each of PROGNAME-LIST
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
# Double quotes because CPP needs to be expanded
|
||||
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
|
||||
do
|
||||
ac_preproc_ok=false
|
||||
for ac_c_preproc_warn_flag in '' yes
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_prog in sed gsed; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
|
||||
{ test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
|
||||
# Check for GNU ac_path_SED and select it if it is found.
|
||||
# Check for GNU $ac_path_SED
|
||||
case `"$ac_path_SED" --version 2>&1` in
|
||||
*GNU*)
|
||||
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
|
||||
*)
|
||||
ac_count=0
|
||||
$as_echo_n 0123456789 >"conftest.in"
|
||||
while :
|
||||
do
|
||||
cat "conftest.in" "conftest.in" >"conftest.tmp"
|
||||
mv "conftest.tmp" "conftest.in"
|
||||
cp "conftest.in" "conftest.nl"
|
||||
$as_echo '' >> "conftest.nl"
|
||||
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
|
||||
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
|
||||
as_fn_arith $ac_count + 1 && ac_count=$as_val
|
||||
if test $ac_count -gt ${ac_path_SED_max-0}; then
|
||||
# Best one so far, save it but keep looking for a better one
|
||||
ac_cv_path_SED="$ac_path_SED"
|
||||
ac_path_SED_max=$ac_count
|
||||
fi
|
||||
# 10*(2^10) chars as input seems more than enough
|
||||
test $ac_count -gt 10 && break
|
||||
done
|
||||
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
|
||||
esac
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
|
||||
$ac_path_SED_found && break 3
|
||||
done
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
if test -z "$ac_cv_path_SED"; then
|
||||
as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
ac_cv_path_SED=$SED
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
ac_cv_prog_CPP=$CPP
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
|
||||
$as_echo "$ac_cv_path_SED" >&6; }
|
||||
SED="$ac_cv_path_SED"
|
||||
rm -f conftest.sed
|
||||
|
||||
test -z "$SED" && SED=sed
|
||||
Xsed="$SED -e 1s/^X//"
|
||||
|
||||
|
||||
|
||||
|
||||
CPP=$ac_cv_prog_CPP
|
||||
else
|
||||
ac_cv_prog_CPP=$CPP
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
|
||||
$as_echo "$CPP" >&6; }
|
||||
ac_preproc_ok=false
|
||||
for ac_c_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error "C preprocessor \"$CPP\" fails sanity check
|
||||
See \`config.log' for more details." "$LINENO" 5; }
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
|
||||
@ -4559,6 +4616,220 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
|
||||
EGREP="$ac_cv_path_EGREP"
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
|
||||
$as_echo_n "checking for ANSI C header files... " >&6; }
|
||||
if test "${ac_cv_header_stdc+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_header_stdc=yes
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <string.h>
|
||||
|
||||
_ACEOF
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "memchr" >/dev/null 2>&1; then :
|
||||
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
|
||||
_ACEOF
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "free" >/dev/null 2>&1; then :
|
||||
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
||||
if test "$cross_compiling" = yes; then :
|
||||
:
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#if ((' ' & 0x0FF) == 0x020)
|
||||
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
|
||||
#else
|
||||
# define ISLOWER(c) \
|
||||
(('a' <= (c) && (c) <= 'i') \
|
||||
|| ('j' <= (c) && (c) <= 'r') \
|
||||
|| ('s' <= (c) && (c) <= 'z'))
|
||||
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
|
||||
#endif
|
||||
|
||||
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 256; i++)
|
||||
if (XOR (islower (i), ISLOWER (i))
|
||||
|| toupper (i) != TOUPPER (i))
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
|
||||
$as_echo "$ac_cv_header_stdc" >&6; }
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
|
||||
$as_echo "#define STDC_HEADERS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
|
||||
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
|
||||
"
|
||||
eval as_val=\$$as_ac_Header
|
||||
if test "x$as_val" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
$ac_includes_default
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
|
||||
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
|
||||
if test "${ac_cv_path_SED+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
|
||||
for ac_i in 1 2 3 4 5 6 7; do
|
||||
ac_script="$ac_script$as_nl$ac_script"
|
||||
done
|
||||
echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
|
||||
{ ac_script=; unset ac_script;}
|
||||
if test -z "$SED"; then
|
||||
ac_path_SED_found=false
|
||||
# Loop through the user's path and test for each of PROGNAME-LIST
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_prog in sed gsed; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
|
||||
{ test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
|
||||
# Check for GNU ac_path_SED and select it if it is found.
|
||||
# Check for GNU $ac_path_SED
|
||||
case `"$ac_path_SED" --version 2>&1` in
|
||||
*GNU*)
|
||||
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
|
||||
*)
|
||||
ac_count=0
|
||||
$as_echo_n 0123456789 >"conftest.in"
|
||||
while :
|
||||
do
|
||||
cat "conftest.in" "conftest.in" >"conftest.tmp"
|
||||
mv "conftest.tmp" "conftest.in"
|
||||
cp "conftest.in" "conftest.nl"
|
||||
$as_echo '' >> "conftest.nl"
|
||||
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
|
||||
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
|
||||
as_fn_arith $ac_count + 1 && ac_count=$as_val
|
||||
if test $ac_count -gt ${ac_path_SED_max-0}; then
|
||||
# Best one so far, save it but keep looking for a better one
|
||||
ac_cv_path_SED="$ac_path_SED"
|
||||
ac_path_SED_max=$ac_count
|
||||
fi
|
||||
# 10*(2^10) chars as input seems more than enough
|
||||
test $ac_count -gt 10 && break
|
||||
done
|
||||
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
|
||||
esac
|
||||
|
||||
$ac_path_SED_found && break 3
|
||||
done
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
if test -z "$ac_cv_path_SED"; then
|
||||
as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
ac_cv_path_SED=$SED
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
|
||||
$as_echo "$ac_cv_path_SED" >&6; }
|
||||
SED="$ac_cv_path_SED"
|
||||
rm -f conftest.sed
|
||||
|
||||
test -z "$SED" && SED=sed
|
||||
Xsed="$SED -e 1s/^X//"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
|
||||
$as_echo_n "checking for fgrep... " >&6; }
|
||||
if test "${ac_cv_path_FGREP+set}" = set; then :
|
||||
@ -6426,7 +6697,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-libtool-lock was given.
|
||||
@ -7250,274 +7520,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
|
||||
;;
|
||||
esac
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
|
||||
$as_echo_n "checking how to run the C preprocessor... " >&6; }
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
fi
|
||||
if test -z "$CPP"; then
|
||||
if test "${ac_cv_prog_CPP+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
# Double quotes because CPP needs to be expanded
|
||||
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
|
||||
do
|
||||
ac_preproc_ok=false
|
||||
for ac_c_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
ac_cv_prog_CPP=$CPP
|
||||
|
||||
fi
|
||||
CPP=$ac_cv_prog_CPP
|
||||
else
|
||||
ac_cv_prog_CPP=$CPP
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
|
||||
$as_echo "$CPP" >&6; }
|
||||
ac_preproc_ok=false
|
||||
for ac_c_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error "C preprocessor \"$CPP\" fails sanity check
|
||||
See \`config.log' for more details." "$LINENO" 5; }
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
|
||||
$as_echo_n "checking for ANSI C header files... " >&6; }
|
||||
if test "${ac_cv_header_stdc+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_header_stdc=yes
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <string.h>
|
||||
|
||||
_ACEOF
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "memchr" >/dev/null 2>&1; then :
|
||||
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdlib.h>
|
||||
|
||||
_ACEOF
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "free" >/dev/null 2>&1; then :
|
||||
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
||||
if test "$cross_compiling" = yes; then :
|
||||
:
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#if ((' ' & 0x0FF) == 0x020)
|
||||
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
|
||||
#else
|
||||
# define ISLOWER(c) \
|
||||
(('a' <= (c) && (c) <= 'i') \
|
||||
|| ('j' <= (c) && (c) <= 'r') \
|
||||
|| ('s' <= (c) && (c) <= 'z'))
|
||||
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
|
||||
#endif
|
||||
|
||||
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 256; i++)
|
||||
if (XOR (islower (i), ISLOWER (i))
|
||||
|| toupper (i) != TOUPPER (i))
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
|
||||
else
|
||||
ac_cv_header_stdc=no
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
|
||||
$as_echo "$ac_cv_header_stdc" >&6; }
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
|
||||
$as_echo "#define STDC_HEADERS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
|
||||
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
|
||||
"
|
||||
eval as_val=\$$as_ac_Header
|
||||
if test "x$as_val" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
for ac_header in dlfcn.h
|
||||
do :
|
||||
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
|
||||
@ -11099,7 +11101,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11102 "configure"
|
||||
#line 11104 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -11205,7 +11207,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11208 "configure"
|
||||
#line 11210 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -14578,6 +14580,30 @@ else
|
||||
fi
|
||||
|
||||
|
||||
for ac_func in epoll_create1 faccessat fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_rm_watch mkdirat mknodat openat renameat splice tee unlinkat unshare
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
eval as_val=\$$as_ac_var
|
||||
if test "x$as_val" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
|
||||
if test "x$ac_cv_type_loff_t" = x""yes; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LOFF_T 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
CFLAGS_hold="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS_hold="$LIBS"
|
||||
|
@ -33,6 +33,8 @@ AC_SUBST(CFLAGS)
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_INCLUDES_DEFAULT
|
||||
|
||||
AC_PROG_LD
|
||||
AC_PROG_RANLIB
|
||||
AC_CHECK_TOOL(OBJCOPY, objcopy, missing-objcopy)
|
||||
@ -465,6 +467,9 @@ AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv)
|
||||
AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes)
|
||||
AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes)
|
||||
|
||||
AC_CHECK_FUNCS(epoll_create1 faccessat fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_rm_watch mkdirat mknodat openat renameat splice tee unlinkat unshare)
|
||||
AC_CHECK_TYPES([loff_t])
|
||||
|
||||
CFLAGS_hold="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
LIBS_hold="$LIBS"
|
||||
@ -519,7 +524,7 @@ AC_SUBST(STRINGOPS_FLAG)
|
||||
|
||||
CFLAGS_hold=$CFLAGS
|
||||
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
|
||||
AC_CHECK_TYPES(off64_t)
|
||||
AC_CHECK_TYPES([off64_t])
|
||||
CFLAGS=$CFLAGS_hold
|
||||
|
||||
dnl Work out the size of the epoll_events struct on GNU/Linux.
|
||||
|
192
libgo/runtime/go-nosys.c
Normal file
192
libgo/runtime/go-nosys.c
Normal file
@ -0,0 +1,192 @@
|
||||
/* go-nosys.c -- functions missing from system.
|
||||
|
||||
Copyright 2012 The Go Authors. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style
|
||||
license that can be found in the LICENSE file. */
|
||||
|
||||
/* This file exists to provide definitions for functions that are
|
||||
missing from libc, according to the configure script. This permits
|
||||
the Go syscall package to not worry about whether the functions
|
||||
exist or not. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef HAVE_OFF64_T
|
||||
typedef signed int off64_t __attribute__ ((mode (DI)));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LOFF_T
|
||||
typedef off64_t loff_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_EPOLL_CREATE1
|
||||
int
|
||||
epoll_create1 (int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FACCESSAT
|
||||
int
|
||||
faccessat (int fd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
int mode __attribute__ ((unused)),
|
||||
int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FCHMODAT
|
||||
int
|
||||
fchmodat (int dirfd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
mode_t mode __attribute__ ((unused)),
|
||||
int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FCHOWNAT
|
||||
int
|
||||
fchownat (int dirfd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
uid_t owner __attribute__ ((unused)),
|
||||
gid_t group __attribute__ ((unused)),
|
||||
int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FUTIMESAT
|
||||
int
|
||||
futimesat (int dirfd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
const struct timeval times[2] __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INOTIFY_ADD_WATCH
|
||||
int
|
||||
inotify_add_watch (int fd __attribute__ ((unused)),
|
||||
const char* pathname __attribute__ ((unused)),
|
||||
uint32_t mask __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INOTIFY_INIT
|
||||
int
|
||||
inotify_init (void)
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INOTIFY_RM_WATCH
|
||||
int
|
||||
inotify_rm_watch (int fd __attribute__ ((unused)),
|
||||
uint32_t wd __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MKDIRAT
|
||||
int
|
||||
mkdirat (int dirfd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
mode_t mode __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MKNODAT
|
||||
int
|
||||
mknodat (int dirfd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
mode_t mode __attribute__ ((unused)),
|
||||
dev_t dev __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_OPENAT
|
||||
int
|
||||
openat (int dirfd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
int oflag __attribute__ ((unused)),
|
||||
...)
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_RENAMEAT
|
||||
int
|
||||
renameat (int olddirfd __attribute__ ((unused)),
|
||||
const char *oldpath __attribute__ ((unused)),
|
||||
int newdirfd __attribute__ ((unused)),
|
||||
const char *newpath __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SPLICE
|
||||
int
|
||||
splice (int fd __attribute__ ((unused)),
|
||||
loff_t *off_in __attribute__ ((unused)),
|
||||
int fd_out __attribute__ ((unused)),
|
||||
loff_t *off_out __attribute__ ((unused)),
|
||||
size_t len __attribute__ ((unused)),
|
||||
unsigned int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TEE
|
||||
int
|
||||
tee (int fd_in __attribute__ ((unused)),
|
||||
int fd_out __attribute__ ((unused)),
|
||||
size_t len __attribute__ ((unused)),
|
||||
unsigned int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UNLINKAT
|
||||
int
|
||||
unlinkat (int dirfd __attribute__ ((unused)),
|
||||
const char *pathname __attribute__ ((unused)),
|
||||
int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UNSHARE
|
||||
int
|
||||
unshare (int flags __attribute__ ((unused)))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user