iostream.cc (ends): Release the acquired lock.
authorJakub Jelinek <jakub@redhat.com>
Wed, 18 Oct 2000 16:52:12 +0000 (18:52 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 18 Oct 2000 16:52:12 +0000 (18:52 +0200)
* iostream.cc (ends): Release the acquired lock.
(endl): Likewise.

From-SVN: r36937

libio/ChangeLog
libio/iostream.cc

index 55f6ec8..5c9836e 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-18  Jakub Jelinek  <jakub@redhat.com>
+
+       * iostream.cc (ends): Release the acquired lock.
+       (endl): Likewise.
+
 2000-10-16  Jakub Jelinek  <jakub@redhat.com>
 
        * iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >= 2]:
index 1f29431..ae1db1a 100644 (file)
@@ -965,15 +965,25 @@ int istream::_skip_ws()
 
 ostream& ends(ostream& outs)
 {
-    if (outs.opfx())
+    if (outs.opfx()) {
+       _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
+                                 outs._strbuf);
        outs.put('\0');
+       outs.osfx();
+       _IO_cleanup_region_end (0);
+    }
     return outs;
 }
 
 ostream& endl(ostream& outs)
 {
-    if (outs.opfx())
+    if (outs.opfx()) {
+       _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
+                                 outs._strbuf);
         flush(outs.put('\n'));
+       outs.osfx();
+       _IO_cleanup_region_end (0);
+    }
     return outs;
 }