diff options
author | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 1999-01-03 20:16:10 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-01-03 13:16:10 -0700 |
commit | 1cd0a8edcaa31b8e1b76fc17ae41f3aa268fd5af (patch) | |
tree | 1b424e2c298d6cbc419d27f08a056fbca992d6e5 /gcc | |
parent | eb78b99d9bcc7b52565b6b64a9861d868809ae25 (diff) | |
download | gcc-1cd0a8edcaa31b8e1b76fc17ae41f3aa268fd5af.zip gcc-1cd0a8edcaa31b8e1b76fc17ae41f3aa268fd5af.tar.gz gcc-1cd0a8edcaa31b8e1b76fc17ae41f3aa268fd5af.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rwxr-xr-x | gcc/fixincludes | 28 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f6a768..9321e7b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/fixincludes b/gcc/fixincludes index 09e10bb..5943dc2 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -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 |