Ping[3]: [PATCH][BZ #11741] printf should return negative value on I/O error
Carlos O'Donell
carlos@systemhalted.org
Fri Nov 16 03:22:00 GMT 2012
On Thu, Nov 15, 2012 at 3:34 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> Ping!
>
> On Mon, 5 Nov 2012 16:37:08 +0530, Siddhesh wrote:
>
>> Ping!
>>
>> http://sourceware.org/ml/libc-alpha/2012-10/msg00500.html
I had to do a bit of a double take when Andreas said
sputn returns either EOF or number of bytes written.
I realize now he meant _IO_sputn returns EOF or number
of bytes written, and that he wasn't talking about the
equivalent C++ function (which returns number of bytes
written and never EOF).
Though when I look at the code I don't see that _IO_sputn
can ever return EOF, so while your change is robust, it's
not really required. As far as I see _IO_sputn is the same
as _IO_default_xsputn, which always returns the number of
bytes written.
Therefore your changes to libio/iopadn.c and libio/iowpadn.c
are superfluous.
Can you please confirm that you need those changes?
Cheers,
Carlos.
More information about the Libc-alpha
mailing list