This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: About fwrite(s, 0, 1, fp)
- To: hjl@lucon.org (H.J. Lu)
- Subject: Re: About fwrite(s, 0, 1, fp)
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 25 Oct 1998 08:49:18 -0800
- Cc: libc-hacker@cygnus.com
- References: <m0zXSwB-000396C@ocean.lucon.org>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
hjl@lucon.org (H.J. Lu) writes:
> > ISO C says:
> >
> > The fwrite function returns the number of elements successfully
> > written, which will be less then nmemb only if a write error is
> > encountered.
> >
> > I.e., returning 1 is correct. There was no write error. Another bug
> > in the testsuite.
> >
>
> I am not sure about it. If everyone else returns 0, it doesn't make
> glibc look good. Can someone check VC++?
This really is no comparison. But I think the words of ISO C are
clear about this case. There definitely was no write error.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------