]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
.
authorJim Meyering <jim@meyering.net>
Wed, 5 Mar 2003 09:25:26 +0000 (09:25 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 5 Mar 2003 09:25:26 +0000 (09:25 +0000)
Makefile.in
aclocal.m4

index 7112c573407519bc89e2fd08d7bec7ba2ba93ceb..6202a0f56582bc51c0cbba3c50b11592f2e0fd22 100644 (file)
@@ -212,7 +212,7 @@ $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 $(srcdir)/configure:  $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)
 
-$(ACLOCAL_M4):  configure.ac m4/acl.m4 m4/afs.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-robust.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/group-member.m4 m4/host-os.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/mmap-stack.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/strftime.m4 m4/timespec.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
+$(ACLOCAL_M4):  configure.ac m4/acl.m4 m4/afs.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/group-member.m4 m4/host-os.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/mmap-stack.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/strftime.m4 m4/timespec.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 
 config.h: stamp-h1
index d46770d0fcef0975fdc5c6031eae58b24e060fc9..7e12be3025a0452259cac50f1f14aa5712f3424c 100644 (file)
@@ -1041,7 +1041,7 @@ AC_DEFUN([jm_MACROS],
 
   AC_FUNC_STRTOD
   AC_REQUIRE([UTILS_SYS_OPEN_MAX])
-  AC_REQUIRE([GL_FUNC_GETCWD_ROBUST])
+  AC_REQUIRE([GL_FUNC_GETCWD_PATH_MAX])
 
   # See if linking `seq' requires -lm.
   # It does on nearly every system.  The single exception (so far) is
@@ -3845,14 +3845,20 @@ AC_DEFUN([UTILS_SYS_OPEN_MAX],
 ])
 
 #serial 1
-# Check whether getcwd can return a path longer than PATH_MAX.
-# If not, arrange to compile the wrapper function.
+# Check whether getcwd has the bug that it succeeds for a working directory
+# longer than PATH_MAX, yet returns a truncated directory name.
+# If so, arrange to compile the wrapper function.
+
+# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20.
+# I've heard that this is due to a Linux kernel bug, and that it has
+# been fixed between 2.4.21-pre3 and 2.4.21-pre4.  */
+
 # From Jim Meyering
 
-AC_DEFUN([GL_FUNC_GETCWD_ROBUST],
+AC_DEFUN([GL_FUNC_GETCWD_PATH_MAX],
 [
-  AC_CACHE_CHECK([whether getcwd can return a path longer than PATH_MAX],
-                 utils_cv_func_getcwd_robust,
+  AC_CACHE_CHECK([whether getcwd properly handles paths longer than PATH_MAX],
+                 gl_cv_func_getcwd_vs_path_max,
   [
   # Arrange for deletion of the temporary directory this test creates.
   ac_clean_files="$ac_clean_files confdir3"
@@ -3917,10 +3923,12 @@ main ()
       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
-         || (c = getcwd (buf, PATH_MAX)) == NULL
-         || (len = strlen (c)) != cwd_len)
+         || ((c = getcwd (buf, PATH_MAX)) != NULL
+             && (len = strlen (c)) != cwd_len))
        {
          fail = 1;
          break;
@@ -3950,11 +3958,11 @@ main ()
 #endif
 }
   ]])],
-       [utils_cv_func_getcwd_robust=yes],
-       [utils_cv_func_getcwd_robust=no],
-       [utils_cv_func_getcwd_robust=no])])
+       [gl_cv_func_getcwd_vs_path_max=yes],
+       [gl_cv_func_getcwd_vs_path_max=no],
+       [gl_cv_func_getcwd_vs_path_max=no])])
 
-  if test $utils_cv_func_getcwd_robust = yes; then
+  if test $gl_cv_func_getcwd_vs_path_max = yes; then
     AC_LIBOBJ(getcwd)
     AC_DEFINE(getcwd, rpl_getcwd,
       [Define to rpl_getcwd if the wrapper function should be used.])