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: Mon, 13 Dec 2004 21:53:01 +0100 (MET) From: Peter Astrand To: Jeff Johnston Cc: cygwin AT cygwin DOT com, newlib AT sources DOT redhat DOT com Subject: Re: short fread(), but no ferror/feof In-Reply-To: <41BDF3A0.6020909@redhat.com> Message-ID: References: <41BDF3A0 DOT 6020909 AT redhat DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id iBDKrUw2020470 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 -- 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/