This is the mail archive of the libc-hacker@sourceware.cygnus.com 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]

Re: About fwrite(s, 0, 1, fp)



   From: Ulrich Drepper <drepper@cygnus.com>
   Date: 24 Oct 1998 20:19:58 -0800

   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.

The Irix man page reads:

 Both fread and fwrite always return a nonnegative integer indicating the
 number of items read or written.  This will be equal to nitems unless an
 error occurred, the value of size is zero, or fread or fwrite detect that
 a request has been made to read (or write) more data than is addressable.



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