This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ping[3]: [PATCH][BZ #11741] printf should return negative valueon I/O error


On Fri, Nov 16, 2012 at 12:17 AM, Siddhesh Poyarekar
<siddhesh@redhat.com> wrote:
> On Thu, 15 Nov 2012 23:58:30 -0500, Carlos wrote:
>> I expect xsputn to return the number of bytes written, including 0,
>> and never EOF, since that is what ISO C++ says.
>>
>> If we aren't going to follow exactly what xsputn does in C++ then we
>> should add a very large warning about this.
>
> vfprintf currently needs the EOF to determine if an error had
> occurred.  libstdc++ does not use libio any more, so glibc is the only
> user here.  Do we still need to retain the C++ semantics?

Thanks for digging into the details here.

No, we don't need to retain the C++ semantics, but we need to adjust
the comments in the libio headers to mention this and comment on the
differences between ISO C++ and what we have implemented here.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]