aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gnu.org>1997-12-06 00:32:08 -0700
committerJeff Law <law@gcc.gnu.org>1997-12-06 00:32:08 -0700
commita58248fa8a1efab68d49eb51f48821864be2e77a (patch)
treec7997ffcc716eab50b0e84ff6357fe827a036f96 /libio
parent7211716df46060793d33a8ec61a5b952007f68e7 (diff)
downloadgcc-a58248fa8a1efab68d49eb51f48821864be2e77a.zip
gcc-a58248fa8a1efab68d49eb51f48821864be2e77a.tar.gz
gcc-a58248fa8a1efab68d49eb51f48821864be2e77a.tar.bz2
streambuf.cc (streambuf::~streambuf): Don't delete _lock for _IO_stdin/_IO_stdout/_IO_stderr.
* streambuf.cc (streambuf::~streambuf): Don't delete _lock for _IO_stdin/_IO_stdout/_IO_stderr. From-SVN: r16972
Diffstat (limited to 'libio')
-rw-r--r--libio/ChangeLog7
-rw-r--r--libio/streambuf.cc3
2 files changed, 8 insertions, 2 deletions
diff --git a/libio/ChangeLog b/libio/ChangeLog
index 56dc893..3e730b6 100644
--- a/libio/ChangeLog
+++ b/libio/ChangeLog
@@ -1,6 +1,11 @@
+Fri Dec 5 16:22:15 1997 H.J. Lu (hjl@gnu.org)
+
+ * streambuf.cc (streambuf::~streambuf): Don't delete _lock
+ for _IO_stdin/_IO_stdout/_IO_stderr.
+
Thu Nov 27 01:32:43 1997 Jeffrey A Law (law@cygnus.com)
- * Makefile.in (insatll): Change gxx_includedir to gcc_include_dir.
+ * Makefile.in (install): Change gxx_includedir to gcc_include_dir.
* config.shared (gxx_includedir): Remove default definition.
* config/linux.mt: Change gxx_includedir to gxx_include_dir.
* config/linuxaxp1.mt: Likewise.
diff --git a/libio/streambuf.cc b/libio/streambuf.cc
index e87590f..4393cf0 100644
--- a/libio/streambuf.cc
+++ b/libio/streambuf.cc
@@ -220,7 +220,8 @@ streambuf::~streambuf()
{
_IO_default_finish(this,0);
#ifdef _IO_MTSAFE_IO
- delete _lock;
+ if (this != _IO_stdin && this != _IO_stdout && this != _IO_stderr)
+ delete _lock;
#endif
}