From: Bruno Haible Date: Mon, 17 Feb 2025 07:26:28 +0000 (+0100) Subject: strncasecmp_l: Fix replacement implementation. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=515d5b58e97afee4cfb2a5b286447f2269498ff6;p=gnulib.git strncasecmp_l: Fix replacement implementation. * lib/strncasecmp_l.c (strncasecmp_l): Use tolower_l, not tolower. --- diff --git a/ChangeLog b/ChangeLog index 86c6d81190..efa4b77392 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-02-17 Bruno Haible + + strncasecmp_l: Fix replacement implementation. + * lib/strncasecmp_l.c (strncasecmp_l): Use tolower_l, not tolower. + 2025-02-17 Bruno Haible strcasecmp, strncasecmp: Fix compilation error on MSVC. diff --git a/lib/strncasecmp_l.c b/lib/strncasecmp_l.c index f20cdc7155..c049015caf 100644 --- a/lib/strncasecmp_l.c +++ b/lib/strncasecmp_l.c @@ -61,8 +61,8 @@ strncasecmp_l (const char *s1, const char *s2, size_t n, locale_t locale) do { - c1 = tolower ((unsigned char) *s1); - c2 = tolower ((unsigned char) *s2); + c1 = tolower_l ((unsigned char) *s1, locale); + c2 = tolower_l ((unsigned char) *s2, locale); if (--n == 0 || c1 == '\0') break;