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
5e7537cf
Commit
5e7537cf
authored
Jun 21, 2003
by
Nathanael Nerode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mkconfig.sh: Add multiple inclusion guards to generated headers.
From-SVN: r68292
parent
87b60e64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
gcc/ChangeLog
+4
-0
gcc/mkconfig.sh
+11
-0
No files found.
gcc/ChangeLog
View file @
5e7537cf
2003-06-21 Nathanael Nerode <neroden@gcc.gnu.org>
* mkconfig.sh: Add multiple inclusion guards to generated headers.
2003-06-20 Neil Booth <neil@daikokuya.co.uk>
* c-decl.c (store_parm_decls): Make saved_warn_shadow boolean.
...
...
gcc/mkconfig.sh
View file @
5e7537cf
...
...
@@ -33,6 +33,14 @@ fi
output
=
$1
rm
-f
${
output
}
T
# This converts a file name into header guard macro format.
hg_sed_expr
=
'y,abcdefghijklmnopqrstuvwxyz./,ABCDEFGHIJKLMNOPQRSTUVWXYZ__,'
header_guard
=
GCC_
`
echo
${
output
}
| sed
-e
${
hg_sed_expr
}
`
# Add multiple inclusion protection guard, part one.
echo
"#ifndef
${
header_guard
}
"
>>
${
output
}
T
echo
"#define
${
header_guard
}
"
>>
${
output
}
T
# Define TARGET_CPU_DEFAULT if the system wants one.
# This substitutes for lots of *.h files.
if
[
"
$TARGET_CPU_DEFAULT
"
!=
""
]
;
then
...
...
@@ -85,6 +93,9 @@ EOF
;;
esac
# Add multiple inclusion protection guard, part two.
echo
"#endif /*
${
header_guard
}
*/"
>>
${
output
}
T
# Avoid changing the actual file if possible.
if
[
-f
$output
]
&&
cmp
${
output
}
T
$output
>
/dev/null 2>&1
;
then
echo
$output
is unchanged
>
&2
...
...
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