aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-01-27 08:59:05 -0700
committerJeff Law <law@gcc.gnu.org>1997-01-27 08:59:05 -0700
commit2aecf81da9b9085ce3424ad8f257e4283fc99f41 (patch)
treee317d06e95b58cb939f2f168ae6b64f630f58dd9 /gcc
parentbad87f0917a2ce480049ee5dbb3a7cedcc5bd066 (diff)
downloadgcc-2aecf81da9b9085ce3424ad8f257e4283fc99f41.zip
gcc-2aecf81da9b9085ce3424ad8f257e4283fc99f41.tar.gz
gcc-2aecf81da9b9085ce3424ad8f257e4283fc99f41.tar.bz2
fixincludes: Fix incorrect forward structure declaration in sys/time.h on hpux10.20.
* fixincludes: Fix incorrect forward structure declaration in sys/time.h on hpux10.20. From-SVN: r13555
Diffstat (limited to 'gcc')
-rwxr-xr-xgcc/fixincludes26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 2df5a45..880ca44 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -2583,6 +2583,32 @@ if [ -r ${LIB}/$file ]; then
fi
fi
+# Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
+file=sys/time.h
+if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+ mkdir ${LIB}/sys 2>/dev/null
+ cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
+ chmod +w ${LIB}/$file 2>/dev/null
+ chmod a+r ${LIB}/$file 2>/dev/null
+fi
+
+if [ -r ${LIB}/$file ]; then
+ if egrep '^extern struct sigevent;' ${LIB}/$file >/dev/null 2>&1; then
+ echo Fixing $file
+ sed -e 's/^extern struct sigevent;/struct sigevent;/' ${LIB}/$file > ${LIB}/${file}.sed
+ rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+ fi
+ 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
+
# Another bad dependency in VxWorks 5.2 <time.h>.
file=time.h
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then