fixincludes (sys/utsname.h): Provide forward declaration of struct utsname on Ultrix V4.[35].

* fixincludes (sys/utsname.h): Provide forward declaration of
        struct utsname on Ultrix V4.[35].

From-SVN: r24470
This commit is contained in:
Rainer Orth 1999-01-03 20:16:10 +00:00 committed by Jeff Law
parent eb78b99d9b
commit 1cd0a8edca
2 changed files with 31 additions and 0 deletions

View File

@ -1,5 +1,8 @@
Sun Jan 3 21:01:04 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* fixincludes (sys/utsname.h): Provide forward declaration of
struct utsname on Ultrix V4.[35].
* mips.md (div_trap): Use local labels instead of dot-relative
branches.

View File

@ -1657,6 +1657,34 @@ if [ -r ${LIB}/$file ]; then
fi
fi
# sys/utsname.h on Ultrix V4.[35] puts the declaration of uname before the
# definition of struct utsname, so the prototype (added by fixproto) causes
# havoc.
file=sys/utsname.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 'ULTRIX' ${LIB}/$file >/dev/null; then
echo Fixing $file, uname declaration
sed -e '/^[ ]*extern[ ]*int[ ]*uname();$/i\
struct utsname;
'\
${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
# 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