This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix BZ # 2074
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 11 Apr 2012 09:44:05 -0700 (PDT)
- Subject: Re: Fix BZ # 2074
- References: <hoobqyya8e.fsf@byrd.suse.de>
That does seem to make the documentation consistent with the code.
The comment on __io_write_fn in libio/libio.h needs to be changed too.
Since that's the interface, it's unfortunate that we use ssize_t in the
type signatures. They very much look like they are intended to be exactly
the interfaces of read and write (with the int fd replaced with the void
*cookie). In fact, I'm quite sure that was my original intention in the
pre-libio stdio implementation. If there's any way we can compatibly
recover the situation so the functions have the more-obvious interfaces,
that seems like the best thing to me. But even in the interface described
by the __io_write_fn comment is not quite analogous to write's interface,
since write can return short counts.
Thanks,
Roland