This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Ping[3]: [PATCH][BZ #11741] printf should return negative valueon I/O error
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 15 Nov 2012 22:22:26 -0500
- Subject: Re: Ping[3]: [PATCH][BZ #11741] printf should return negative valueon I/O error
- References: <20121019152056.50cd355f@spoyarek><20121029084610.468df3f0@spoyarek><20121105163708.6c90eaa2@spoyarek><20121115140443.053c4bbc@spoyarek>
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.