From: Bruno Haible Date: Mon, 12 May 2003 09:45:47 +0000 (+0000) Subject: Avoid an unjustified "conversion error" on long strings. X-Git-Tag: v0.12~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1b9ee525b71d204da5e2f7a186b355847e229e5;p=thirdparty%2Fgettext.git Avoid an unjustified "conversion error" on long strings. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index ced807b5c..38e7343da 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2003-05-10 Bruno Haible + + * msgl-iconv.c (iconv_string): Don't return -1 just because the string + is longer than 4 KB. + Reported by Denis Barbier . + 2003-05-04 Bruno Haible * po-lex.h (po_gram_error): Don't use ISO C 99 feature on DEC C. diff --git a/gettext-tools/src/msgl-iconv.c b/gettext-tools/src/msgl-iconv.c index 1bebd6157..e32c6bf2e 100644 --- a/gettext-tools/src/msgl-iconv.c +++ b/gettext-tools/src/msgl-iconv.c @@ -84,7 +84,9 @@ iconv_string (iconv_t cd, const char *start, const char *end, if (res == (size_t)(-1)) { - if (errno == EINVAL) + if (errno == E2BIG) + ; + else if (errno == EINVAL) break; else return -1;