Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Authentication-Warning: koeberg.lysator.liu.se: astrand owned process doing -bs
Date: Fri, 10 Dec 2004 11:18:12 +0100 (MET)
From: Peter Astrand <astrand@lysator.liu.se>
To: cygwin@cygwin.com
Cc: newlib@sources.redhat.com
Subject: Re: short fread(), but no ferror/feof
In-Reply-To: <Pine.GSO.4.61.0412091946260.19749@slinky.cs.nyu.edu>
Message-ID: <Pine.GSO.4.51L2.0412101102210.19309@koeberg.lysator.liu.se>
References: <Pine.GSO.4.51L2.0412051701370.21199@koeberg.lysator.liu.se> <Pine.GSO.4.51L2.0412092344001.4112@koeberg.lysator.liu.se> <Pine.GSO.4.61.0412091946260.19749@slinky.cs.nyu.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-1
X-Spam-Checker-Version: SpamAssassin 2.63-lysator_fetto_1.2 (2004-01-11) on fetto.lysator.liu.se
X-Spam-Level: 
X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,J_CHICKENPOX_53 autolearn=no version=2.63-lysator_fetto_1.2
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id iBAAIYsm007626

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
problem?


/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/


