+2003-01-12 Bruno Haible <bruno@clisp.org>
+
+ * linebreak.c (iconv_string_keeping_offsets): Add an assertion, to
+ protect against Solaris 2.9 iconv() bug.
+
2003-01-10 Bruno Haible <bruno@clisp.org>
* linebreak.c (mbs_possible_linebreaks, mbs_width_linebreaks):
}
/* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
#if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
{
char *outptr = tmpbuf;
size_t outsize = TMPBUFSIZE;
outsize = m + extra;
while (inptr < s_end)
{
+ const char *saved_inptr;
size_t insize;
size_t res;
offtable[inptr - s] = outptr - t;
+ saved_inptr = inptr;
res = (size_t)(-1);
for (insize = 1; inptr + insize <= s_end; insize++)
{
res = iconv (cd, (ICONV_CONST char **) &inptr, &insize, &outptr, &outsize);
if (!(res == (size_t)(-1) && errno == EINVAL))
break;
+ /* We expect that no input bytes have been consumed so far. */
+ if (inptr != saved_inptr)
+ abort ();
}
/* After we verified the convertibility and computed the translation's
size m, there shouldn't be any conversion error here. */
}
/* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
#if defined _LIBICONV_VERSION \
- || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
if (iconv (cd, NULL, NULL, &outptr, &outsize) == (size_t)(-1))
abort ();
#endif
+2003-01-12 Bruno Haible <bruno@clisp.org>
+
+ * write-po.c (wrap): Add an assertion, to protect against Solaris 2.9
+ iconv() bug.
+
2003-01-10 Bruno Haible <bruno@clisp.org>
* po-charset.c (po_lex_charset_set): Work around Solaris 2.9 iconv()
&outptr, &outsize);
if (!(res == (size_t)(-1) && errno == EINVAL))
break;
+ /* We expect that no input bytes have been consumed
+ so far. */
+ if (inptr != ep)
+ abort ();
}
if (res == (size_t)(-1))
{
&outptr, &outsize);
if (!(res == (size_t)(-1) && errno == EINVAL))
break;
+ /* We expect that no input bytes have been consumed
+ so far. */
+ if (inptr != ep)
+ abort ();
}
if (res == (size_t)(-1))
{