This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/81751] [5/6/7 Regression]__basic_file::sync() may flush _all_ files
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Sep 2017 17:09:37 +0000
- Subject: [Bug libstdc++/81751] [5/6/7 Regression]__basic_file::sync() may flush _all_ files
- Auto-submitted: auto-generated
- References: <bug-81751-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81751
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Mon Sep 4 17:09:05 2017
New Revision: 251680
URL: https://gcc.gnu.org/viewcvs?rev=251680&root=gcc&view=rev
Log:
PR libstdc++/81751 don't call fflush(NULL)
Backport from mainline
2017-08-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79820
PR libstdc++/81751
* config/io/basic_file_stdio.cc (sys_open(FILE*, ios_base::openmode)):
Call fflush on the stream instead of calling sync() while _M_cfile is
null. Restore original value of errno.
* testsuite/ext/stdio_filebuf/char/79820.cc: New.
* testsuite/ext/stdio_filebuf/char/81751.cc: New.
Added:
branches/gcc-5-branch/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc
branches/gcc-5-branch/libstdc++-v3/testsuite/ext/stdio_filebuf/char/81751.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/config/io/basic_file_stdio.cc