This is the mail archive of the cygwin mailing list for the Cygwin 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: short fread(), but no ferror/feof


On Mon, 13 Dec 2004, Jeff Johnston wrote:

> > "fread() shall return the number of elements successfully read which is
> > less than nitems only if a read error or end-of-file is encountered."
> >
>
> Where in the POSIX standard did you find that above line?  I could not locate it
> in mine.  The line above is in SUSV3.

The manpage fread(P) on Fedora Core 2. Is that SUSV3? The last line says
"POSIX", though.


> Regardless, the behavior is wrong.  The same test on a buffered file yields the EOF.
>
> I have posted a patch.

Great!


/Peter Åstrand <astrand@lysator.liu.se>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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