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
c49c4803
Commit
c49c4803
authored
Apr 09, 1993
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't put #ifndefs in limits.h if they are already there
From-SVN: r4053
parent
1717563d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
gcc/fixincludes
+24
-15
No files found.
gcc/fixincludes
View file @
c49c4803
...
@@ -959,6 +959,11 @@ fi
...
@@ -959,6 +959,11 @@ fi
# In limits.h, put #ifndefs around things that are supposed to be defined
# In limits.h, put #ifndefs around things that are supposed to be defined
# in float.h to avoid redefinition errors if float.h is included first.
# in float.h to avoid redefinition errors if float.h is included first.
# On HP/UX this patch does not work, because on HP/UX limits.h uses
# multi line comments and the inserted #endif winds up inside the
# comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if
# we find a #ifndef FLT_MIN we assume that all the required #ifndefs
# are there, and we do not add them ourselves.
file
=
limits.h
file
=
limits.h
if
[
-r
$file
]
&&
[
!
-r
${
LIB
}
/
$file
]
;
then
if
[
-r
$file
]
&&
[
!
-r
${
LIB
}
/
$file
]
;
then
cp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
||
echo
"Can't copy
$file
"
cp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
||
echo
"Can't copy
$file
"
...
@@ -967,33 +972,37 @@ if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
...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
#endif'
\
#endif'
\
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
fi
if
cmp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
;
then
if
cmp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
;
then
echo
Deleting
${
LIB
}
/
$file
\;
no fixes were needed.
echo
Deleting
${
LIB
}
/
$file
\;
no fixes were needed.
rm
-f
${
LIB
}
/
$file
rm
-f
${
LIB
}
/
$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