diff options
author | Janne Blomqvist <jblomqvi@cc.hut.fi> | 2005-06-18 23:09:28 +0300 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2005-06-18 20:09:28 +0000 |
commit | b68d2bed0dfa9f2bd4a5716de8c6f1636e2344de (patch) | |
tree | b98611657cf582d51ede3abf82e19a3c0e43efb4 /libgfortran/io/unix.c | |
parent | 2d9474dfd2b300d6a10b541ef5a282759a1ca190 (diff) | |
download | gcc-b68d2bed0dfa9f2bd4a5716de8c6f1636e2344de.zip gcc-b68d2bed0dfa9f2bd4a5716de8c6f1636e2344de.tar.gz gcc-b68d2bed0dfa9f2bd4a5716de8c6f1636e2344de.tar.bz2 |
unix.c (stream_at_bof): Don't assume that all non-mmapped files are non-seekable.
* unix.c (stream_at_bof): Don't assume that all non-mmapped files
are non-seekable.
(stream_at_eof): Likewise.
From-SVN: r101164
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r-- | libgfortran/io/unix.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index f4ee889..1158458 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1298,10 +1298,10 @@ stream_at_bof (stream * s) { unix_stream *us; - us = (unix_stream *) s; + if (!is_seekable (s)) + return 0; - if (!us->mmaped) - return 0; /* File is not seekable */ + us = (unix_stream *) s; return us->logical_offset == 0; } @@ -1315,10 +1315,10 @@ stream_at_eof (stream * s) { unix_stream *us; - us = (unix_stream *) s; + if (!is_seekable (s)) + return 0; - if (!us->mmaped) - return 0; /* File is not seekable */ + us = (unix_stream *) s; return us->logical_offset == us->dirty_offset; } |