Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 To: cygwin AT cygwin DOT com Cc: newlib AT sources DOT redhat DOT com Subject: Re: short fread(), but no ferror/feof In-Reply-To: Message-ID: References: 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 , 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 -- 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/