This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: gconv bug and documentation deficiency
- To: Owen Taylor <otaylor at redhat dot com>, <libc-alpha at sources dot redhat dot com>
- Subject: Re: gconv bug and documentation deficiency
- From: Mark Brown <bmark at us dot ibm dot com>
- Date: Thu, 04 Jan 2001 16:34:55 -0600
on 04/01/01 4:01 PM, Owen Taylor at otaylor@redhat.com wrote:
> The documentation deficiency:
>
> iconv() can exit with an errno of E2BIG for 2 reasons:
>
> - The output buffer is full
> - An internal intermediate buffer is full
>
> This means that a result of E2BIG does not necessarily mean that the
> output buffer needs to be expanded. However the docs say:
>
> `E2BIG'
> The conversion stopped because it ran out of space in the
> output buffer.
>
> Which is confusing. Of course, the wording in the standard is the
> same, so its not completely clear that the behavior of glibc here is
> legal...
The standard (SUSv2) allows for other errors that may generate this
errno, as long as no other errno is generated for the case
Input conversion stopped due to lack of space in the output buffer.
While it might be nice to differentiate between what the programmer
can and cannot do anything about, the standard does not require
separate errnos.
--
Mark S. Brown bmark@us.ibm.com
Senior Technical Staff Member 512.838.3926 T/L678.3926
IBM RS/6000 AIX System Architecture Mark Brown/Austin/IBM
IBM Corporation, Austin, Texas