From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: egcs@cygnus.com Cc: drepper@gnu.ai.mit.edu (Ulrich Drepper) Subject: An egcs patch for libio Date: Wed, 03 Dec 1997 12:54:00 -0000 Message-id: X-SW-Source: 1997-12/msg00203.html 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 }