summaryrefslogtreecommitdiff
path: root/0002-iconv-restore-verbosity-with-unrecognized-encoding-n.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-10-09 03:36:26 +0000
committerCoprDistGit <infra@openeuler.org>2024-10-09 03:36:26 +0000
commitdb43dfdfa8bc2b938582aef3d87e43594c13ee50 (patch)
tree47b95b2f6ac8d8b7e6fa373a5bd7d661bf7234df /0002-iconv-restore-verbosity-with-unrecognized-encoding-n.patch
parentb933872de72b006230559f77acc3ccfb38a1f343 (diff)
automatic import of glibcopeneuler20.03
Diffstat (limited to '0002-iconv-restore-verbosity-with-unrecognized-encoding-n.patch')
-rw-r--r--0002-iconv-restore-verbosity-with-unrecognized-encoding-n.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/0002-iconv-restore-verbosity-with-unrecognized-encoding-n.patch b/0002-iconv-restore-verbosity-with-unrecognized-encoding-n.patch
new file mode 100644
index 0000000..eb18910
--- /dev/null
+++ b/0002-iconv-restore-verbosity-with-unrecognized-encoding-n.patch
@@ -0,0 +1,32 @@
+From 63250e9c571314b6daa2c949ea0af335ee766751 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@suse.de>
+Date: Tue, 1 Aug 2023 17:01:37 +0200
+Subject: [PATCH 2/4] iconv: restore verbosity with unrecognized encoding names
+ (bug 30694)
+
+Commit 91927b7c76 ("Rewrite iconv option parsing [BZ #19519]") changed the
+iconv program to call __gconv_open directly instead of the iconv_open
+wrapper, but the former does not set errno. Update the caller to
+interpret the return codes like iconv_open does.
+
+(cherry picked from commit fc72b6d7d818ab2868920af956d1542d03342a4d)
+---
+ iconv/iconv_prog.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
+index bee898c63c..cf32cf9b44 100644
+--- a/iconv/iconv_prog.c
++++ b/iconv/iconv_prog.c
+@@ -187,7 +187,7 @@ main (int argc, char *argv[])
+
+ if (res != __GCONV_OK)
+ {
+- if (errno == EINVAL)
++ if (res == __GCONV_NOCONV || res == __GCONV_NODB)
+ {
+ /* Try to be nice with the user and tell her which of the
+ two encoding names is wrong. This is possible because
+--
+2.33.0
+