This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/81751] __basic_file::sync() may flush _all_ files


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81751

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Aug  9 17:52:10 2017
New Revision: 250993

URL: https://gcc.gnu.org/viewcvs?rev=250993&root=gcc&view=rev
Log:
PR libstdc++/81751 don't call fflush(NULL)

        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:
    trunk/libstdc++-v3/testsuite/ext/stdio_filebuf/char/79820.cc
    trunk/libstdc++-v3/testsuite/ext/stdio_filebuf/char/81751.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/config/io/basic_file_stdio.cc

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]