Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
35713675
Commit
35713675
authored
Aug 02, 2010
by
Janne Blomqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't update the position flag for non-seekable files, check for stell() error.
From-SVN: r162810
parent
0093ddee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
libgfortran/ChangeLog
+5
-0
libgfortran/io/unit.c
+13
-6
No files found.
libgfortran/ChangeLog
View file @
35713675
2010-08-02 Janne Blomqvist <jb@gcc.gnu.org>
* io/unit.c (update_position): Don't update the position flag for
non-seekable files, check for stell() error.
2010-08-01 Janne Blomqvist <jb@gcc.gnu.org>
2010-08-01 Janne Blomqvist <jb@gcc.gnu.org>
* io/unix.c (file_exists): Use access(2) instead of stat(2) to
* io/unix.c (file_exists): Use access(2) instead of stat(2) to
...
...
libgfortran/io/unit.c
View file @
35713675
...
@@ -714,12 +714,19 @@ close_units (void)
...
@@ -714,12 +714,19 @@ close_units (void)
void
void
update_position
(
gfc_unit
*
u
)
update_position
(
gfc_unit
*
u
)
{
{
if
(
stell
(
u
->
s
)
==
0
)
/* If unit is not seekable, this makes no sense (and the standard is
u
->
flags
.
position
=
POSITION_REWIND
;
silent on this matter), and thus we don't change the position for
else
if
(
file_length
(
u
->
s
)
==
stell
(
u
->
s
))
a non-seekable file. */
u
->
flags
.
position
=
POSITION_APPEND
;
if
(
is_seekable
(
u
->
s
))
else
{
u
->
flags
.
position
=
POSITION_ASIS
;
gfc_offset
cur
=
stell
(
u
->
s
);
if
(
cur
==
0
)
u
->
flags
.
position
=
POSITION_REWIND
;
else
if
(
cur
!=
-
1
&&
(
file_length
(
u
->
s
)
==
cur
))
u
->
flags
.
position
=
POSITION_APPEND
;
else
u
->
flags
.
position
=
POSITION_ASIS
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment