[PATCH] Don't error out writing a multibyte character to an unbuffered stream (bug 17522)

Carlos O'Donell carlos@redhat.com
Mon Nov 3 19:47:00 GMT 2014


On 11/03/2014 03:53 AM, Andreas Schwab wrote:
> "Carlos O'Donell" <carlos@redhat.com> writes:
> 
>> I expect it is unsupported to write a partial multi-byte character
>> to an unbuffered stream? You have nowhere to store the partial
>> character so you just return an error. Which makes sense to me,
>> but I wanted to be explicit.
> 
> That question doesn't make sense to me.  The wide character I/O
> functions write wide characters, which cannot be partial.  In any case,
> there is no change in that behaviour in any way.

You are absolutely correct. I'm not sure what I was thinking. All of the
output is converting from wchar_t to mb, and a wchar_t is always a complete
character.

You patch makes things better. Thanks for fixing things.

Cheers,
Carlos.



More information about the Libc-alpha mailing list