]> Savannah Git Hosting - gnulib.git/commitdiff
fnmatch: Override fnmatch from glibc versions < 2.22.
authorBruno Haible <bruno@clisp.org>
Wed, 16 Aug 2023 19:47:26 +0000 (21:47 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 30 Aug 2023 09:43:03 +0000 (11:43 +0200)
* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Force REPLACE_FNMATCH=1 in
glibc versions < 2.22.

ChangeLog
m4/fnmatch.m4

index 26d25b4ef9a72acb8e6f4baa1faf1c98a419b651..f8645fcc96aa259eee0236ac362e1d87f4f5e20b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-08-16  Bruno Haible  <bruno@clisp.org>
+
+       fnmatch: Override fnmatch from glibc versions < 2.22.
+       * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Force REPLACE_FNMATCH=1 in
+       glibc versions < 2.22.
+
 2023-08-16  Bruno Haible  <bruno@clisp.org>
 
        tests: Avoid some test failures on Slackware 13.37.
index eba70de2bc67677a3ec77b976ec38d8c02d47a34..1e21960f08e8759a7cb9e155b34efe82b0803509 100644 (file)
@@ -1,4 +1,4 @@
-# Check for fnmatch - serial 17  -*- coding: utf-8 -*-
+# Check for fnmatch - serial 17.1  -*- coding: utf-8 -*-
 
 # Copyright (C) 2000-2007, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -108,6 +108,17 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
                  exists in glibc 2.12, fixed in glibc 2.13.  */
               if (!y ("[/b", "[/b", 0)) /*"]]"*/
                 result |= 4;
+              /* glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=17062>
+                 is fixed in glibc 2.20.
+                 glibc bugs <https://sourceware.org/bugzilla/show_bug.cgi?id=18032>
+                            <https://sourceware.org/bugzilla/show_bug.cgi?id=18036>
+                 are fixed in glibc 2.22.
+                 These bugs are not easy to test for reliably (without mmap),
+                 therefore test the glibc version.  */
+              #if defined __GLIBC__
+              if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 22)
+                result |= 4;
+              #endif
               /* This test fails on FreeBSD 13.2, NetBSD 9.3, Cygwin 3.4.6.  */
               if (!y ("[[:alnum:]]", "a", 0))
                 result |= 8;