bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

striconv, striconveh: Drop workaround for glibc 2.1


From: Bruno Haible
Subject: striconv, striconveh: Drop workaround for glibc 2.1
Date: Mon, 09 Sep 2024 15:47:11 +0200

glibc 2.2 was released more than 23 years ago. Workarounds for glibc 2.1
are therefore not needed any more.


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.

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))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]