Mercurial > hg > octave-kai > gnulib-hg
changeset 7256:58ebe5a656c7
(iconv_alloc): Handle the IRIX iconv behaviour.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 05 Sep 2006 11:54:25 +0000 |
parents | 02d37bd4003c |
children | 6cfed75301b5 |
files | lib/iconvme.c |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/iconvme.c +++ b/lib/iconvme.c @@ -192,6 +192,15 @@ break; } } +# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi) + /* Irix iconv() inserts a NUL byte if it cannot convert. */ + else if (err > 0) + { + errno = EILSEQ; + have_error = 1; + goto out; + } +# endif again2: err = iconv (cd, NULL, NULL, &outp, &outbytes_remaining); @@ -234,6 +243,15 @@ break; } } +# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi) + /* Irix iconv() inserts a NUL byte if it cannot convert. */ + else if (err > 0) + { + errno = EILSEQ; + have_error = 1; + goto out; + } +# endif *outp = '\0';