short fread(), but no ferror/feof
Fri Dec 10 12:41:00 GMT 2004
On Thu, 9 Dec 2004, Igor Pechtchanski wrote:
> > >> I've discovered that fread(ptr, size, nitems, stream) sometimes returns a
> > >> value less than "nitems", but does not set feof() nor ferror(). As I
> > >A simple, compilable test case with results shown on both linux and
> > >cygwin would prove your theory.
> > Here you go; example follows. Test run on Linux:
> According to <http://sources.redhat.com/ml/newlib/2004/msg00478.html>, the
> patch was checked in on Oct 26. Cygwin uses the latest version of newlib.
> Cygwin 1.5.12-1 was released on Nov 10, so it should contain this patch.
> You can verify this by downloading the Cygwin source package, and looking
> at newlib/libc/stdio/fread.c.
I've tested http://sources.redhat.com/ml/newlib/2004/txt00003.txt on
Cygwin, and it works. So, most probably, Cygwin uses the "fixed" newlib.
However, since my example code
(http://cygwin.com/ml/cygwin/2004-12/msg00305.html) still fails, something
is still wrong. Is it possible the the "fix" above actually caused this
/Peter Åstrand <email@example.com>
More information about the Newlib