From a7b3ef2fc6216e2a63341466f540f1cdcb30f6b8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 16 Aug 2023 21:47:26 +0200 Subject: [PATCH] fnmatch: Override fnmatch from glibc versions < 2.22. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Force REPLACE_FNMATCH=1 in glibc versions < 2.22. --- ChangeLog | 6 ++++++ m4/fnmatch.m4 | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3b46b05de4..855bfed490 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-08-16 Bruno Haible + + 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-13 Bruno Haible stdint: Fix configure test result with gcc 4.7 or 4.8. diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index 626aa00878..6b8634dd30 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -1,4 +1,4 @@ -# Check for fnmatch - serial 15.1 -*- coding: utf-8 -*- +# Check for fnmatch - serial 15.2 -*- 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 + is fixed in glibc 2.20. + glibc bugs + + 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; -- 2.39.5