delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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 <astrand AT lysator DOT liu DOT se> |
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: | <Pine.GSO.4.61.0412091946260.19749@slinky.cs.nyu.edu> |
Message-ID: | <Pine.GSO.4.51L2.0412101102210.19309@koeberg.lysator.liu.se> |
References: | <Pine DOT GSO DOT 4 DOT 51L2 DOT 0412051701370 DOT 21199 AT koeberg DOT lysator DOT liu DOT se> <Pine DOT GSO DOT 4 DOT 51L2 DOT 0412092344001 DOT 4112 AT koeberg DOT lysator DOT liu DOT se> <Pine DOT GSO DOT 4 DOT 61 DOT 0412091946260 DOT 19749 AT slinky DOT cs DOT nyu DOT edu> |
MIME-Version: | 1.0 |
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 |
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 AT lysator DOT liu DOT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |