summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/inquire.c5
-rw-r--r--libgfortran/io/unix.c4
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;
}