From 134978bd830b73d9bd7698f8ec2442d541056df1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 9 Sep 2024 15:46:44 +0200 Subject: [PATCH] striconv, striconveh: Drop workaround for glibc 2.1. * lib/striconv.c (str_iconv): Remove glibc-2.1 bug workaround. * lib/striconveh.c (iconveh_open): Likewise. --- ChangeLog | 6 ++++++ lib/striconv.c | 10 ---------- lib/striconveh.c | 11 ----------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0d0a4084b..d1ece9e2b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-09-09 Bruno Haible + + striconv, striconveh: Drop workaround for glibc 2.1. + * lib/striconv.c (str_iconv): Remove glibc-2.1 bug workaround. + * lib/striconveh.c (iconveh_open): Likewise. + 2024-09-08 Jim Meyering crc.h: declare each function with _GL_ATTRIBUTE_PURE diff --git a/lib/striconv.c b/lib/striconv.c index f7d9ccf8e2..74aa969738 100644 --- a/lib/striconv.c +++ b/lib/striconv.c @@ -410,16 +410,6 @@ str_iconv (const char *src, const char *from_codeset, const char *to_codeset) iconv_t cd; char *result; - /* Avoid glibc-2.1 bug with EUC-KR. */ -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \ - && !defined _LIBICONV_VERSION - if (c_strcasecmp (from_codeset, "EUC-KR") == 0 - || c_strcasecmp (to_codeset, "EUC-KR") == 0) - { - errno = EINVAL; - return NULL; - } -# endif cd = iconv_open (to_codeset, from_codeset); if (cd == (iconv_t) -1) return NULL; diff --git a/lib/striconveh.c b/lib/striconveh.c index db83a1ddca..64cf1a1efd 100644 --- a/lib/striconveh.c +++ b/lib/striconveh.c @@ -50,17 +50,6 @@ iconveh_open (const char *to_codeset, const char *from_codeset, iconveh_t *cdp) iconv_t cd1; iconv_t cd2; - /* Avoid glibc-2.1 bug with EUC-KR. */ -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \ - && !defined _LIBICONV_VERSION - if (c_strcasecmp (from_codeset, "EUC-KR") == 0 - || c_strcasecmp (to_codeset, "EUC-KR") == 0) - { - errno = EINVAL; - return -1; - } -# endif - cd = iconv_open (to_codeset, from_codeset); if (STRCASEEQ (from_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0)) -- 2.39.5