aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1994-02-26 18:07:52 +0000
committerDoug Evans <dje@gnu.org>1994-02-26 18:07:52 +0000
commit46eeda17171bc5a3b2877d4c470465ff284713a7 (patch)
tree836b4bd3ba5b48622700b0cb9846bcba4f4737c4 /gcc/fixincludes
parent818a0d4e44eca1ebbe1ecb75863b7e5842d66e8c (diff)
downloadgcc-46eeda17171bc5a3b2877d4c470465ff284713a7.zip
gcc-46eeda17171bc5a3b2877d4c470465ff284713a7.tar.gz
gcc-46eeda17171bc5a3b2877d4c470465ff284713a7.tar.bz2
fixincludes: Fix including of machine/r3_cpu.h and machine/r4_cpu.h in machine/cpu.h on...
* fixincludes: Fix including of machine/r3_cpu.h and machine/r4_cpu.h in machine/cpu.h on Ultrix 4.3. From-SVN: r6628
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 5523607..0b6ea51 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -583,6 +583,7 @@ if [ -r ${LIB}/$file ]; then
fi
# Check for superfluous `static' (in Ultrix 4.2)
+# On Ultrix 4.3, includes of other files (r3_cpu.h,r4_cpu.h) is broken.
file=machine/cpu.h
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
mkdir ${LIB}/machine 2>/dev/null
@@ -592,8 +593,11 @@ if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
fi
if [ -r ${LIB}/$file ]; then
- echo Fixing $file, superfluous static
- sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' ${LIB}/$file > ${LIB}/${file}.sed
+ echo Fixing $file, superfluous static and broken includes of other files.
+ sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' \
+ -e 's/^#include "r3_cpu\.h"$/#include <machine\/r3_cpu\.h>/' \
+ -e 's/^#include "r4_cpu\.h"$/#include <machine\/r4_cpu\.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
rm ${LIB}/$file
@@ -601,7 +605,8 @@ if [ -r ${LIB}/$file ]; then
# This file has an alternative name, mips/cpu.h. Fix that name, too.
if cmp machine/cpu.h mips/cpu.h > /dev/null 2>&1; then
mkdir ${LIB}/mips 2>&-
- ln ${LIB}/$file ${LIB}/mips/cpu.h
+# Don't remove the file first, they may be the same file!
+ ln ${LIB}/$file ${LIB}/mips/cpu.h > /dev/null 2>&1
fi
fi
fi