]> Savannah Git Hosting - gnulib.git/commitdiff
striconv, striconveh: Drop workaround for glibc 2.1.
authorBruno Haible <bruno@clisp.org>
Mon, 9 Sep 2024 13:46:44 +0000 (15:46 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Sep 2024 13:46:44 +0000 (15:46 +0200)
* lib/striconv.c (str_iconv): Remove glibc-2.1 bug workaround.
* lib/striconveh.c (iconveh_open): Likewise.

ChangeLog
lib/striconv.c
lib/striconveh.c

index a0d0a4084b41b0f816710e2e2c5bad697f90d220..d1ece9e2b516212a6e377c1b80b338542ebf1ce9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-09-09  Bruno Haible  <bruno@clisp.org>
+
+       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  <meyering@meta.com>
 
        crc.h: declare each function with _GL_ATTRIBUTE_PURE
index f7d9ccf8e237bd35244fef85b1a691771f9d86fb..74aa96973857e0f908471dee19706b5cc9b8d267 100644 (file)
@@ -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;
index db83a1ddca7e56b563900555de51f057999088eb..64cf1a1efd9528d3c646037acda5d05da0fe43e3 100644 (file)
@@ -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))