]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
fstatat: don’t mess with CFLAGS master
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Jun 2026 17:07:47 +0000 (10:07 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Jun 2026 17:10:07 +0000 (10:10 -0700)
* m4/fstatat.m4 (gl_FUNC_FSTATAT): Remove stray code left
over from an aborted attempt to mess with CFLAGS.
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-06/msg00084.html

ChangeLog
m4/fstatat.m4

index bc891e35817bbe80ce8a1f1ca92189ae93e877ac..6fd9e8ce3870fba0a0e1674481519b4ec11d77bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2026-06-19  Paul Eggert  <eggert@cs.ucla.edu>
 
+       fstatat: don’t mess with CFLAGS
+       * m4/fstatat.m4 (gl_FUNC_FSTATAT): Remove stray code left
+       over from an aborted attempt to mess with CFLAGS.
+       Problem reported by Bruno Haible in:
+       https://lists.gnu.org/r/bug-gnulib/2026-06/msg00084.html
+
        openat2-tests: port to NFS
        * tests/test-openat2.c (do_test_basic): Close fd before
        removing its file.  This fixes a file descriptor leak,
index ceeb211d34acb46713556dd25881c19cd05ffbc4..b706c891a47d63e75bc61819c6b1ed4e1591d9d5 100644 (file)
@@ -1,5 +1,5 @@
 # fstatat.m4
-# serial 6
+# serial 7
 dnl Copyright (C) 2004-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -70,9 +70,7 @@ AC_DEFUN([gl_FUNC_FSTATAT],
       [0],
         [AC_CACHE_CHECK([whether fstatat+AT_EMPTY_PATH allows null file],
            [gl_cv_func_fstatat_null_file],
-           [gl_saved_CFLAGS=$CFLAGS
-            CFLAGS="$CFLAGS -Wno-nonnull"
-            AC_RUN_IFELSE(
+           [AC_RUN_IFELSE(
               [AC_LANG_PROGRAM(
                  [[#include <stddef.h>
                    #include <fcntl.h>
@@ -80,6 +78,8 @@ AC_DEFUN([gl_FUNC_FSTATAT],
                    #ifndef AT_EMPTY_PATH
                     #define AT_EMPTY_PATH 0
                    #endif
+                   /* Don't check via -Wnonnull, as the problem could in
+                      theory exist with compilers lacking -Wnonnull.  */
                    #if __GLIBC__ && ! (2 < __GLIBC__ + (41 <= __GLIBC_MINOR__))
                     #error "glibc 2.40 and earlier can fail with null file"
                    #endif