From: Joe Buck <jbuck@synopsys.com>
To: gregg@eoeml.gtri.gatech.edu (Greg Galloway)
Cc: egcs@cygnus.com
Subject: Re: linux libio status
Date: Wed, 15 Oct 1997 20:16:00 -0000 [thread overview]
Message-ID: <199710152152.OAA15440@atrus.synopsys.com> (raw)
In-Reply-To: <199710151755.NAA03494@nospokes.gtri.gatech.edu>
> > 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++.
I don't believe that this is safe to do in general. If you're using the
5.3.12 libio you need the matching header. The problem is that some
structures have changed; this may be the cause of your crashes described
below.
> 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);
> }
The fault doesn't occur on Solaris; it may be a libio issue (possibly
tweaked by your use of the wrong libio).
> 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);
> }
Again, once I put in the missing semicolon I have no problem on Solaris.
next prev parent reply other threads:[~1997-10-15 20:16 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-15 12:10 Greg Galloway
1997-10-15 20:16 ` Joe Buck [this message]
1997-10-16 12:58 ` H.J. Lu
-- strict thread matches above, loose matches on Subject: below --
1997-10-15 12:10 Greg Galloway
1997-10-16 12:53 ` H.J. Lu
[not found] <199710150623.XAA06491.cygnus.egcs@atrus.synopsys.com>
1997-10-15 2:10 ` Jason Merrill
1997-10-15 9:15 ` Joe Buck
1997-10-15 11:12 ` Per Bothner
1997-10-15 14:33 ` Joe Buck
1997-10-15 16:51 ` Per Bothner
[not found] ` <199710152351.QAA02138.cygnus.egcs@cygnus.com>
1997-10-16 1:51 ` Jason Merrill
1997-10-16 12:58 ` Joe Buck
1997-10-17 12:53 ` Jason Merrill
1997-10-16 12:58 ` Alexandre Oliva
1997-10-15 16:51 ` Peter Seebach
1997-10-15 14:33 ` Richard Henderson
1997-10-14 23:23 Joe Buck
1997-10-15 0:06 ` Richard Henderson
1997-10-15 0:52 ` Olivier Galibert
1997-10-15 11:12 ` Joe Buck
1997-10-15 12:10 ` Olivier Galibert
1997-10-15 20:16 ` Joe Buck
1997-10-15 20:16 ` Olivier Galibert
1997-10-16 12:53 ` Pal Engstad
1997-10-15 11:12 ` Peter Seebach
1997-10-15 20:16 ` Joe Buck
[not found] ` <199710151419.JAA20162.cygnus.egcs@monolith.solon.com>
1997-10-15 16:51 ` Jason Merrill
1997-10-15 20:16 ` Peter Seebach
1997-10-15 22:29 ` Jason Merrill
1997-10-16 8:31 ` Peter Seebach
1997-10-16 15:19 ` Jason Merrill
1997-10-16 12:53 ` Peter Seebach
1997-10-16 15:19 ` Paul Koning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199710152152.OAA15440@atrus.synopsys.com \
--to=jbuck@synopsys.com \
--cc=egcs@cygnus.com \
--cc=gregg@eoeml.gtri.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).