From: Bruno Haible Date: Mon, 19 Jun 2006 10:42:59 +0000 (+0000) Subject: Treat NetBSD iconv like IRIX iconv. X-Git-Tag: v0.15~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3d23ef90e8412f4d79fe65d96c261fba0703b10;p=thirdparty%2Fgettext.git Treat NetBSD iconv like IRIX iconv. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 5225b8ff1..6afa1869f 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,8 @@ +2006-06-17 Bruno Haible + + * iconvstring.c (iconv_string): Recognize conversion failures also + from NetBSD's iconv(). + 2006-06-17 Bruno Haible * config.charset: Update for NetBSD 3.0. diff --git a/gettext-tools/lib/iconvstring.c b/gettext-tools/lib/iconvstring.c index cd0d9af63..ece5e26a0 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