diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2011-11-09 17:46:15 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2011-11-09 17:46:15 +0200 |
commit | ed10039e8bd1f3a2887429aaa7943a4f7257ee54 (patch) | |
tree | 4142f4ba491843be305a43bdb525fc03d316eb91 /libgfortran/io/inquire.c | |
parent | 26833b3de72bba8da5516e47a2da4fe73f5d1478 (diff) | |
download | gcc-ed10039e8bd1f3a2887429aaa7943a4f7257ee54.zip gcc-ed10039e8bd1f3a2887429aaa7943a4f7257ee54.tar.gz gcc-ed10039e8bd1f3a2887429aaa7943a4f7257ee54.tar.bz2 |
PR 50016 Slow I/O on MingW due to _commit
frontend ChangeLog:
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/50016
* gfortran.texi (Data consistency and durability): New section.
testsuite ChangeLog:
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/50016
* gfortran.dg/inquire_size.f90: Don't flush the unit.
libgfortran ChangeLog:
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/50016
* io/inquire.c (inquire_via_unit): Flush the unit and use ssize.
* io/unix.c (buf_flush): Don't call _commit.
From-SVN: r181207
Diffstat (limited to 'libgfortran/io/inquire.c')
-rw-r--r-- | libgfortran/io/inquire.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c index fb525ca..a542334 100644 --- a/libgfortran/io/inquire.c +++ b/libgfortran/io/inquire.c @@ -409,7 +409,10 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u) if (u == NULL) *iqp->size = -1; else - *iqp->size = file_size (u->file, (gfc_charlen_type) u->file_len); + { + sflush (u->s); + *iqp->size = ssize (u->s); + } } } |