mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
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
This commit is contained in:
parent
2d9474dfd2
commit
b68d2bed0d
@ -1,3 +1,9 @@
|
||||
2005-06-18 Janne Blomqvist <jblomqvi@cc.hut.fi>
|
||||
|
||||
* unix.c (stream_at_bof): Don't assume that all non-mmapped files
|
||||
are non-seekable.
|
||||
(stream_at_eof): Likewise.
|
||||
|
||||
2005-06-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR libfortran/19155
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user