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
063174ee
Commit
063174ee
authored
Nov 04, 1999
by
Bruce Korb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for systems that do not have S_IR* defined values
Do not call realloc with a NULL pointer From-SVN: r30391
parent
eae48b73
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
gcc/ChangeLog
+10
-0
gcc/fixinc/fixincl.c
+17
-3
gcc/fixinc/fixlib.c
+4
-1
No files found.
gcc/ChangeLog
View file @
063174ee
...
...
@@ -2,6 +2,16 @@ Thu Nov 4 06:39:47 1999 Jeffrey A Law (law@cygnus.com)
*
haifa
-
sched
.
c
(
schedule_block
)
:
Fix
thinko
.
1999
-
11
-
03
James
McKelvey
<
mckelvey
@fafnir
.
com
>
*
fixinc
/
fixincl
.
c
(
create_file
)
:
Allow
for
systems
that
do
not
have
S_IR
*
defined
values
1999
-
11
-
03
Philippe
De
Muyter
<
phdm
@macqel
.
be
>
*
fixlib
.
c
(
load_file_data
)
:
Do
not
call
`
realloc
'
with
a
NULL
pointer
;
call
`
malloc
'
instead
.
Wed
Nov
3
23
:
05
:
14
1999
Mark
Mitchell
<
mark
@codesourcery
.
com
>
*
flags
.
h
(
flag_renumber_insns
)
:
Declare
.
...
...
gcc/fixinc/fixincl.c
View file @
063174ee
...
...
@@ -636,7 +636,22 @@ run_compiles ()
Input: the name of the file to create
Returns: a file pointer to the new, open file */
#define S_IRALL (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
#if defined(S_IRUSR) && defined(S_IWUSR) && \
defined(S_IRGRP) && defined(S_IROTH)
# define S_IRALL (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
#else
# define S_IRALL 0644
#endif
#if defined(S_IRWXU) && defined(S_IRGRP) && defined(S_IXGRP) && \
defined(S_IROTH) && defined(S_IXOTH)
# define S_DIRALL (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
#else
# define S_DIRALL 0755
#endif
FILE
*
create_file
()
...
...
@@ -660,8 +675,7 @@ create_file ()
*
pz_dir
=
NUL
;
if
(
stat
(
fname
,
&
stbf
)
<
0
)
{
mkdir
(
fname
,
S_IFDIR
|
S_IRWXU
|
S_IRGRP
|
S_IXGRP
|
S_IROTH
|
S_IXOTH
);
mkdir
(
fname
,
S_IFDIR
|
S_DIRALL
);
}
*
pz_dir
=
'/'
;
...
...
gcc/fixinc/fixlib.c
View file @
063174ee
...
...
@@ -23,7 +23,10 @@ load_file_data (fp)
if
(
space_left
<
1024
)
{
space_left
+=
4096
;
pz_data
=
realloc
((
void
*
)
pz_data
,
space_left
+
space_used
+
1
);
if
(
pz_data
)
pz_data
=
realloc
((
void
*
)
pz_data
,
space_left
+
space_used
+
1
);
else
pz_data
=
malloc
(
space_left
+
space_used
+
1
);
}
size_read
=
fread
(
pz_data
+
space_used
,
1
,
space_left
,
fp
);
...
...
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