+2001-05-02 Bruno Haible <haible@clisp.cons.org>
+
+ * linebreak.c (iconv_string_keeping_offsets): Work around a glibc-2.1
+ bug.
+
2001-04-19 Bruno Haible <haible@clisp.cons.org>
* gettext-0.10.37 released.
const char *inptr;
char *outptr;
size_t outsize;
+ /* Avoid glibc-2.1 bug. */
+#if !defined _LIBICONV_VERSION && (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1)
+ const size_t extra = 1;
+#else
+ const size_t extra = 0;
+#endif
for (i = 0; i < n; i++)
offtable[i] = (size_t)(-1);
s_end = s + n;
inptr = s;
outptr = t;
- outsize = m;
+ outsize = m + extra;
while (inptr < s_end)
{
size_t insize;
abort ();
#endif
/* We should have produced exactly m output bytes. */
- if (outsize != 0)
+ if (outsize != extra)
abort ();
}