From: Jakub Jelinek Date: Wed, 18 Oct 2000 16:52:12 +0000 (+0200) Subject: iostream.cc (ends): Release the acquired lock. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1b037bde8a555d5958a438f70beb22a113f5695;p=gcc.git iostream.cc (ends): Release the acquired lock. * iostream.cc (ends): Release the acquired lock. (endl): Likewise. From-SVN: r36937 --- diff --git a/libio/ChangeLog b/libio/ChangeLog index 55f6ec83736..5c9836ee7b0 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -1,3 +1,8 @@ +2000-10-18 Jakub Jelinek + + * iostream.cc (ends): Release the acquired lock. + (endl): Likewise. + 2000-10-16 Jakub Jelinek * iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >= 2]: diff --git a/libio/iostream.cc b/libio/iostream.cc index 1f294313c37..ae1db1afd9c 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; }