On 11/01/2016 11:20 AM, Bruno Haible wrote:
Should this change be accompanied with a documentation change
in doc/posix-functions/utimensat.texi ?

It's not strictly needed, as Gnulib still works around bugs in older systems, it's just that 'configure' now defaults to assuming the older bugs don't exist instead of assuming that they do exist. Although I can imagine documenting the assumption, this sort of thing hasn't been done in the past.

And what about m4/futimens.m4 and doc/posix-functions/futimens.texi ?

Thanks, I missed that, and I should fix futimens to be consistent. I installed the attached.

From c6777f7989eff448eb53d3f929e11e0c7da42ec1 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 1 Nov 2016 15:38:59 -0700
Subject: [PATCH] futimens: remove FIXME for old Linux kernels

* m4/futimens.m4 (gl_FUNC_FUTIMENS): Belatedy do a "simplify
this in 2012" FIXME, like that for utimensat.
---
 ChangeLog      |  4 ++++
 m4/futimens.m4 | 18 ++++--------------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 999dc04..6e57887 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2016-11-01  Paul Eggert  <eggert@cs.ucla.edu>
 
+	futimens: remove FIXME for old Linux kernels
+	* m4/futimens.m4 (gl_FUNC_FUTIMENS): Belatedy do a "simplify
+	this in 2012" FIXME, like that for utimensat.
+
 	utimensat: remove FIXME for old Linux kernels
 	* lib/utimensat.c (rpl_utimensat): Update FIXME comment.
 	* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Belatedy do a "simplify
diff --git a/m4/futimens.m4 b/m4/futimens.m4
index 159468c..3418d4e 100644
--- a/m4/futimens.m4
+++ b/m4/futimens.m4
@@ -1,4 +1,4 @@
-# serial 6
+# serial 7
 # See if we need to provide futimens replacement.
 
 dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
@@ -38,21 +38,11 @@ AC_DEFUN([gl_FUNC_FUTIMENS],
       if (fstat (fd, &st)) return 6;
       if (st.st_ctime < st.st_atime) return 7;
       ]])],
-dnl FIXME: simplify this in 2012, when file system bugs are no longer common
-         [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#ifdef __linux__
-/* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
-   in several file systems as recently as 2.6.32.  Always replace futimens
-   to support older kernels.  */
-choke me
-#endif
-      ]])],
-           [gl_cv_func_futimens_works=yes],
-           [gl_cv_func_futimens_works="needs runtime check"])],
+         [gl_cv_func_futimens_works=yes],
          [gl_cv_func_futimens_works=no],
-         [gl_cv_func_futimens_works="guessing no"])
+         [gl_cv_func_futimens_works="guessing yes"])
       rm -f conftest.file])
-    if test "$gl_cv_func_futimens_works" != yes; then
+    if test "$gl_cv_func_futimens_works" = no; then
       REPLACE_FUTIMENS=1
     fi
   fi
-- 
2.7.4

Reply via email to