From 8e111ca3093c9a3d546a0451bb61476274236586 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 5 Mar 2003 13:12:02 +0000 Subject: . --- aclocal.m4 | 19 ++++- configure | 261 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 264 insertions(+), 16 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 7e12be302..32ad0c585 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -3870,6 +3870,9 @@ AC_DEFUN([GL_FUNC_GETCWD_PATH_MAX], #include #include +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + #ifndef CHAR_BIT # define CHAR_BIT 8 #endif @@ -3925,10 +3928,18 @@ main () cwd_len += 1 + strlen (DIR_NAME); /* If mkdir or chdir fails, be pessimistic and consider that as a failure, too. */ - if (mkdir (DIR_NAME, 0700) < 0 - || chdir (DIR_NAME) < 0 - || ((c = getcwd (buf, PATH_MAX)) != NULL - && (len = strlen (c)) != cwd_len)) + if (mkdir (DIR_NAME, 0700) < 0 || chdir (DIR_NAME) < 0) + { + fail = 1; + break; + } + if ((c = getcwd (buf, PATH_MAX)) == NULL) + { + /* This allows any failure to indicate there is no bug. + FIXME: check errno? */ + break; + } + if ((len = strlen (c)) != cwd_len) { fail = 1; break; diff --git a/configure b/configure index e0531a33b..471432a3d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for GNU coreutils 4.5.8. +# Generated by GNU Autoconf 2.57 for GNU coreutils 4.5.9. # # Report bugs to . # @@ -268,8 +268,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='GNU coreutils' PACKAGE_TARNAME='coreutils' -PACKAGE_VERSION='4.5.8' -PACKAGE_STRING='GNU coreutils 4.5.8' +PACKAGE_VERSION='4.5.9' +PACKAGE_STRING='GNU coreutils 4.5.9' PACKAGE_BUGREPORT='bug-coreutils@gnu.org' ac_unique_file="src/ls.c" @@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU coreutils 4.5.8 to adapt to many kinds of systems. +\`configure' configures GNU coreutils 4.5.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -846,7 +846,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU coreutils 4.5.8:";; + short | recursive ) echo "Configuration of GNU coreutils 4.5.9:";; esac cat <<\_ACEOF @@ -947,7 +947,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -GNU coreutils configure 4.5.8 +GNU coreutils configure 4.5.9 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -962,7 +962,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU coreutils $as_me 4.5.8, which was +It was created by GNU coreutils $as_me 4.5.9, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1630,7 +1630,7 @@ fi # Define the identity of the package. PACKAGE='coreutils' - VERSION='4.5.8' + VERSION='4.5.9' cat >>confdefs.h <<_ACEOF @@ -14461,11 +14461,74 @@ fi done +echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5 +echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6 +if test "${gl_cv_var__system_configuration+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +double x = _system_configuration.physmem; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_var__system_configuration=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gl_cv_var__system_configuration=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gl_cv_var__system_configuration" >&5 +echo "${ECHO_T}$gl_cv_var__system_configuration" >&6 + + if test $gl_cv_var__system_configuration = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE__SYSTEM_CONFIGURATION 1 +_ACEOF + + fi + + + -for ac_header in sys/pstat.h unistd.h sys/sysmp.h + + + + + +for ac_header in unistd.h sys/pstat.h sys/sysmp.h sys/sysinfo.h \ + machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \ + sys/systemcfg.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -14608,7 +14671,11 @@ done -for ac_func in pstat_getstatic pstat_getdynamic + + + + +for ac_func in pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -14694,6 +14761,8 @@ done + + for ac_header in unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -29911,6 +29980,168 @@ _ACEOF + echo "$as_me:$LINENO: checking whether getcwd properly handles paths longer than PATH_MAX" >&5 +echo $ECHO_N "checking whether getcwd properly handles paths longer than PATH_MAX... $ECHO_C" >&6 +if test "${gl_cv_func_getcwd_vs_path_max+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir3" + if test "$cross_compiling" = yes; then + gl_cv_func_getcwd_vs_path_max=no +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include +#include +#include + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + +/* The extra casts work around common compiler bugs. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) +/* The outer cast is needed to work around a bug in Cray C 5.0.3.0. + It is necessary at least when t == time_t. */ +#define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \ + ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)) +#define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t))) + +#ifndef INT_MAX +# define INT_MAX TYPE_MAXIMUM (int) +#endif + +#ifndef PATH_MAX +/* There might be a better way to handle this case, but note: + - the value shouldn't be anywhere near INT_MAX, and + - the value shouldn't be so big that the local declaration, below, + blows the stack. */ +# define PATH_MAX 40000 +#endif + +/* The length of this name must be 8. */ +#define DIR_NAME "confdir3" + +int +main () +{ + /* The '9' comes from strlen (DIR_NAME) + 1. */ +#if INT_MAX - 9 <= PATH_MAX + /* FIXME: Assuming there's a system for which this is true -- Hurd?, + this should be done in a compile test. */ + exit (0); +#else + char buf[PATH_MAX + 20]; + char *cwd = getcwd (buf, PATH_MAX); + size_t cwd_len; + int fail = 0; + size_t n_chdirs = 0; + + if (cwd == NULL) + exit (1); + + cwd_len = strlen (cwd); + + while (1) + { + char *c; + size_t len; + + cwd_len += 1 + strlen (DIR_NAME); + /* If mkdir or chdir fails, be pessimistic and consider that + as a failure, too. */ + if (mkdir (DIR_NAME, 0700) < 0 || chdir (DIR_NAME) < 0) + { + fail = 1; + break; + } + if ((c = getcwd (buf, PATH_MAX)) == NULL) + { + /* This allows any failure to indicate there is no bug. + FIXME: check errno? */ + break; + } + if ((len = strlen (c)) != cwd_len) + { + fail = 1; + break; + } + ++n_chdirs; + if (PATH_MAX < len) + break; + } + + /* Leaving behind such a deep directory is not polite. + So clean up here, right away, even though the driving + shell script would also clean up. */ + { + size_t i; + + /* Unlink first, in case the chdir failed. */ + unlink (DIR_NAME); + for (i = 0; i <= n_chdirs; i++) + { + if (chdir ("..") < 0) + break; + rmdir (DIR_NAME); + } + } + + exit (fail); +#endif +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_getcwd_vs_path_max=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_getcwd_vs_path_max=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_vs_path_max" >&5 +echo "${ECHO_T}$gl_cv_func_getcwd_vs_path_max" >&6 + + if test $gl_cv_func_getcwd_vs_path_max = yes; then + LIBOBJS="$LIBOBJS getcwd.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define getcwd rpl_getcwd +_ACEOF + + fi + + if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else @@ -35943,6 +36174,7 @@ fi + # See if linking `seq' requires -lm. # It does on nearly every system. The single exception (so far) is # BeOS which has all the math functions in the normal runtime library @@ -37855,6 +38087,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#ifdef __GLIBC__ +Do not use statvfs on systems with GNU libc, because that function stats +all preceding entries in /proc/mounts, and that makes df hang if even +one of the corresponding file systems is hard-mounted, but not available. +#endif #include int main () @@ -42744,7 +42981,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by GNU coreutils $as_me 4.5.8, which was +This file was extended by GNU coreutils $as_me 4.5.9, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -42810,7 +43047,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GNU coreutils config.status 4.5.8 +GNU coreutils config.status 4.5.9 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -- cgit v1.2.3-54-g00ecf