(process_block): (process_block): Save errno value from iconv call.

This commit is contained in:
Ulrich Drepper 1999-10-19 03:29:12 +00:00
parent f6bb03c4f7
commit 23402ab9b6

View File

@ -319,6 +319,8 @@ process_block (iconv_t cd, const char *addr, size_t len, FILE *output)
if (outptr != outbuf)
{
/* We have something to write out. */
int errno_save = errno;
if (fwrite (outbuf, 1, outptr - outbuf, output) < outptr - outbuf
|| ferror (output))
{
@ -327,6 +329,8 @@ process_block (iconv_t cd, const char *addr, size_t len, FILE *output)
conversion stopped due to problem in writing the output"));
return -1;
}
errno = errno_save;
}
if (n != (size_t) -1)