From 0a99906941f2143ebacb818e048aa83ddade7a0a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 28 Jul 2023 21:36:51 +0200 Subject: [PATCH] =?utf8?q?fnmatch:=20Ensure=20that=20on=20Cygwin=20?= =?utf8?q?=E2=89=A5=203.5.0,=20Cygwin's=20native=20fnmatch=20is=20used.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- ChangeLog | 8 ++++++++ m4/fnmatch.m4 | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) 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 -- 2.39.5