aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>1996-08-13 22:30:02 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>1996-08-13 22:30:02 +0000
commitc7c27cd3e267542ca6afbe5090d5a410bccfd0b2 (patch)
treee25741513006fa22e29d6102a2954e13b63305fb /gcc
parentf7fba6aa123ca9279fbf11071d1019ff7fd5f63c (diff)
downloadgcc-c7c27cd3e267542ca6afbe5090d5a410bccfd0b2.zip
gcc-c7c27cd3e267542ca6afbe5090d5a410bccfd0b2.tar.gz
gcc-c7c27cd3e267542ca6afbe5090d5a410bccfd0b2.tar.bz2
Remove duplicate volatile from sig_atomic_t in AIX sys/signal.h
From-SVN: r12636
Diffstat (limited to 'gcc')
-rwxr-xr-xgcc/fixincludes27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 5ecdd7c..5b7ddfc 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -2673,6 +2673,33 @@ for file in signal.h sys/signal.h; do
fi
done
+# sys/signal.h on some versions of AIX uses volatile in the typedef of
+# sig_atomic_t, which causes gcc to generate a warning about duplicate
+# volatile when a sig_atomic_t variable is declared volatile, as
+# required by ANSI C.
+file=sys/signal.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
+ chmod a+r ${LIB}/$file 2>/dev/null
+fi
+
+if [ -r ${LIB}/$file ]; then
+ echo "Checking for duplicate volatile in sys/signal.h"
+ sed -e 's/typedef volatile int sig_atomic_t/typedef int sig_atomic_t/' \
+ ${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
+
# This loop does not appear to do anything, because it uses file
# rather than $file when setting target. It also appears to be
# unnecessary, since the main loop processes symbolic links.