summaryrefslogtreecommitdiff
path: root/lib/iconv_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/iconv_open.c')
-rw-r--r--lib/iconv_open.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/iconv_open.c b/lib/iconv_open.c
index 2be02eff..c54b8ee6 100644
--- a/lib/iconv_open.c
+++ b/lib/iconv_open.c
@@ -1,5 +1,5 @@
/* Character set conversion.
- Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -33,8 +33,6 @@
#define ICONV_FLAVOR_AIX "iconv_open-aix.h"
#define ICONV_FLAVOR_HPUX "iconv_open-hpux.h"
-#define ICONV_FLAVOR_IRIX "iconv_open-irix.h"
-#define ICONV_FLAVOR_OSF "iconv_open-osf.h"
#define ICONV_FLAVOR_SOLARIS "iconv_open-solaris.h"
#define ICONV_FLAVOR_ZOS "iconv_open-zos.h"
@@ -53,8 +51,6 @@ rpl_iconv_open (const char *tocode, const char *fromcode)
#if REPLACE_ICONV_UTF
/* Special handling of conversion between UTF-8 and UTF-{16,32}{BE,LE}.
- Do this here, before calling the real iconv_open(), because OSF/1 5.1
- iconv() to these encoding inserts a BOM, which is wrong.
We do not need to handle conversion between arbitrary encodings and
UTF-{16,32}{BE,LE}, because the 'striconveh' module implements two-step
conversion through UTF-8.
@@ -71,7 +67,7 @@ rpl_iconv_open (const char *tocode, const char *fromcode)
&& c_toupper (tocode[2]) == 'F'
&& tocode[3] == '-')
{
- if (strcmp (fromcode + 4, "8") == 0)
+ if (streq (fromcode + 4, "8"))
{
if (c_strcasecmp (tocode + 4, "16BE") == 0)
return _ICONV_UTF8_UTF16BE;
@@ -82,7 +78,7 @@ rpl_iconv_open (const char *tocode, const char *fromcode)
if (c_strcasecmp (tocode + 4, "32LE") == 0)
return _ICONV_UTF8_UTF32LE;
}
- else if (strcmp (tocode + 4, "8") == 0)
+ else if (streq (tocode + 4, "8"))
{
if (c_strcasecmp (fromcode + 4, "16BE") == 0)
return _ICONV_UTF16BE_UTF8;
@@ -115,8 +111,7 @@ rpl_iconv_open (const char *tocode, const char *fromcode)
}
/* Convert the encodings to upper case, because
- 1. in the arguments of iconv_open() on AIX, HP-UX, and OSF/1 the case
- matters,
+ 1. in the arguments of iconv_open() on AIX and HP-UX, the case matters,
2. it makes searching in the table faster. */
{
const char *p = fromcode;