summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/fixincludes
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-09-18 05:45:16 +0000
committerpeter <peter@FreeBSD.org>1996-09-18 05:45:16 +0000
commitacb2bcd1679fc89c82b1ebd30a92fe0538b7f4dc (patch)
tree63294164689f80893cbbe6bd77927b5abe4339e9 /contrib/gcc/fixincludes
parentd4691e641ba47cb86eef80f5c879e13f9d961724 (diff)
downloadFreeBSD-src-acb2bcd1679fc89c82b1ebd30a92fe0538b7f4dc.zip
FreeBSD-src-acb2bcd1679fc89c82b1ebd30a92fe0538b7f4dc.tar.gz
Import of 2.7.2.1 into vendor branch
Diffstat (limited to 'contrib/gcc/fixincludes')
-rwxr-xr-xcontrib/gcc/fixincludes27
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/gcc/fixincludes b/contrib/gcc/fixincludes
index ba6781d..cc8801d 100755
--- a/contrib/gcc/fixincludes
+++ b/contrib/gcc/fixincludes
@@ -1520,6 +1520,33 @@ if [ -r ${LIB}/$file ]; then
fi
fi
+# sys/wait.h on AIX 3.2.5 puts the declaration of wait3 before the definition
+# of struct rusage, so the prototype (added by fixproto) causes havoc.
+file=sys/wait.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 ] \
+ && grep 'bos325,' ${LIB}/$file >/dev/null; then
+ echo Fixing $file, wait3 declaration
+ sed -e '/^extern pid_t wait3();$/i\
+struct rusage;
+'\
+ ${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,
# so that this code won't do anything. But wait.h in version 3 has a
OpenPOWER on IntegriCloud