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
332b9a5c
Commit
332b9a5c
authored
Nov 04, 2010
by
Janne Blomqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove prot from unix_stream
From-SVN: r166284
parent
2fa692c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
34 deletions
+16
-34
libgfortran/ChangeLog
+10
-0
libgfortran/io/unix.c
+6
-33
libgfortran/io/unix.h
+0
-1
No files found.
libgfortran/ChangeLog
View file @
332b9a5c
2010-11-04 Janne Blomqvist <jb@gcc.gnu.org>
* io/unix.h (struct unix_stream): Remove prot member.
* io/unix.c: Remove PROT_READ and PROT_WRITE constants.
(fd_to_stream): Remove prot from argument list, don't set prot.
(open_external): Don't set prot flag.
(input_stream): Remove prot from argument list.
(output_stream): Likewise.
(error_stream): Likewise.
2010-11-03 Janne Blomqvist <jb@gcc.gnu.org>
* io/unix.h: Remove empty_internal_buffer prototype.
...
...
libgfortran/io/unix.c
View file @
332b9a5c
...
...
@@ -104,14 +104,6 @@ typedef struct stat gfstat_t;
#define PATH_MAX 1024
#endif
#ifndef PROT_READ
#define PROT_READ 1
#endif
#ifndef PROT_WRITE
#define PROT_WRITE 2
#endif
/* These flags aren't defined on all targets (mingw32), so provide them
here. */
#ifndef S_IRGRP
...
...
@@ -910,7 +902,7 @@ open_internal4 (char *base, int length, gfc_offset offset)
* around it. */
static
stream
*
fd_to_stream
(
int
fd
,
int
prot
)
fd_to_stream
(
int
fd
)
{
gfstat_t
statbuf
;
unix_stream
*
s
;
...
...
@@ -922,7 +914,6 @@ fd_to_stream (int fd, int prot)
s
->
buffer_offset
=
0
;
s
->
physical_offset
=
0
;
s
->
logical_offset
=
0
;
s
->
prot
=
prot
;
/* Get the current length of the file. */
...
...
@@ -1222,7 +1213,7 @@ regular_file (st_parameter_open *opp, unit_flags *flags)
stream
*
open_external
(
st_parameter_open
*
opp
,
unit_flags
*
flags
)
{
int
fd
,
prot
;
int
fd
;
if
(
flags
->
status
==
STATUS_SCRATCH
)
{
...
...
@@ -1247,25 +1238,7 @@ open_external (st_parameter_open *opp, unit_flags *flags)
return
NULL
;
fd
=
fix_fd
(
fd
);
switch
(
flags
->
action
)
{
case
ACTION_READ
:
prot
=
PROT_READ
;
break
;
case
ACTION_WRITE
:
prot
=
PROT_WRITE
;
break
;
case
ACTION_READWRITE
:
prot
=
PROT_READ
|
PROT_WRITE
;
break
;
default:
internal_error
(
&
opp
->
common
,
"open_external(): Bad action"
);
}
return
fd_to_stream
(
fd
,
prot
);
return
fd_to_stream
(
fd
);
}
...
...
@@ -1275,7 +1248,7 @@ open_external (st_parameter_open *opp, unit_flags *flags)
stream
*
input_stream
(
void
)
{
return
fd_to_stream
(
STDIN_FILENO
,
PROT_READ
);
return
fd_to_stream
(
STDIN_FILENO
);
}
...
...
@@ -1291,7 +1264,7 @@ output_stream (void)
setmode
(
STDOUT_FILENO
,
O_BINARY
);
#endif
s
=
fd_to_stream
(
STDOUT_FILENO
,
PROT_WRITE
);
s
=
fd_to_stream
(
STDOUT_FILENO
);
return
s
;
}
...
...
@@ -1308,7 +1281,7 @@ error_stream (void)
setmode
(
STDERR_FILENO
,
O_BINARY
);
#endif
s
=
fd_to_stream
(
STDERR_FILENO
,
PROT_WRITE
);
s
=
fd_to_stream
(
STDERR_FILENO
);
return
s
;
}
...
...
libgfortran/io/unix.h
View file @
332b9a5c
...
...
@@ -56,7 +56,6 @@ typedef struct
int
active
;
/* Length of valid bytes in the buffer */
int
prot
;
int
ndirty
;
/* Dirty bytes starting at buffer_offset */
int
special_file
;
/* =1 if the fd refers to a special file */
...
...
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