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: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2010 19:29:45 -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 #4 from burnus at gcc dot gnu dot org 2010-06-28 19:29 -------
(In reply to comment #2)
> See unix.c:buf_flush(). Called via the sflush() inline function/function
> pointer thingy. libgfortran does not use C stdio
> (fread/fwrite/fflush/fseek/...), but rather the lower level unbuffered
> POSIX IO (read/write/lseek)
Seemingly, I mixed this up with O_NONBLOCK; thus, indeed the POSIX I/O should
be unbuffered. Thus, the question is why does MinGW buffer?
Cf. http://www.opengroup.org/onlinepubs/000095399/functions/write.html
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44698