aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/open.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2011-10-31 16:52:26 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2011-10-31 16:52:26 +0200
commit3469bd8660b6c79a4727287ef4214d2b9c864ba6 (patch)
tree9abe59faaeca5c3b0989af7c8a5b04030589fb90 /libgfortran/io/open.c
parent7d5ee219357f0ec4e9d67285eec50677ff2583ce (diff)
downloadgcc-3469bd8660b6c79a4727287ef4214d2b9c864ba6.zip
gcc-3469bd8660b6c79a4727287ef4214d2b9c864ba6.tar.gz
gcc-3469bd8660b6c79a4727287ef4214d2b9c864ba6.tar.bz2
Introduce a size member function to struct stream.
2011-10-31 Janne Blomqvist <jb@gcc.gnu.org> * io/unix.h (struct stream): Add size function pointer. (ssize): New inline function. (file_length): Remove prototype. * io/unix.c (raw_size): New function. (raw_init): Initialize st.size pointer. (buf_size): New function. (buf_init): Initialize st.size pointer. (open_internal): Likewise. (open_internal4): Likewise. (file_length): Remove function. * io/file_pos.c (st_rewind): Use ssize instead of file_length. * io/open.c (test_endfile): Likewise. * io/transfer.c (data_transfer_init): Likewise. (next_record_r): Likewise. (next_record_w): Likewise. * io/unit.c (update_position): Likewise. From-SVN: r180702
Diffstat (limited to 'libgfortran/io/open.c')
-rw-r--r--libgfortran/io/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c
index b26d14d..0102b9c 100644
--- a/libgfortran/io/open.c
+++ b/libgfortran/io/open.c
@@ -153,7 +153,7 @@ static const st_option async_opt[] =
static void
test_endfile (gfc_unit * u)
{
- if (u->endfile == NO_ENDFILE && file_length (u->s) == stell (u->s))
+ if (u->endfile == NO_ENDFILE && ssize (u->s) == stell (u->s))
u->endfile = AT_ENDFILE;
}