www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/11/10:18:39

Date: Thu, 11 May 2000 09:31:42 -0400 (EDT)
Message-Id: <200005111331.JAA13189@indy.delorie.com>
From: Eli Zaretskii <eliz AT delorie DOT com>
To: "Thomas J. Hruska" <shinelight AT crosswinds DOT net>
CC: djgpp AT delorie DOT com
In-reply-to: <3.0.6.32.20000511021045.007af4a0@pop.crosswinds.net>
(shinelight AT crosswinds DOT net)
Subject: Re: feof(FILE *) NOT portable...
References: <8empao$5k6$1 AT nnrp02 DOT primenet DOT com>
<390ef9f9$0$72098 AT SSP1NO17 DOT highway DOT telekom DOT at>
<8emvhq$7mn$1 AT nnrp03 DOT primenet DOT com>
<3 DOT 0 DOT 6 DOT 32 DOT 20000505015633 DOT 007b2210 AT pop DOT crosswinds DOT net>
<3 DOT 0 DOT 6 DOT 32 DOT 20000510204858 DOT 007b6e40 AT pop DOT crosswinds DOT net> <3 DOT 0 DOT 6 DOT 32 DOT 20000511021045 DOT 007af4a0 AT pop DOT crosswinds DOT net>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Thu, 11 May 2000 02:10:45 -0500
> From: "Thomas J. Hruska" <shinelight AT crosswinds DOT net>
> 
> My aim is to prove which one doesn't follow the ANSI standard: gcc
> and all ports of it, or Borland.

My references indicate that the end-of-file condition should be set
when the stream is at the end of the file, that is, when you already
read all of the file's characters, but not before.

So it looks like DJGPP's implementation is correct.

And, btw, the library doesn't have anything to do with the compiler.
In particular, the Linux library is an entirely different beast than
the DJGPP library, although both DJGPP and Linux use GCC as their
compiler.

> So, to begin my proof, I went onto the manpages for Linux (on feof) and
> discovered that the manpages claim to be following the specifications in
> "C3.159-1989"  I have searched both ANSI.org and NSSN.org as well as
> regular web search engines for this particular document.  However, I am
> unable to find this document or anything newer.

The ANSI standard is not available on-line, ANSI/ISO sell it for quite
a large sum of money.

You can find the draft of the newest so-called C99 Standard, though.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019