From: Bruno Haible Date: Fri, 28 Jul 2023 19:36:51 +0000 (+0200) Subject: fnmatch: Ensure that on Cygwin ≥ 3.5.0, Cygwin's native fnmatch is used. X-Git-Tag: v1.0~1016 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=0a99906941f2143ebacb818e048aa83ddade7a0a;p=gnulib.git fnmatch: Ensure that on Cygwin ≥ 3.5.0, Cygwin's native fnmatch is used. Tested by Corinna Vinschen in . * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): On Cygwin, don't force REPLACE_FNMATCH to 1 just because wchar_t is small. --- diff --git a/ChangeLog b/ChangeLog index a4d245537a..02e7fca1df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-07-28 Bruno Haible + + fnmatch: Ensure that on Cygwin ≥ 3.5.0, Cygwin's native fnmatch is used. + Tested by Corinna Vinschen in + . + * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): On Cygwin, don't force + REPLACE_FNMATCH to 1 just because wchar_t is small. + 2023-07-28 Bruno Haible posixcheck: Fix dependencies. diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index 2e1442eff7..e99737a476 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -1,4 +1,4 @@ -# Check for fnmatch - serial 18 -*- coding: utf-8 -*- +# Check for fnmatch - serial 19 -*- coding: utf-8 -*- # Copyright (C) 2000-2007, 2009-2023 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) AC_REQUIRE([gl_FNMATCH_H]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([AC_CANONICAL_HOST]) gl_fnmatch_required_lowercase=` echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]' ` @@ -164,7 +164,17 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], dnl This is due to wchar_t being only 16 bits wide. AC_REQUIRE([gl_UCHAR_H]) if test $SMALL_WCHAR_T = 1; then - REPLACE_FNMATCH=1 + case "$host_os" in + cygwin*) + dnl On Cygwin < 3.5.0, the above $gl_fnmatch_result came out as 'no', + dnl On Cygwin >= 3.5.0, fnmatch supports all Unicode characters, + dnl despite wchar_t being only 16 bits wide (because internally it + dnl works on wint_t values). + ;; + *) + REPLACE_FNMATCH=1 + ;; + esac fi fi if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then