]> Savannah Git Hosting - gnulib.git/commitdiff
utimensat: Make sure exit status in configure check doesn't exceed 127.
authorCollin Funk <collin.funk1@gmail.com>
Wed, 19 Mar 2025 01:12:39 +0000 (18:12 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Wed, 19 Mar 2025 01:12:39 +0000 (18:12 -0700)
Reported by Bruno Haible in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00061.html>.

* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Merge bits for tests to match
expectations on current platforms.

ChangeLog
m4/utimensat.m4

index ca5aa4b676ba0c6f6c9f9825d1686ebbaaf75b6b..7a5c6632d167e0bdd8cc445efd45d8ca64ffc67d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-03-18  Collin Funk  <collin.funk1@gmail.com>
+
+       utimensat: Make sure exit status in configure check doesn't exceed 127.
+       Reported by Bruno Haible in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00061.html>.
+       * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Merge bits for tests to match
+       expectations on current platforms.
+
 2025-03-17  Collin Funk  <collin.funk1@gmail.com>
 
        utimensat: Increment serial number for previous commit.
index 17caea5f68ad1aa7588f69f33bb347b1bc2ff600..d017af37b25fac0ab27759446c76eade022a21c4 100644 (file)
@@ -1,5 +1,5 @@
 # utimensat.m4
-# serial 13
+# serial 14
 dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -67,11 +67,11 @@ AC_DEFUN([gl_FUNC_UTIMENSAT],
                 ts[1].tv_sec = 1;
                 ts[1].tv_nsec = UTIME_OMIT;
                 if (utimensat (AT_FDCWD, f, ts, 0))
-                  result |= 16;
+                  result |= 8;
                 if (stat (f, &st))
-                  result |= 32;
+                  result |= 8;
                 else if (st.st_ctime < st.st_atime)
-                  result |= 64;
+                  result |= 16;
               }
               enum
               {
@@ -90,7 +90,7 @@ AC_DEFUN([gl_FUNC_UTIMENSAT],
                 ts[1].tv_sec = 1;
                 ts[1].tv_nsec = 0;
                 if (utimensat (AT_FDCWD, f, ts, 0) == 0)
-                  result |= 128;
+                  result |= 32;
               }
               return result;
             ]])],