aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-11-14 19:14:54 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-11-14 19:14:54 -0500
commite12c22a65886ddb3974014d51401b0c3fb919180 (patch)
tree8d2715fb5f3f110b6f76c44a9c378cdf4a8ab9b6 /gcc/fixincludes
parent4dad6ae1c5efca6aaa7ac6ab3998f0af51d5eacb (diff)
downloadgcc-e12c22a65886ddb3974014d51401b0c3fb919180.zip
gcc-e12c22a65886ddb3974014d51401b0c3fb919180.tar.gz
gcc-e12c22a65886ddb3974014d51401b0c3fb919180.tar.bz2
Fixes for NextStep 3.2.
Fixes for NextStep 3.2. Remove ``__const__'' from sin and cos prototypes in ansi/math.h. Remove keyword ``template'' from bfd/libc.h. Remove ``volatile'' from abort in bsd/libc.h and abort and exit in ansi/stdlib.h. From-SVN: r8434
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes72
1 files changed, 72 insertions, 0 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 9bb8cca..723824f 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -1401,6 +1401,78 @@ if [ -r ${LIB}/$file ]; then
fi
fi
+# NeXT 3.2 adds const prefix to some math functions. These conflict
+# with the built-in functions.
+file=ansi/math.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
+ sed -e '/^extern.*double.*__const__.*cos(/s/__const__//' \
+ -e '/^extern.*double.*__const__.*sin(/s/__const__//' ${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 -f ${LIB}/$file
+ else
+ # Find any include directives that use "file".
+ for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do
+ dir=`echo $file | sed -e s'|/[^/]*$||'`
+ required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include"
+ done
+ fi
+fi
+
+# NeXT 3.2 uses the word "template" as a parameter for some
+# functions. GCC reports an invalid use of a reserved key word
+# with the built-in functions. NeXT 3.2 includes the keyword
+# volatile in the prototype for abort(). This conflicts with
+# the built-in definition.
+file=bsd/libc.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
+ sed -e '/\(.*template\)/s/template//' \
+ -e '/extern.*volatile.*void.*abort/s/volatile//' ${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 -f ${LIB}/$file
+ else
+ # Find any include directives that use "file".
+ for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do
+ dir=`echo $file | sed -e s'|/[^/]*$||'`
+ required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include"
+ done
+ fi
+fi
+
+# NeXT 3.2 includes the keyword volatile in the abort() and
+# exit() function prototypes. That conflicts with the
+# built-in functions.
+file=ansi/stdlib.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
+ sed -e '/extern.*volatile.*void.*exit/s/volatile//' \
+ -e '/extern.*volatile.*void.*abort/s/volatile//' ${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 -f ${LIB}/$file
+ else
+ # Find any include directives that use "file".
+ for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do
+ dir=`echo $file | sed -e s'|/[^/]*$||'`
+ required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include"
+ done
+ fi
+fi
# NeXT 2.0 defines 'int wait(union wait*)', which conflicts with Posix.1.
# Note that version 3 of the NeXT system has wait.h in a different directory,