+1999-05-26 Ulrich Drepper <drepper@cygnus.com>
+
+ * config.h.in: Add __LINUX_KERNEL_VERSION.
+ * configure.in: Recognize --enable-kernel.
+ * sysdeps/unix/sysv/linux/configure.in: Check for correct kernel
+ headers if --enable-kernel is given and set __LINUX_KERNEL_VERSION
+ appropriately.
+ * sysdeps/unix/sysv/linux/init-first.c: If minimal kernel version is
+ given perform runtime test.
+
+ * sysdeps/unix/sysv/linux/kernel-features.h: New file.
+ * sysdeps/unix/sysv/linux/getcwd.c: Elide compatibility code if
+ minimal supported kernel is known to have the feature.
+ * sysdeps/unix/sysv/linux/poll.c: Likewise.
+ * sysdeps/unix/sysv/linux/pread.c: Likewise.
+ * sysdeps/unix/sysv/linux/pread64.c: Likewise.
+ * sysdeps/unix/sysv/linux/pwrite.c: Likewise.
+ * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
+ * sysdeps/unix/sysv/linux/seteuid.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigaction.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
+ * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
+ * sysdeps/unix/sysv/linux/testrtsig.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/chown.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/pread.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/pread64.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/pwrite.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/pwrite64.c: Likewise.
+
+ * sysdeps/unix/sysv/linux/sysctl.c: Add __sysctl alias.
+
1999-05-25 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/getcwd.c (__getcwd): Fix potential memory leaks.
# define internal_function __attribute__ ((regparm (3), stdcall))
#endif
+/* Linux specific: minimum supported kernel version. */
+#undef __LINUX_KERNEL_VERSION
+
/*
\f */
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
+# Generated automatically using autoconf version 2.14.1
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
ac_help="$ac_help
--disable-force-install don't force installation of files from this package,
even if they are older than the installed files"
+ac_help="$ac_help
+ --enable-kernel=VERSION compile for copmatibility with kernel not older
+ than VERSION"
# Initialize some variables set by options.
# The variables have the same names as the options, with
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
+ echo "configure generated by autoconf version 2.14.1"
exit 0 ;;
-with-* | --with-*)
if test -r "$cache_file"; then
echo "loading cache $cache_file"
- . $cache_file
+ test -f "$cache_file" && . $cache_file
else
echo "creating cache $cache_file"
> $cache_file
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in scripts $srcdir/scripts" 1>&2; exit 1; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# This will get text that should go into config.make.
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+# Check whether --enable-kernel or --disable-kernel was given.
+if test "${enable_kernel+set}" = set; then
+ enableval="$enable_kernel"
+ minimum_kernel=$enableval
fi
+
+
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:804: checking host system type" >&5
+echo "configure:809: checking host system type" >&5
+if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
+ ac_cv_host_alias=$host
+ case "$ac_cv_host_alias" in
NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
+ case $nonopt in
+ NONE)
+ if ac_cv_host_alias=`$ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) ac_cv_host_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
+ ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_host" 1>&6
+
+host=$ac_cv_host
+host_alias=$ac_cv_host_alias
+host_cpu=$ac_cv_host_cpu
+host_vendor=$ac_cv_host_vendor
+host_os=$ac_cv_host_os
+
+
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
# The way shlib-versions is used to generate soversions.mk uses a
# This can take a while to compute.
sysdep_dir=$srcdir/sysdeps
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
-echo "configure:929: checking sysdep dirs" >&5
+echo "configure:953: checking sysdep dirs" >&5
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1131: checking for a BSD compatible install" >&5
+echo "configure:1155: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+if eval "test \"\${ac_cv_path_install+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
INSTALL='\$(..)./install-sh -c'
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1188: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+echo "configure:1216: checking whether ln -s works" >&5
+if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftestdata
# These programs are version sensitive.
+
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1211: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+echo "configure:1240: checking build system type" >&5
+if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_build_alias=$build
+ case "$ac_cv_build_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ ac_cv_build_alias=$host_alias ;;
+
+ *) ac_cv_build_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
+ ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_build" 1>&6
+
+build=$ac_cv_build
+build_alias=$ac_cv_build_alias
+build_cpu=$ac_cv_build_cpu
+build_vendor=$ac_cv_build_vendor
+build_os=$ac_cv_build_os
+
+
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
if test $host != $build; then
ac_tool_prefix=${host_alias}-
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1239: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+echo "configure:1289: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
else
# Found it, now check the version.
echo $ac_n "checking version of $CC""... $ac_c" 1>&6
-echo "configure:1273: checking version of $CC" >&5
+echo "configure:1323: checking version of $CC" >&5
ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustp-]*[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
+echo "configure:1343: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_MAKE+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$MAKE"; then
else
# Found it, now check the version.
echo $ac_n "checking version of $MAKE""... $ac_c" 1>&6
-echo "configure:1327: checking version of $MAKE" >&5
+echo "configure:1377: checking version of $MAKE" >&5
ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*version \([0-9][0-9.]*\), by.*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1348: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
+echo "configure:1398: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_MSGFMT+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$MSGFMT"; then
else
# Found it, now check the version.
echo $ac_n "checking version of $MSGFMT""... $ac_c" 1>&6
-echo "configure:1382: checking version of $MSGFMT" >&5
+echo "configure:1432: checking version of $MSGFMT" >&5
ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1402: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
+echo "configure:1452: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_MAKEINFO+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$MAKEINFO"; then
else
# Found it, now check the version.
echo $ac_n "checking version of $MAKEINFO""... $ac_c" 1>&6
-echo "configure:1436: checking version of $MAKEINFO" >&5
+echo "configure:1486: checking version of $MAKEINFO" >&5
ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1465: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then
+echo "configure:1515: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+if eval "test \"\${ac_cv_prog_cc_works+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext << EOF
-#line 1479 "configure"
+#line 1529 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
cross_linkable=yes
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1515: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_cross'+set}'`\" = set"; then
+echo "configure:1565: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+if eval "test \"\${ac_cv_prog_cc_cross+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
:
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1527: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+echo "configure:1577: checking whether we are using GNU C" >&5
+if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
{ echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
fi
+
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1549: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
+echo "configure:1600: checking build system type" >&5
+if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_build_alias=$build
+ case "$ac_cv_build_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ ac_cv_build_alias=$host_alias ;;
+
+ *) ac_cv_build_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
+ ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_build" 1>&6
+
+build=$ac_cv_build
+build_alias=$ac_cv_build_alias
+build_cpu=$ac_cv_build_cpu
+build_vendor=$ac_cv_build_vendor
+build_os=$ac_cv_build_os
+
+
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
if test $host != $build; then
for ac_prog in gcc cc
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1572: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
+echo "configure:1644: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_BUILD_CC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$BUILD_CC"; then
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1604: checking how to run the C preprocessor" >&5
+echo "configure:1676: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1619 "configure"
+#line 1691 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1636 "configure"
+#line 1708 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1653 "configure"
+#line 1725 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1702: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+echo "configure:1774: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1734: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+echo "configure:1806: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
# Determine whether we are using GNU binutils.
echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6
-echo "configure:1771: checking whether $AS is GNU as" >&5
-if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then
+echo "configure:1843: checking whether $AS is GNU as" >&5
+if eval "test \"\${libc_cv_prog_as_gnu+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Most GNU programs take a -v and spit out some text including
gnu_as=$libc_cv_prog_as_gnu
echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6
-echo "configure:1790: checking whether $LD is GNU ld" >&5
-if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then
+echo "configure:1862: checking whether $LD is GNU ld" >&5
+if eval "test \"\${libc_cv_prog_ld_gnu+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Most GNU programs take a -v and spit out some text including
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
set dummy ${ac_tool_prefix}mig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1810: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
+echo "configure:1882: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_MIG+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$MIG"; then
# check if ranlib is necessary
echo $ac_n "checking whether ranlib is necessary""... $ac_c" 1>&6
-echo "configure:1851: checking whether ranlib is necessary" >&5
-if eval "test \"`echo '$''{'libc_cv_ranlib_necessary'+set}'`\" = set"; then
+echo "configure:1923: checking whether ranlib is necessary" >&5
+if eval "test \"\${libc_cv_ranlib_necessary+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking LD_LIBRARY_PATH variable""... $ac_c" 1>&6
-echo "configure:1885: checking LD_LIBRARY_PATH variable" >&5
+echo "configure:1957: checking LD_LIBRARY_PATH variable" >&5
case ${LD_LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
ld_library_path_setting="contains current directory"
# Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1905: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
+echo "configure:1977: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_BASH+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$BASH" in
# Extract the first word of "ksh", so it can be a program name with args.
set dummy ksh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1951: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
+echo "configure:2023: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_KSH+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$KSH" in
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2001: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+echo "configure:2073: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AWK"; then
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2033: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+echo "configure:2105: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_PERL+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PERL" in
# Extract the first word of "install-info", so it can be a program name with args.
set dummy install-info; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2070: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_INSTALL_INFO'+set}'`\" = set"; then
+echo "configure:2142: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_INSTALL_INFO+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$INSTALL_INFO" in
if test "$INSTALL_INFO" != "no"; then
echo $ac_n "checking for old Debian install-info""... $ac_c" 1>&6
-echo "configure:2106: checking for old Debian install-info" >&5
-if eval "test \"`echo '$''{'libc_cv_old_debian_install_info'+set}'`\" = set"; then
+echo "configure:2178: checking for old Debian install-info" >&5
+if eval "test \"\${libc_cv_old_debian_install_info+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
mkdir conftest.d
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
-echo "configure:2139: checking for signed size_t type" >&5
-if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
+echo "configure:2211: checking for signed size_t type" >&5
+if eval "test \"\${libc_cv_signed_size_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo '#include <stddef.h>
fi
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
-echo "configure:2163: checking for libc-friendly stddef.h" >&5
-if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
+echo "configure:2235: checking for libc-friendly stddef.h" >&5
+if eval "test \"\${libc_cv_friendly_stddef+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2168 "configure"
+#line 2240 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
-if { (eval echo configure:2183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
fi
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
-echo "configure:2202: checking whether we need to use -P to assemble .S files" >&5
-if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
+echo "configure:2274: checking whether we need to use -P to assemble .S files" >&5
+if eval "test \"\${libc_cv_need_minus_P+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.S <<EOF
fi
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
-echo "configure:2225: checking for assembler global-symbol directive" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
+echo "configure:2297: checking for assembler global-symbol directive" >&5
+if eval "test \"\${libc_cv_asm_global_directive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
libc_cv_asm_global_directive=UNKNOWN
fi
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
-echo "configure:2255: checking for .set assembler directive" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
+echo "configure:2327: checking for .set assembler directive" >&5
+if eval "test \"\${libc_cv_asm_set_directive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
fi
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
-echo "configure:2289: checking for .symver assembler directive" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
+echo "configure:2361: checking for .symver assembler directive" >&5
+if eval "test \"\${libc_cv_asm_symver_directive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
-echo "configure:2308: checking for ld --version-script" >&5
-if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
+echo "configure:2380: checking for ld --version-script" >&5
+if eval "test \"\${libc_cv_ld_version_script_option+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $libc_cv_asm_symver_directive = yes; then
if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
-nostartfiles -nostdlib
-Wl,--version-script,conftest.map
- 1>&5'; { (eval echo configure:2331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
+ 1>&5'; { (eval echo configure:2403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_ld_version_script_option=yes
else
fi
if test $elf = yes; then
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
-echo "configure:2369: checking for .previous assembler directive" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
+echo "configure:2441: checking for .previous assembler directive" >&5
+if eval "test \"\${libc_cv_asm_previous_directive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
.section foo_section
.previous
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_previous_directive=yes
else
libc_cv_asm_previous_directive=no
else
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
-echo "configure:2393: checking for .popsection assembler directive" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
+echo "configure:2465: checking for .popsection assembler directive" >&5
+if eval "test \"\${libc_cv_asm_popsection_directive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
.pushsection foo_section
.popsection
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_popsection_directive=yes
else
libc_cv_asm_popsection_directive=no
if test $elf != yes; then
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
-echo "configure:2421: checking for .init and .fini sections" >&5
-if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
+echo "configure:2493: checking for .init and .fini sections" >&5
+if eval "test \"\${libc_cv_have_initfini+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2426 "configure"
+#line 2498 "configure"
#include "confdefs.h"
int main() {
asm (".text");
; return 0; }
EOF
-if { (eval echo configure:2435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
else
if test $ac_cv_prog_cc_works = yes; then
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
-echo "configure:2463: checking for _ prefix on C symbol names" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
+echo "configure:2535: checking for _ prefix on C symbol names" >&5
+if eval "test \"\${libc_cv_asm_underscores+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2468 "configure"
+#line 2540 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() {
glibc_foobar ();
; return 0; }
EOF
-if { (eval echo configure:2475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
echo "$ac_t""$libc_cv_asm_underscores" 1>&6
else
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
-echo "configure:2490: checking for _ prefix on C symbol names" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
+echo "configure:2562: checking for _ prefix on C symbol names" >&5
+if eval "test \"\${libc_cv_asm_underscores+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2495 "configure"
+#line 2567 "configure"
#include "confdefs.h"
void underscore_test(void) {
return; }
EOF
-if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if grep _underscore_test conftest* >/dev/null; then
rm -f conftest*
libc_cv_asm_underscores=yes
fi
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
-echo "configure:2532: checking for assembler .weak directive" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
+echo "configure:2604: checking for assembler .weak directive" >&5
+if eval "test \"\${libc_cv_asm_weak_directive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
if test $libc_cv_asm_weak_directive = no; then
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
-echo "configure:2555: checking for assembler .weakext directive" >&5
-if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
+echo "configure:2627: checking for assembler .weakext directive" >&5
+if eval "test \"\${libc_cv_asm_weakext_directive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
fi
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
-echo "configure:2593: checking for ld --no-whole-archive" >&5
-if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
+echo "configure:2665: checking for ld --no-whole-archive" >&5
+if eval "test \"\${libc_cv_ld_no_whole_archive+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
- -o conftest conftest.c 1>&5'; { (eval echo configure:2604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_ld_no_whole_archive=yes
else
libc_cv_ld_no_whole_archive=no
fi
echo $ac_n "checking for gcc -fexceptions""... $ac_c" 1>&6
-echo "configure:2618: checking for gcc -fexceptions" >&5
-if eval "test \"`echo '$''{'libc_cv_gcc_exceptions'+set}'`\" = set"; then
+echo "configure:2690: checking for gcc -fexceptions" >&5
+if eval "test \"\${libc_cv_gcc_exceptions+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fexceptions
- -o conftest conftest.c 1>&5'; { (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_exceptions=yes
else
libc_cv_gcc_exceptions=no
if test "$base_machine" = alpha ; then
echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6
-echo "configure:2644: checking for function ..ng prefix" >&5
-if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then
+echo "configure:2716: checking for function ..ng prefix" >&5
+if eval "test \"\${libc_cv_gcc_alpha_ng_prefix+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
foo () { }
EOF
-if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
+if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_gcc_alpha_ng_prefix=yes
else
# Check for a bug present in at least versions 2.8.x of GCC
# and versions 1.0.x of EGCS.
echo $ac_n "checking whether clobbering cr0 causes problems""... $ac_c" 1>&6
-echo "configure:2678: checking whether clobbering cr0 causes problems" >&5
-if eval "test \"`echo '$''{'libc_cv_c_asmcr0_bug'+set}'`\" = set"; then
+echo "configure:2750: checking whether clobbering cr0 causes problems" >&5
+if eval "test \"\${libc_cv_c_asmcr0_bug+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2683 "configure"
+#line 2755 "configure"
#include "confdefs.h"
int tester(int x) { asm ("" : : : "cc"); return x & 123; }
int main() {
; return 0; }
EOF
-if { (eval echo configure:2690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_c_asmcr0_bug='no'
else
fi
echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6
-echo "configure:2712: checking for DWARF2 unwind info support" >&5
-if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then
+echo "configure:2784: checking for DWARF2 unwind info support" >&5
+if eval "test \"\${libc_cv_gcc_dwarf2_unwind_info+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
-#line 2717 "configure"
+#line 2789 "configure"
static char __EH_FRAME_BEGIN__;
_start ()
{
EOF
if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info
-nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_dwarf2_unwind_info=static
else
libc_cv_gcc_dwarf2_unwind_info=no
if test $libc_cv_gcc_dwarf2_unwind_info = no; then
if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame
-nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_dwarf2_unwind_info=yes
else
libc_cv_gcc_dwarf2_unwind_info=no
esac
echo $ac_n "checking for __builtin_expect""... $ac_c" 1>&6
-echo "configure:2782: checking for __builtin_expect" >&5
-if eval "test \"`echo '$''{'libc_cv_gcc_builtin_expect'+set}'`\" = set"; then
+echo "configure:2854: checking for __builtin_expect" >&5
+if eval "test \"\${libc_cv_gcc_builtin_expect+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
-#line 2787 "configure"
+#line 2859 "configure"
int foo (int a)
{
a = __builtin_expect (a, 10);
}
EOF
if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_builtin_expect=yes
else
libc_cv_gcc_builtin_expect=no
fi
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
-echo "configure:2856: checking OS release for uname" >&5
-if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
+echo "configure:2928: checking OS release for uname" >&5
+if eval "test \"\${libc_cv_uname_release+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
uname_release="$libc_cv_uname_release"
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
-echo "configure:2878: checking OS version for uname" >&5
-if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
+echo "configure:2950: checking OS version for uname" >&5
+if eval "test \"\${libc_cv_uname_version+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
fi
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
-echo "configure:2900: checking stdio selection" >&5
+echo "configure:2972: checking stdio selection" >&5
case $stdio in
libio) cat >> confdefs.h <<\EOF
# Test for old glibc 2.0.x headers so that they can be removed properly
# Search only in includedir.
echo $ac_n "checking for old glibc 2.0.x headers""... $ac_c" 1>&6
-echo "configure:2914: checking for old glibc 2.0.x headers" >&5
+echo "configure:2986: checking for old glibc 2.0.x headers" >&5
if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h"
then
old_glibc_headers=yes
fi
echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6
-echo "configure:2968: checking whether -fPIC is default" >&5
-if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then
+echo "configure:3040: checking whether -fPIC is default" >&5
+if eval "test \"\${pic_default+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
pic_default=yes
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
if test "$no_recursion" != yes; then
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
+ ac_sub_configure="$SHELL $ac_sub_srcdir/configure"
elif test -f $ac_sub_srcdir/configure.in; then
ac_sub_configure=$ac_configure
else
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+ echo "running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
# The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+ if eval $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
then :
else
{ echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
force_install=$enableval, force_install=yes)
AC_SUBST(force_install)
+dnl On some platforms we allow dropping compatibility with all kernel
+dnl versions.
+AC_ARG_ENABLE(kernel,
+[ --enable-kernel=VERSION compile for copmatibility with kernel not older
+ than VERSION],
+ minimum_kernel=$enableval)
+
AC_CANONICAL_HOST
# The way shlib-versions is used to generate soversions.mk uses a
fi
echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
echo "configure:16: checking installed Linux kernel header files" >&5
-if eval "test \"`echo '$''{'libc_cv_linux2010'+set}'`\" = set"; then
+if eval "test \"\${libc_cv_linux2010+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
files. To use kernel headers not from /usr/include/linux, use the
configure option --with-headers." 1>&2; exit 1; }
fi
+
+# If the user gave a minimal version number test whether the available
+# kernel headers are young enough.
+if test -n "$minimum_kernel"; then
+ echo $ac_n "checking for kernel header at least $minimum_kernel""... $ac_c" 1>&6
+echo "configure:58: checking for kernel header at least $minimum_kernel" >&5
+ decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\(\([0-9]*\)\|\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
+ cat > conftest.$ac_ext <<EOF
+#include <linux/version.h>
+int main() {
+#if LINUX_VERSION_CODE < $decnum
+eat flaming death
+#endif
+; return 0; }
+EOF
+ if { (eval echo configure:30: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ cat >> confdefs.h <<EOF
+#define __LINUX_KERNEL_VERSION $decnum
+EOF
+
+ echo "$ac_t""ok" 1>&6
+ else
+ echo "$ac_t""too old!" 1>&6
+ { echo "configure: error: *** The available kernel headers are not at least as old as the requested
+*** compatible kernel version" 1>&2; exit 1; }
+ fi
+ rm -f conftest*
+fi
+
if test -n "$sysheaders"; then
CFLAGS=$OLD_CFLAGS
fi
ac_prefix=$ac_default_prefix
fi
echo $ac_n "checking for symlinks in ${ac_prefix}/include""... $ac_c" 1>&6
-echo "configure:131: checking for symlinks in ${ac_prefix}/include" >&5
+echo "configure:168: checking for symlinks in ${ac_prefix}/include" >&5
ac_message=
if test -L ${ac_prefix}/include/net; then
ac_message="$ac_message
files. To use kernel headers not from /usr/include/linux, use the
configure option --with-headers.])
fi
+
+# If the user gave a minimal version number test whether the available
+# kernel headers are young enough.
+if test -n "$minimum_kernel"; then
+ AC_MSG_CHECKING(for kernel header at least $minimum_kernel)
+changequote(,)dnl
+ decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\(\([0-9]*\)\|\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
+changequote([,])dnl
+ cat > conftest.$ac_ext <<EOF
+#include <linux/version.h>
+int main() {
+#if LINUX_VERSION_CODE < $decnum
+eat flaming death
+#endif
+; return 0; }
+EOF
+ if { (eval echo configure:30: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum)
+ AC_MSG_RESULT(ok)
+ else
+ AC_MSG_RESULT(too old!)
+ AC_MSG_ERROR([*** The available kernel headers are not at least as old as the requested
+*** compatible kernel version])
+ fi
+ rm -f conftest*
+fi
+
if test -n "$sysheaders"; then
CFLAGS=$OLD_CFLAGS
fi
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <sysdep.h>
#include <sys/syscall.h>
+#include "kernel-features.h"
+
+#if __ASSUME_GETCWD_SYSCALL > 0
+/* Kernel 2.1.92 introduced a third way to get the current working
+ directory: a syscall. We've got to be careful that even when
+ compiling under 2.1.92+ the libc still runs under older kernels. */
+extern int __syscall_getcwd (char *buf, unsigned long size);
+# define no_syscall_getcwd 0
+# define have_new_dcache 1
+/* This is a trick since we don't define generic_getcwd. */
+# define generic_getcwd getcwd
+#else
/* The "proc" filesystem provides an easy method to retrieve the value.
For each process, the corresponding directory contains a symbolic link
named `cwd'. Reading the content of this link immediate gives us the
the proc filesystem mounted. Use the POSIX implementation in this case. */
static char *generic_getcwd (char *buf, size_t size) internal_function;
-#ifdef __NR_getcwd
+# if __NR_getcwd
/* Kernel 2.1.92 introduced a third way to get the current working
directory: a syscall. We've got to be careful that even when
compiling under 2.1.92+ the libc still runs under older kernels. */
extern int __syscall_getcwd (char *buf, unsigned long size);
static int no_syscall_getcwd;
static int have_new_dcache;
-#else
-# define no_syscall_getcwd 1
+# else
+# define no_syscall_getcwd 1
static int have_new_dcache = 1;
+# endif
#endif
char *
save_errno = errno;
-#ifdef __NR_getcwd
+#if defined __NR_getcwd || __LINUX_GETCWD_SYSCALL > 0
if (!no_syscall_getcwd)
{
int retval;
return buf;
}
+# if __ASSUME_GETCWD_SYSCALL
+ /* It should never happen that the `getcwd' syscall failed because
+ the buffer is too small if we allocated the buffer outself. */
+ assert (errno != ERANGE || buf != NULL);
+
+ if (buf == NULL)
+ free (path);
+
+ return NULL;
+# else
if (errno == ENOSYS)
{
no_syscall_getcwd = 1;
}
__set_errno (save_errno);
+# endif
}
#endif
}
return buf;
}
+#ifndef have_new_dcache
else
have_new_dcache = 0;
+#endif
}
+#if __ASSUME_GETCWD_SYSCALL == 0
/* Set to have_new_dcache only if error indicates that proc doesn't
exist. */
if (errno != EACCES && errno != ENAMETOOLONG)
have_new_dcache = 0;
+#endif
/* Something went wrong. Restore the error number and use the generic
version. */
}
weak_alias (__getcwd, getcwd)
+#if __ASSUME_GETCWD_SYSCALL == 0
/* Get the code for the generic version. */
-#define GETCWD_RETURN_TYPE static char * internal_function
-#define __getcwd generic_getcwd
-#include <sysdeps/posix/getcwd.c>
+# define GETCWD_RETURN_TYPE static char * internal_function
+# define __getcwd generic_getcwd
+# include <sysdeps/posix/getcwd.c>
+#endif
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <sysdep.h>
#include <sys/syscall.h>
+#include <kernel-features.h>
+
/*
In Linux 2.1.x the chown functions have been changed. A new function lchown
was introduced. The new chown now follows symlinks - the old chown and the
extern int __syscall_chown (const char *__file,
uid_t __owner, gid_t __group);
-#ifdef __NR_lchown
+#if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0
/* Running under Linux > 2.1.80. */
-static int __libc_old_chown;
int
__real_chown (const char *file, uid_t owner, gid_t group)
{
+# if __ASSUME_LCHOWN_SYSCALL == 0
+ static int __libc_old_chown;
int result;
if (!__libc_old_chown)
}
return __lchown (file, owner, group);
+# else
+ return INLINE_SYSCALL (chown, 3, file, owner, group);
+# endif
}
#endif
-#ifndef __NR_lchown
+#if !defined __NR_lchown && __ASSUME_LCHOWN_SYSCALL == 0
/* Compiling under older kernels. */
int
__chown_is_lchown (const char *file, uid_t owner, gid_t group)
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pread
+#include <kernel-features.h>
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+
+# if __ASSUME_PREAD_SYSCALL == 0
static ssize_t __emulate_pread (int fd, void *buf, size_t count,
off_t offset) internal_function;
+# endif
ssize_t
/* First try the syscall. */
result = INLINE_SYSCALL (pread, 5, fd, buf, count, offset, 0);
+# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pread, pread)
-#define __pread(fd, buf, count, offset) \
+# define __pread(fd, buf, count, offset) \
static internal_function __emulate_pread (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pread.c>
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread.c>
+#endif
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pread
+#include <kernel-features.h>
-extern ssize_t __syscall_pread64 (int fd, void *buf, size_t count,
- off_t offset_hi, off_t offset_lo);
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+# if __ASSUME_PREAD_SYSCALL == 0
static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
off64_t offset) internal_function;
+# endif
ssize_t
result = INLINE_SYSCALL (pread, 5, fd, buf, count,
(off_t) (offset & 0xffffffff),
(off_t) (offset >> 32));
+# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread64 (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pread64, pread64)
-#define __pread64(fd, buf, count, offset) \
+# define __pread64(fd, buf, count, offset) \
static internal_function __emulate_pread64 (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pread64.c>
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread64.c>
+#endif
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pwrite
+#include <kernel-features.h>
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
+
+# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
off_t offset) internal_function;
+# endif
ssize_t
/* First try the syscall. */
result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, offset, 0);
+# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pwrite, pwrite)
-#define __pwrite(fd, buf, count, offset) \
+# define __pwrite(fd, buf, count, offset) \
static internal_function __emulate_pwrite (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pwrite.c>
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite.c>
+#endif
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pwrite
+#include <kernel-features.h>
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
+
+# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
off64_t offset) internal_function;
+# endif
ssize_t
result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
(off_t) (offset & 0xffffffff),
(off_t) (offset >> 32));
+# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite64 (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pwrite64, pwrite64)
-#define __pwrite64(fd, buf, count, offset) \
+# define __pwrite64(fd, buf, count, offset) \
static internal_function __emulate_pwrite64 (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pwrite64.c>
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite64.c>
+#endif
/* Initialization code run first thing by the ELF startup code. Linux version.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <stdio.h>
+#include <fcntl.h>
#include <unistd.h>
#include <sysdep.h>
#include <fpu_control.h>
#include <linux/personality.h>
#include <init-first.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
#include <sys/types.h>
+#include "kernel-features.h"
extern void __libc_init_secure (void);
extern void __libc_init (int, char **, char **);
/* The function is called from assembly stubs the compiler can't see. */
static void init (int, char **, char **) __attribute__ ((unused));
+/* The function we use to get the kernel revision. */
+extern int __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
+ void *newval, size_t newlen);
+
extern int _dl_starting_up;
weak_extern (_dl_starting_up)
/* We must not call `personality' twice. */
if (!__libc_multiple_libcs)
{
+ /* Test whether the kernel is new enough. This test is only
+ performed if the library is not compiled to run on all
+ kernels. */
+ if (__LINUX_KERNEL_VERSION > 0)
+ {
+ static const int sysctl_args[] = { CTL_KERN, KERN_OSRELEASE };
+ char buf[64];
+ size_t reslen = sizeof (buf);
+ unsigned int version;
+ int parts;
+ char *cp;
+
+ /* Try reading the number using `sysctl' first. */
+ if (__sysctl ((int *) sysctl_args,
+ sizeof (sysctl_args) / sizeof (sysctl_args[0]),
+ buf, &reslen, NULL, 0) < 0)
+ {
+ /* This was not successful. Now try reading the /proc
+ filesystem. */
+ int fd = __open ("/proc/sys/kernel/osrelease", O_RDONLY);
+ if (fd == -1
+ || (reslen = __read (fd, buf, sizeof (buf))) <= 0)
+ /* This also didn't work. We give up since we cannot
+ make sure the library can actually work. */
+ __libc_fatal ("FATAL: cannot determine library version\n");
+
+ __close (fd);
+ }
+ buf[MIN (reslen, sizeof (buf) - 1)] = '\0';
+
+ /* Now convert it into a number. The string consists of at most
+ three parts. */
+ version = 0;
+ parts = 0;
+ cp = buf;
+ while ((*cp >= '0') && (*cp <= '9'))
+ {
+ unsigned int here = *cp++ - '0';
+
+ while ((*cp >= '0') && (*cp <= '9'))
+ {
+ here *= 10;
+ here += *cp++ - '0';
+ }
+
+ ++parts;
+ version <<= 8;
+ version |= here;
+
+ if (*cp++ != '.')
+ /* Another part following? */
+ break;
+ }
+
+ if (parts < 3)
+ version <<= 8 * (3 - parts);
+
+ /* Now we can test with the required version. */
+ if (version < __LINUX_KERNEL_VERSION)
+ /* Not sufficent. */
+ __libc_fatal ("FATAL: kernel too old\n");
+ }
+
/* The `personality' system call takes one argument that chooses
the "personality", i.e. the set of system calls and such. We
must make this call first thing to disable emulation of some
--- /dev/null
+/* Set flags signalling availability of kernel features based on given
+ kernel version number.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file must not contain any C code. At least it must be protected
+ to allow using the file also in assembler files. */
+
+/* XXX For testing. */
+#define __LINUX_KERNEL_VERSION 131584
+
+#ifndef __LINUX_KERNEL_VERSION
+/* We assume the worst; all kernels should be supported. */
+# define __LINUX_KERNEL_VERSION 0
+#endif
+
+/* We assume for __LINUX_KERNEL_VERSION the same encoding used in
+ linux/version.h. I.e., the major, minor, and subminor all get a
+ byte with the major number being in the highest byte. This means
+ we can do numeric comparisons.
+
+ In the following we will define certain symbols depending on
+ whether the describes kernel feature is available in the kernel
+ version given by __LINUX_KERNEL_VERSION. We are not always exactly
+ recording the correct versions in which the features were
+ introduced. If somebody cares these values can afterwards be
+ corrected. Most of the numbers here are set corresponding to
+ 2.2.0. */
+
+/* `getcwd' system call. */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_GETCWD_SYSCALL 1
+#endif
+
+/* Real-time signal became usable in 2.1.70. */
+#if __LINUX_KERNEL_VERSION >= 131398
+# define __ASSUME_REALTIME_SIGNALS 1
+#endif
+
+/* When were the `pread'/`pwrite' syscalls introduced? */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_PREAD_SYSCALL 1
+# define __ASSUME_PWRITE_SYSCALL 1
+#endif
+
+/* When was `poll' introduced? */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_POLL_SYSCALL 1
+#endif
+
+/* The `lchown' syscall was introduced in 2.1.80. */
+#if __LINUX_KERNEL_VERSION >= 131408
+# define __ASSUME_LCHOWN_SYSCALL 1
+#endif
+
+/* When did the `setresuid' sysall became available? */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_SETRESUID_SYSCALL 1
+#endif
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_poll
+
+#include "kernel-features.h"
+
+#if defined __NR_poll || __ASSUME_POLL_SYSCALL > 0
extern int __syscall_poll __P ((struct pollfd *fds, unsigned int nfds,
int timeout));
+# if __ASSUME_POLL_SYSCALL == 0
static int __emulate_poll __P ((struct pollfd *fds, unsigned long int nfds,
int timeout)) internal_function;
+# endif
/* The real implementation. */
int
unsigned long int nfds;
int timeout;
{
+# if __ASSUME_POLL_SYSCALL == 0
static int must_emulate;
if (!must_emulate)
}
return __emulate_poll (fds, nfds, timeout);
+# else
+ return INLINE_SYSCALL (poll, 3, fds, nfds, timeout);
+# endif
}
weak_alias (__poll, poll)
# define __poll(fds, nfds, timeout) \
static internal_function __emulate_poll (fds, nfds, timeout)
#endif
-#include <sysdeps/unix/bsd/poll.c>
+
+#if __ASSUME_POLL_SYSCALL == 0
+# include <sysdeps/unix/bsd/poll.c>
+#endif
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pread
+#include "kernel-features.h"
+
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
off_t offset_hi, off_t offset_lo);
+# if __ASSUME_PREAD_SYSCALL == 0
static ssize_t __emulate_pread (int fd, void *buf, size_t count,
off_t offset) internal_function;
+# endif
ssize_t
/* First try the syscall. */
result = INLINE_SYSCALL (pread, 5, fd, buf, count, 0, offset);
+# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pread, pread)
-#define __pread(fd, buf, count, offset) \
+# define __pread(fd, buf, count, offset) \
static internal_function __emulate_pread (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pread.c>
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread.c>
+#endif
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pread
+#include "kernel-features.h"
+
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
off_t offset_hi, off_t offset_lo);
+# if __ASSUME_PREAD_SYSCALL == 0
static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
off64_t offset) internal_function;
+# endif
ssize_t
/* First try the syscall. */
result = INLINE_SYSCALL (pread, 5, fd, buf, count, (off_t) (offset >> 32),
(off_t) (offset & 0xffffffff));
+# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread64 (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pread64, pread64)
-#define __pread64(fd, buf, count, offset) \
+# define __pread64(fd, buf, count, offset) \
static internal_function __emulate_pread64 (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pread64.c>
+
+# if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread64.c>
+#endif
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pwrite
+#include "kernel-features.h"
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
off_t offset_hi, off_t offset_lo);
+# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
off_t offset) internal_function;
+# endif
ssize_t
/* First try the syscall. */
result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, 0, offset);
+# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pwrite, pwrite)
-#define __pwrite(fd, buf, count, offset) \
+# define __pwrite(fd, buf, count, offset) \
static internal_function __emulate_pwrite (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pwrite.c>
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite.c>
+#endif
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pwrite
+#include "kernel-features.h"
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite64 (int fd, const void *buf, size_t count,
off_t offset_hi, off_t offset_lo);
+# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
off64_t offset) internal_function;
+# endif
ssize_t
/* First try the syscall. */
result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, (off_t) (offset >> 32),
(off_t) (offset & 0xffffffff));
+# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite64 (fd, buf, count, offset);
+# endif
return result;
}
weak_alias (__pwrite64, pwrite64)
-#define __pwrite64(fd, buf, count, offset) \
+# define __pwrite64(fd, buf, count, offset) \
static internal_function __emulate_pwrite64 (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pwrite64.c>
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite64.c>
+#endif
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <sys/types.h>
#include <unistd.h>
-#ifdef __NR_setresuid
+#include "kernel-features.h"
+
+#if defined __NR_setresuid || __ASSUME_SETRESUID_SYSCALL > 0
extern int __setresuid (uid_t ruid, uid_t euid, uid_t suid);
/* First try the syscall. */
result = __setresuid (-1, uid, -1);
+# if __ASSUME_SETRESUID_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use emulation. This may not work
since `setreuid' also sets the saved user ID when UID is not
equal to the real user ID, making it impossible to switch back. */
result = __setreuid (-1, uid);
+# endif
return result;
}
#include <sysdep.h>
#include <sys/syscall.h>
+#include "kernel-features.h"
+
/* The difference here is that the sigaction structure used in the
kernel is not the same as we use in the libc. Therefore we must
translate it here. */
#include <kernel_sigaction.h>
+#if __ASSUME_REALTIME_SIGNALS == 0
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. This is the definition. */
+int __libc_missing_rt_sigs;
+
extern int __syscall_sigaction (int, const struct old_kernel_sigaction *,
struct old_kernel_sigaction *);
+# define rtsignals_guaranteed 0
+#else
+# define rtsignals_guaranteed 1
+#endif
extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *,
struct kernel_sigaction *, size_t);
-/* The variable is shared between all wrappers around signal handling
- functions which have RT equivalents. This is the definition. */
-int __libc_missing_rt_sigs;
-
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
struct old_kernel_sigaction k_sigact, k_osigact;
int result;
-#ifdef __NR_rt_sigaction
+#if defiend __NR_rt_sigaction || __ASSUME_REALTIME_SIGNALS > 0
/* First try the RT signals. */
+# if __ASSUME_REALTIME_SIGNALS == 0
if (!__libc_missing_rt_sigs)
+# endif
{
struct kernel_sigaction kact, koact;
+ /* Save the current error value for later. We need not do this
+ if we are guaranteed to have realtime signals. */
+# if __ASSUME_REALTIME_SIGNALS == 0
int saved_errno = errno;
+# endif
if (act)
{
result = INLINE_SYSCALL (rt_sigaction, 4, sig, act ? &kact : NULL,
oact ? &koact : NULL, _NSIG / 8);
+# if __ASSUME_REALTIME_SIGNALS == 0
if (result >= 0 || errno != ENOSYS)
+# endif
{
if (oact && result >= 0)
{
return result;
}
+# if __ASSUME_REALTIME_SIGNALS == 0
__set_errno (saved_errno);
__libc_missing_rt_sigs = 1;
+# endif
}
#endif
+#if __ASSUME_REALTIME_SIGNALS == 0
if (act)
{
k_sigact.k_sa_handler = act->sa_handler;
k_sigact.sa_mask = act->sa_mask.__val[0];
k_sigact.sa_flags = act->sa_flags;
-#ifdef HAVE_SA_RESTORER
+# ifdef HAVE_SA_RESTORER
k_sigact.sa_restorer = act->sa_restorer;
-#endif
+# endif
}
result = INLINE_SYSCALL (sigaction, 3, sig, act ? &k_sigact : NULL,
oact ? &k_osigact : NULL);
oact->sa_handler = k_osigact.k_sa_handler;
oact->sa_mask.__val[0] = k_osigact.sa_mask;
oact->sa_flags = k_osigact.sa_flags;
-#ifdef HAVE_SA_RESTORER
+# ifdef HAVE_SA_RESTORER
oact->sa_restorer = k_osigact.sa_restorer;
-#endif
+# endif
}
return result;
+#endif
}
weak_alias (__sigaction, sigaction)
#include <sysdep.h>
#include <sys/syscall.h>
+#include "kernel-features.h"
+
extern int __syscall_sigpending (sigset_t *);
extern int __syscall_rt_sigpending (sigset_t *, size_t);
sigpending (set)
sigset_t *set;
{
-#ifdef __NR_rt_pending
+#if __ASSUME_REALTIME_SIGNALS > 0
+ return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8);
+#else
+# ifdef __NR_rt_pending
/* First try the RT signals. */
if (!__libc_missing_rt_sigs)
{
__set_errno (saved_errno);
__libc_missing_rt_sigs = 1;
}
-#endif
+# endif
return INLINE_SYSCALL (sigpending, 1, set);
+#endif
}
#include <sysdep.h>
#include <sys/syscall.h>
+#include "kernel-features.h"
+
+
extern int __syscall_sigprocmask (int, const sigset_t *, sigset_t *);
extern int __syscall_rt_sigprocmask (int, const sigset_t *, sigset_t *,
size_t);
const sigset_t *set;
sigset_t *oset;
{
-#ifdef __NR_rt_sigprocmask
+#if __ASSUME_REALTIME_SIGNALS > 0
+ return INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8);
+#else
+# ifdef __NR_rt_sigprocmask
/* First try the RT signals. */
if (!__libc_missing_rt_sigs)
{
__set_errno (saved_errno);
__libc_missing_rt_sigs = 1;
}
-#endif
+# endif
return INLINE_SYSCALL (sigprocmask, 3, how, set, oset);
+#endif
}
weak_alias (__sigprocmask, sigprocmask)
#include <sysdep.h>
#include <sys/syscall.h>
+#include "kernel-features.h"
+
extern int __syscall_sigsuspend (int, unsigned long int, unsigned long int);
extern int __syscall_rt_sigsuspend (const sigset_t *, size_t);
__sigsuspend (set)
const sigset_t *set;
{
-#ifdef __NR_rt_sigsuspend
+#if __ASSUME_REALTIME_SIGNALS
+ return INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
+#else
+# ifdef __NR_rt_sigsuspend
/* First try the RT signals. */
if (!__libc_missing_rt_sigs)
{
__set_errno (saved_errno);
__libc_missing_rt_sigs = 1;
}
-#endif
+# endif
return INLINE_SYSCALL (sigsuspend, 3, 0, 0, set->__val[0]);
+#endif
}
weak_alias (__sigsuspend, sigsuspend)
/* Read or write system information. Linux version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
extern int __syscall__sysctl (struct __sysctl_args *args);
int
-sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
- void *newval, size_t newlen)
+__sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
+ void *newval, size_t newlen)
{
struct __sysctl_args args =
{
return INLINE_SYSCALL (_sysctl, 1, &args);
}
+weak_alias (__sysctl, sysctl)
/* Test whether RT signals are really available.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <string.h>
#include <sys/utsname.h>
+#include "kernel-features.h"
+
static int
kernel_has_rtsig (void)
{
+#if __ASSUME_REALTIME_SIGNALS
+ return 1;
+#else
struct utsname name;
return uname (&name) == 0 && __strverscmp (name.release, "2.1.70") >= 0;
+#endif
}