www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/07/07:06:47

From: Stephen Silver <sasilver AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: #include <limits>
Date: 7 Jan 2001 11:58:12 GMT
Organization: none
Lines: 52
Message-ID: <939lkk$31q$1@news7.svr.pol.co.uk>
References: <3A570B97 DOT F3FBA15B AT bigpond DOT com> <9379a7$dv4$1 AT newsg2 DOT svr DOT pol DOT co DOT uk> <3A57BFC6 DOT 19911988 AT bigpond DOT com>
NNTP-Posting-Host: modem-245.singapore-angel.dialup.pol.co.uk
X-Trace: news7.svr.pol.co.uk 978868692 3130 62.136.220.245 (7 Jan 2001 11:58:12 GMT)
NNTP-Posting-Date: 7 Jan 2001 11:58:12 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Frobozz Magic Newsreader
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Ben Harris wrote:

> Stephen, thanks for the reply.
> Are you aware of any other ICO C++ headers that DJGPP (or its
> associated C++ compiler add-on) is missing?

Yes - the C++ library is very patchy in places.  The STL headers are all
present and more-or-less correct, but there are problems with a number
of the other headers.  The current development versions of libstdc++
look much better, but I don't think they will work with GCC 2.95.2,
so it's a matter of waiting for GCC 3.0 to be released (and ported to
DJGPP), which is unlikely to happen before March.

STLport would probably fix most of the problems, but I haven't heard
of anyone who has managed to get it to work with DJGPP.  (Despite the
name, STLport now covers much more than just the STL.  If you want to
try your luck with it, it's available from http://www.stlport.org .)

The most complained about omission in the current GCC C++ library
is <sstream>, but there are at least two free implementations:

  http://sources.redhat.com/ml/libstdc++/2000-q2/msg00700/sstream
  ftp://ftp.fmi.uni-konstanz.de/pub/algo/personal/kuehl/sstream.tgz

I've been using the first one with DJGPP without problems.

<istream> and <ostream> are also missing, but the istream and ostream
classes are defined in <iostream>, so simply typing

  copy iostream istream
  copy iostream ostream

in the appropriate directory cures this problem.

Some things are not easily fixable.  Those that come to mind are:

  (1) The stream classes are defined only in their char specializations
      (although this is usually all you need).
  (2) The char_traits class template that should be in <string> isn't
      there at all.
  (3) <locale> is missing.

Also, the headers define everything in the global namespace instead of
in namespace std, but GCC currently uses a nasty kludge that means that
this at least doesn't stop most correct programs from working.  In any
case, this problem is fixed in development versions of libstdc++.  More
seriously, the DJGPP C headers also have this problem and no-one is
doing anything about it.  (I mentioned this on the DJGPP workers list
last month and got zero reaction, otherwise I would have offered to do
it myself.)

Stephen

- Raw text -


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