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
75251fe0
Commit
75251fe0
authored
Mar 07, 1992
by
David J. MacKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r415
parent
ca2d2f1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
4 deletions
+64
-4
gcc/fixincludes
+64
-4
No files found.
gcc/fixincludes
View file @
75251fe0
...
...
@@ -112,18 +112,21 @@ while [ $# != 0 ]; do
# is much faster than actually trying to fix it.
# But the argument to egrep must be kept small, or many versions of egrep
# won't be able to handle it.
# rms: I removed `|#[el].*if.*[^/ ]' because it made egrep fail.
if
egrep
'[ _]_IO|CTRL|#define.NULL|#[el]*if.*([0-9]|#e[nl]|sparc|vax|sun|pyr)'
$file
>
/dev/null
;
then
echo
Fixing
$file
if
[
-r
$file
]
;
then
cp
$file
$2
/
$file
>
/dev/null 2>&1
\
||
echo
"Can't copy
$file
"
chmod +w
$2
/
$file
# Following two lines removed.
# s%^\([ ]*#[ ]*endif[ ]*\)\([^/ ].*\)$%\1/* \2 */%
# s%^\([ ]*#[ ]*else[ ]*\)\([^/ ].*\)$%\1/* \2 */%
sed
-e
'
:loop
/\\$/ N
/\\$/ b loop
s%\(#[ ]*endif[ ]*\)\([^/ ].*\)$%\1/* \2 */%
s%\(#[ ]*else[ ]*\)\([^/ ].*\)$%\1/* \2 */%
/[ ]_IO[A-Z]*[ ]*(/ s/(\(.\),/('
\'
'\1'
\'
',/
/[ ]BSD43__IO[A-Z]*[ ]*(/ s/(\(.\),/('
\'
'\1'
\'
',/
/#define._IO/ s/'
\'
'x'
\'
'/x/g
...
...
@@ -313,6 +316,24 @@ EOF
fi
fi
# Remove nested comments created by #endifs in a comment (Ultrix 4.1)
# Only needed if commenting out junk after #endif.
#file=signal.h
#if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
# cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
# chmod +w ${LIB}/$file 2>/dev/null
#fi
#
#if [ -r ${LIB}/$file ]; then
# echo Fixing $file, nested comments
# sed -e 's/#endif.*/#endif/' ${LIB}/$file > ${LIB}/${file}.sed
# rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
# if cmp $file ${LIB}/$file >/dev/null 2>&1; then
# echo Deleting ${LIB}/$file\; no fixes were needed.
# rm -f ${LIB}/$file
# fi
#fi
# Check for superfluous `static' (in Ultrix 4.2)
file
=
machine/cpu.h
if
[
-r
$file
]
&&
[
!
-r
${
LIB
}
/
$file
]
;
then
...
...
@@ -340,7 +361,7 @@ EOF
fi
fi
#
Deal with yet another challenge, this
in X11/Xmu.h
#
Incorrect sprintf declaration
in X11/Xmu.h
file
=
X11/Xmu.h
if
[
-r
$file
]
&&
[
!
-r
${
LIB
}
/
$file
]
;
then
mkdir
${
LIB
}
/X11 2>/dev/null
...
...
@@ -382,7 +403,7 @@ if [ -r ${LIB}/$file ]; then
fi
fi
# Fix the CAT macro in memvar.h.
# Fix the CAT macro in
SunOS
memvar.h.
file
=
pixrect/memvar.h
if
[
-r
$file
]
&&
[
!
-r
${
LIB
}
/
$file
]
;
then
mkdir
${
LIB
}
/pixrect 2>/dev/null
...
...
@@ -516,6 +537,45 @@ if [ -r ${LIB}/$file ]; then
fi
fi
# Incorrect #include in Sony News-OS 3.2.
file
=
machine/machparam.h
if
[
-r
$file
]
&&
[
!
-r
${
LIB
}
/
$file
]
;
then
mkdir
${
LIB
}
/machine 2>/dev/null
cp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
||
echo
"Can't copy
$file
"
chmod +w
${
LIB
}
/
$file
2>/dev/null
fi
if
[
-r
${
LIB
}
/
$file
]
;
then
echo
Fixing
$file
, incorrect
\#
include
sed
-e
's@"../machine/endian.h"@<machine/endian.h>@'
\
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
if
cmp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
;
then
echo
Deleting
${
LIB
}
/
$file
\;
no fixes were needed.
rm
-f
${
LIB
}
/
$file
fi
fi
# Multiline comment after typedef on IRIX 4.0.1.
file
=
sys/types.h
if
[
-r
$file
]
&&
[
!
-r
${
LIB
}
/
$file
]
;
then
mkdir
${
LIB
}
/sys 2>/dev/null
cp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
||
echo
"Can't copy
$file
"
chmod +w
${
LIB
}
/
$file
2>/dev/null
fi
if
[
-r
${
LIB
}
/
$file
]
;
then
echo
Fixing
$file
, comment
in
the middle of
\#
ifdef
sed
-e
's@type of the result@type of the result */@'
\
-e
's@of the sizeof@/* of the sizeof@'
\
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
if
cmp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
;
then
echo
Deleting
${
LIB
}
/
$file
\;
no fixes were needed.
rm
-f
${
LIB
}
/
$file
fi
fi
echo
'Removing unneeded directories:'
cd
$LIB
files
=
`
find
.
-type
d
-print
| sort
-r
`
...
...
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