GCC include files conundrum.
Craig Rodrigues
rodrigc at crodrigues.org
Mon Mar 15 07:30:41 PST 2004
On Mon, Mar 15, 2004 at 08:59:51AM -0600, Jacques A. Vidrine wrote:
> FreeBSD stopped installing `strstream.h' in January. See rev 1.48 of
> src/gnu/lib/libstdc++/Makefile. The commit log indicates it was removed
> in (some release of) GCC 3.3. I wonder if this is correct though---
strstream.h was removed from the FSF GCC sources:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc%2b%2b-v3/include/backward/Attic/strstream.h
FreeBSD's import of FSF GCC sources reflects this change.
> compiler messages seem to contradict this.
The compiler message in GCC could be wrong in this particular
case for strstream.h.
> It looks to me like tclmidi uses only class ostrstream. The easiest
> solution to your problem would be to add a file named `strstream.h' with
> the following contents:
>
> #include <strstream>
> using std::ostrstream;
>
> The longer term solution is to kill the port, or to port it to Standard
> C++. Porting it to Standard C++ would probably entail rewriting uses of
> <strstream.h> and `ostrstream' to <sstream> and `ostringstream'; and
> rewriting uses of other C++ `.h' headers to the standard form without
> .h; and adding `using namespace std;' liberally.
I've fixed a few ports by doing exactly what you have outlined.
Admittedly, it's grunt work, but......... :)
--
Craig Rodrigues
http://crodrigues.org
rodrigc at crodrigues.org
More information about the freebsd-hackers
mailing list