This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
An egcs patch for libio
- To: egcs at cygnus dot com
- Subject: An egcs patch for libio
- From: hjl at lucon dot org (H.J. Lu)
- Date: Wed, 3 Dec 1997 10:54:35 -0800 (PST)
- Cc: drepper at gnu dot ai dot mit dot edu (Ulrich Drepper)
This patch is needed for glibc 2. BTW, libio in egcs is not compatible
with libio in glibc 2.1. I have patches for both glibc 2.1 and egcs.
But they have to go tegether.
FYI, the _lock field in _IO_stdin/_IO_stdout/_IO_stderr is not
newed. It is a static variable.
--
H.J. Lu (hjl@gnu.org)
----
Wed Dec 3 10:49:39 1997 H.J. Lu (hjl@gnu.org)
* streambuf.cc (streambuf::~streambuf): Don't delete _lock
for _IO_stdin/_IO_stdout/_IO_stderr.
Index: streambuf.cc
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/streambuf.cc,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 streambuf.cc
--- streambuf.cc 1997/09/17 20:12:35 1.1.1.3
+++ streambuf.cc 1997/12/03 18:46:48
@@ -220,7 +220,8 @@
{
_IO_default_finish(this,0);
#ifdef _IO_MTSAFE_IO
- delete _lock;
+ if (this != _IO_stdin && this != _IO_stdout && this != _IO_stderr)
+ delete _lock;
#endif
}