summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-06-19 10:42:59 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:13:24 +0200
commitd3d23ef90e8412f4d79fe65d96c261fba0703b10 (patch)
treea75d7fc179d03ab6220b54a21d878abf2892e60c
parent15c79247813c8aba7e7dfb7439a5eb1de289fdd1 (diff)
downloadexternal_gettext-d3d23ef90e8412f4d79fe65d96c261fba0703b10.zip
external_gettext-d3d23ef90e8412f4d79fe65d96c261fba0703b10.tar.gz
external_gettext-d3d23ef90e8412f4d79fe65d96c261fba0703b10.tar.bz2
Treat NetBSD iconv like IRIX iconv.
-rw-r--r--gettext-tools/lib/ChangeLog5
-rw-r--r--gettext-tools/lib/iconvstring.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog
index 5225b8f..6afa186 100644
--- a/gettext-tools/lib/ChangeLog
+++ b/gettext-tools/lib/ChangeLog
@@ -1,5 +1,10 @@
2006-06-17 Bruno Haible <bruno@clisp.org>
+ * iconvstring.c (iconv_string): Recognize conversion failures also
+ from NetBSD's iconv().
+
+2006-06-17 Bruno Haible <bruno@clisp.org>
+
* config.charset: Update for NetBSD 3.0.
2006-06-17 Bruno Haible <bruno@clisp.org>
diff --git a/gettext-tools/lib/iconvstring.c b/gettext-tools/lib/iconvstring.c
index cd0d9af..ece5e26 100644
--- a/gettext-tools/lib/iconvstring.c
+++ b/gettext-tools/lib/iconvstring.c
@@ -76,8 +76,9 @@ iconv_string (iconv_t cd, const char *start, const char *end,
else
return -1;
}
-# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi)
- /* Irix iconv() inserts a NUL byte if it cannot convert. */
+# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi || defined __NetBSD__)
+ /* Irix iconv() inserts a NUL byte if it cannot convert.
+ NetBSD iconv() inserts a '?' byte if it cannot convert. */
else if (res > 0)
return -1;
# endif
@@ -131,8 +132,9 @@ iconv_string (iconv_t cd, const char *start, const char *end,
else
return -1;
}
-# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi)
- /* Irix iconv() inserts a NUL byte if it cannot convert. */
+# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi || defined __NetBSD__)
+ /* Irix iconv() inserts a NUL byte if it cannot convert.
+ NetBSD iconv() inserts a '?' byte if it cannot convert. */
else if (res > 0)
return -1;
# endif