This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44698] I/O: FLUSH does not actually flush the buffer?
- From: "ktietz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2010 20:24:09 -0000
- Subject: [Bug fortran/44698] I/O: FLUSH does not actually flush the buffer?
- References: <bug-44698-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from ktietz at gcc dot gnu dot org 2010-06-29 20:24 -------
(In reply to comment #5)
> One possible cause of this problem is that in configuration there could be
> something going wrong with stat functions returning 32-bit vs 64-bit values.
This seems not to be the issue here. sys/stat.h includes sys/types.h, so there
is no need to put it in front explicit.
The issue is that Windows C-runtimes uses OS buffer File I/O, which means that
data will be written just when page-size (4k) is full. By calling _commit,
which is like fsync, it is forced that buffer gets physical written to disk.
Kai
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44698