https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94268
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:0bc199fc5d4eef5a20ced20df892e5e3b8821b60 commit r11-4479-g0bc199fc5d4eef5a20ced20df892e5e3b8821b60 Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Oct 28 13:19:21 2020 +0000 libstdc++: Override BUFSIZ for Windows targets [PR 94268] This replaces uses of BUFSIZ with a new _GLIBCXX_BUFSIZ macro that can be overridden in target-specific config headers. That allows the mingw and mingw-w64 targets to override it, because BUFSIZ is apparently defined to 512, resulting in poor performance. The MSVCRT stdio apparently uses 4096, so we use that too. libstdc++-v3/ChangeLog: PR libstdc++/94268 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ): Define. * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ): Define. * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead of BUFSIZ. * include/ext/stdio_filebuf.h: Likewise. * include/std/fstream (_GLIBCXX_BUFSIZ): Define.