* 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
+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.
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 <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
+ {
+ echo "#include_next <libc-lock.h>" > 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
{
_IO_default_finish(this,0);
#ifdef _IO_MTSAFE_IO
- delete _lock;
+ if (this != _IO_stdin && this != _IO_stdout && this != _IO_stderr)
+ delete _lock;
#endif
}