aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-10-18 18:52:12 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-10-18 18:52:12 +0200
commitc1b037bde8a555d5958a438f70beb22a113f5695 (patch)
tree2bee594f11dfe8380034cda27bae78086805969c /libio
parent81cf47b209c433b6cb1ccffb030789a06ffa5c16 (diff)
downloadgcc-c1b037bde8a555d5958a438f70beb22a113f5695.zip
gcc-c1b037bde8a555d5958a438f70beb22a113f5695.tar.gz
gcc-c1b037bde8a555d5958a438f70beb22a113f5695.tar.bz2
iostream.cc (ends): Release the acquired lock.
* iostream.cc (ends): Release the acquired lock. (endl): Likewise. From-SVN: r36937
Diffstat (limited to 'libio')
-rw-r--r--libio/ChangeLog5
-rw-r--r--libio/iostream.cc14
2 files changed, 17 insertions, 2 deletions
diff --git a/libio/ChangeLog b/libio/ChangeLog
index 55f6ec8..5c9836e 100644
--- a/libio/ChangeLog
+++ b/libio/ChangeLog
@@ -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]:
diff --git a/libio/iostream.cc b/libio/iostream.cc
index 1f29431..ae1db1a 100644
--- a/libio/iostream.cc
+++ b/libio/iostream.cc
@@ -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;
}