]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.in (target frags): Add *-linux-gnu.
authorH.J. Lu <hjl@gnu.org>
Fri, 19 Dec 1997 08:32:04 +0000 (08:32 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 19 Dec 1997 08:32:04 +0000 (01:32 -0700)
        * 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
libio/configure.in
libio/streambuf.cc

index 56dc8937dafc5b5344b3abbaeb3d2d7ec97316c5..aaeb63f3e0d3d6a0e09cd72468d9da0f1c82950f 100644 (file)
@@ -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.
index 5de2dc1113ba77d75a8fe1102c25b7c65b2dba97..63a152a90f175dd7d3bce184f6ff403986b61676 100644 (file)
@@ -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 <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
index e87590f86d126cff6df96d74e4694898e112ebf0..4393cf08cfd426b82f992ba08d17a8776c5ee957 100644 (file)
@@ -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
 }