diff options
author | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-09 15:46:15 +0000 |
---|---|---|
committer | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-09 15:46:15 +0000 |
commit | 16b1d20fe3e61ea1bcf65909c9f92478f5234bdd (patch) | |
tree | 4142f4ba491843be305a43bdb525fc03d316eb91 /libgfortran | |
parent | 094f84b512a0f7840d0a10aa26bf78b40b09b742 (diff) | |
download | gcc-16b1d20fe3e61ea1bcf65909c9f92478f5234bdd.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181207 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/inquire.c | 5 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 3a2db6dd50c..d9d397bc1e0 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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. + 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR libfortran/47972 diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c index fb525caf863..a5423346db9 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); + } } } diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index c87be134a69..f320733e859 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -451,10 +451,6 @@ buf_flush (unix_stream * s) if (s->ndirty != 0) return -1; -#ifdef _WIN32 - _commit (s->fd); -#endif - return 0; } |