Mercurial > gnulib
changeset 27258:866b42d15866
Treat all non-GNU iconv implementations like Irix iconv.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 25 Oct 2006 11:42:18 +0000 |
parents | 800a0321d9b5 |
children | 9f102a5463a8 |
files | ChangeLog lib/striconv.c |
diffstat | 2 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Oct 25 07:38:30 2006 +0000 +++ b/ChangeLog Wed Oct 25 11:42:18 2006 +0000 @@ -1,3 +1,8 @@ +2006-10-24 Bruno Haible <bruno@clisp.org> + + * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU + iconv implementations like Irix iconv. + 2006-10-24 Paul Eggert <eggert@cs.ucla.edu> * modules/vararrays: New file.
--- a/lib/striconv.c Wed Oct 25 07:38:30 2006 +0000 +++ b/lib/striconv.c Wed Oct 25 11:42:18 2006 +0000 @@ -80,8 +80,11 @@ 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 __GLIBC__ + /* Irix iconv() inserts a NUL byte if it cannot convert. + NetBSD iconv() inserts a question mark if it cannot convert. + Only GNU libiconv and GNU libc are known to prefer to fail rather + than doing a lossy conversion. */ else if (res > 0) { errno = EILSEQ; @@ -147,8 +150,11 @@ 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 __GLIBC__ + /* Irix iconv() inserts a NUL byte if it cannot convert. + NetBSD iconv() inserts a question mark if it cannot convert. + Only GNU libiconv and GNU libc are known to prefer to fail rather + than doing a lossy conversion. */ else if (res > 0) { errno = EILSEQ; @@ -288,8 +294,11 @@ else goto failed; } -# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi) - /* Irix iconv() inserts a NUL byte if it cannot convert. */ +# if !defined _LIBICONV_VERSION && !defined __GLIBC__ + /* Irix iconv() inserts a NUL byte if it cannot convert. + NetBSD iconv() inserts a question mark if it cannot convert. + Only GNU libiconv and GNU libc are known to prefer to fail rather + than doing a lossy conversion. */ else if (res > 0) { errno = EILSEQ;