From ba74fdcabf01780e32b129bc74c27c95ea7105a8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 19 Dec 1997 08:32:04 +0000 Subject: [PATCH] configure.in (target frags): Add *-linux-gnu. * configure.in (target frags): Add *-linux-gnu. * streambuf.cc (streambuf::~streambuf): Don't delete _lock for _IO_stdin/_IO_stdout/_IO_stderr. RH5.0 support for egcs-1.0.1. From-SVN: r17146 --- libio/ChangeLog | 7 +++++++ libio/configure.in | 11 +++++++++++ libio/streambuf.cc | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/libio/ChangeLog b/libio/ChangeLog index 56dc8937dafc..aaeb63f3e0d3 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -1,3 +1,10 @@ +Fri Dec 19 09:35:48 1997 H.J. Lu (hjl@gnu.org) + + * configure.in (target frags): Add *-linux-gnu. + + * 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. diff --git a/libio/configure.in b/libio/configure.in index 5de2dc1113ba..63a152a90f17 100644 --- a/libio/configure.in +++ b/libio/configure.in @@ -64,6 +64,17 @@ case "${target}" in cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h ;; + *-linux-gnu) + # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0. + # Create a wrapper if necessary. + (echo "#include " | ${CC-cc} -E -) >/dev/null 2>&1 || + { + echo "#include_next " > libc-lock.h + echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h + echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h + + } + ;; esac for frag in ${frags}; do diff --git a/libio/streambuf.cc b/libio/streambuf.cc index e87590f86d12..4393cf08cfd4 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 } -- 2.47.2