gconv bug and documentation deficiency
Mark Brown
bmark@us.ibm.com
Thu Jan 4 14:34:00 GMT 2001
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
More information about the Libc-alpha
mailing list