www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/25/12:01:39

Date: Sun, 25 Oct 1998 19:45:24 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: Some questions, and some bugs (perhaps)
In-Reply-To: <gunaalubzrpbz.f18t5tb.pminews@news.avnl1.nj.home.com>
Message-ID: <Pine.SUN.3.91.981025194455.24396L-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 22 Oct 1998, Mike Ruskai wrote:

> >> it took me a bit to figure out that ifstream and ofstream objects
> >> weren't assuming ios::in and ios::out, as they should.
> >
> >How do you figure that, and in what version of GCC/libstdcxx did you see 
> >this?
> 
> Isn't it painfully obvious?  ifstream and ofstream are unidirectional file
> stream objects.

It would be much easier talking about this if you'd post a simple
example of a program and a description of the (wrong) behavior that
you see.

> I'm basing the correct behavior on what other C++ compilers
> do, and what common sense dictates.  I don't know of all versions of GCC have
> this bug.

The reason I asked about versions is because the latest GCC
distribution corrected some problems related to iostreams.  It might
be that you are using an old C++ library, and upgrading to the latest
version will solve the bug(s).

> >Use __DJGPP__.  This is explained further in section 8.6 of the DJGPP FAQ 
> >list (v2/faq211b.zip from the same place where you got DJGPP).
> 
> Thanks.  I did not expect to find such information under that section.  I
> don't think it belongs there.

The section's name is ``Writing codes fragments which are specific to
DJGPP'', which seems quite appropriate to me.

Anyway, I suggest to use the indices at the end of the FAQ, since the
Table of Contents is not always enough to find the correct place.

- Raw text -


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