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
ca21b4a5
Commit
ca21b4a5
authored
24 years ago
by
Bruce Korb
Committed by
Bruce Korb
24 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not rely on load_file_data() to close file pointer
From-SVN: r39501
parent
3c8465d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
gcc/ChangeLog
+7
-0
gcc/fixinc/fixincl.c
+7
-7
gcc/fixinc/fixlib.c
+3
-2
gcc/fixinc/inclhack.def
+1
-0
No files found.
gcc/ChangeLog
View file @
ca21b4a5
2001-01-30 Bruce Korb <bkorb@gnu.org>
fixinc/fixincl.c(process): Emit error message only if appropriate :)
(load_file): do not rely on load_file_data() to close file pointer
fixinc/fixlib.c(load_file_data): do not close passed in file pointer
fixinc/inclhack.def(irix_limits_const): add test_text
2001-02-06 Neil Booth <neil@daikokuya.demon.co.uk>
* cppexp.c (parse_defined): Improve diagnostics for invalid
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/fixincl.c
View file @
ca21b4a5
...
...
@@ -364,14 +364,13 @@ load_file ( fname )
res
=
(
char
*
)
mmap
((
void
*
)
NULL
,
data_map_size
,
PROT_READ
,
MAP_PRIVATE
,
data_map_fd
,
0
);
if
(
res
==
(
char
*
)
BAD_ADDR
)
#endif
{
FILE
*
fp
=
fdopen
(
data_map_fd
,
"r"
);
curr_data_mapped
=
BOOL_FALSE
;
res
=
load_file_data
(
fdopen
(
data_map_fd
,
"r"
));
res
=
load_file_data
(
fp
);
fclose
(
fp
);
}
#else
curr_data_mapped
=
BOOL_FALSE
;
res
=
load_file_data
(
fdopen
(
data_map_fd
,
"r"
));
#endif
return
res
;
}
...
...
@@ -1431,8 +1430,9 @@ process ()
read_fd
=
open
(
pz_temp_file
,
O_RDONLY
);
if
(
read_fd
<
0
)
{
fprintf
(
stderr
,
"error %d (%s) opening output (%s) for read
\n
"
,
errno
,
xstrerror
(
errno
),
pz_temp_file
);
if
(
errno
!=
ENOENT
)
fprintf
(
stderr
,
"error %d (%s) opening output (%s) for read
\n
"
,
errno
,
xstrerror
(
errno
),
pz_temp_file
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/fixlib.c
View file @
ca21b4a5
...
...
@@ -39,6 +39,9 @@ load_file_data (fp)
int
space_left
=
-
1
;
/* allow for terminating NUL */
size_t
space_used
=
0
;
if
(
fp
==
(
FILE
*
)
NULL
)
return
pz_data
;
do
{
size_t
size_read
;
...
...
@@ -62,7 +65,6 @@ load_file_data (fp)
fprintf
(
stderr
,
"error %d (%s) reading input
\n
"
,
err
,
xstrerror
(
err
));
free
((
void
*
)
pz_data
);
fclose
(
fp
);
return
(
char
*
)
NULL
;
}
}
...
...
@@ -73,7 +75,6 @@ load_file_data (fp)
pz_data
=
xrealloc
((
void
*
)
pz_data
,
space_used
+
1
);
pz_data
[
space_used
]
=
NUL
;
fclose
(
fp
);
return
pz_data
;
}
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/inclhack.def
View file @
ca21b4a5
...
...
@@ -1292,6 +1292,7 @@ fix = {
select = "^extern const ";
c_fix = format;
c_fix_arg = "extern __const ";
test_text = "extern const char limit; /* test\n\tlimits */";
};
...
...
This diff is collapsed.
Click to expand it.
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