=================================================================== RCS file: /cvsroot/gcc/gcc/libgfortran/io/unix.c,v retrieving revision 1.27 diff -u -p -r1.27 unix.c --- unix.c 30 May 2005 07:38:36 -0000 1.27 +++ unix.c 5 Jun 2005 20:46:27 -0000 @@ -1302,10 +1302,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; } @@ -1319,10 +1319,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; }