This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: linux libio status
- To: egcs at cygnus dot com
- Subject: Re: linux libio status
- From: Greg Galloway <gregg at eoeml dot gtri dot gatech dot edu>
- Date: Wed, 15 Oct 1997 13:55:57 -0400
Richard Henderson wrote:
> Joe Buck wrote:
> > We need to silence these warnings. For the NULL, I suggest a global
> > s/NULL/0/ in the C++ iostreams headers.
>
> That's a reasonable solution. In my version of the libio patches,
> I make _G_config.h undef and redefine NULL to avoid this problem.
>
> > I don't know where the missing declarations should go; perhaps HJ has
> > an idea.
>
> I worked around this for Linux/Alpha by providing versions of
> libc-lock.h and stdio-lock.h to install with the newly built library.
> Perhaps we do the same thing for Intel?
I worked around this by copying egcs-971009/libio/libio.h into
/usr/include/g++.
By the way strstream seems to be broken if you let it dynamically allocate
it's own buffer. The following program gives a segmentation fault:
#include <cstdlib>
#include <string>
#include <strstream.h>
main()
{
ostrstream os;
os << "testing " << 123 << ends;
string s = os.str();
exit(0);
}
This one used to work for me under gcc-2.7.2.1 but is also broken with egcs:
#include <cstdlib>
#include <string>
#include <strstream.h>
main()
{
char buf[100]
ostrstream os(buf, 100);
os << "testing " << 123 << ends;
string s = os.str();
exit(0);
}
Greg
----
Gregory L. Galloway
Research Scientist I
http://eoeml.gtri.gatech.edu/home/gregg/