aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorManfred Hollstein <manfred@gcc.gnu.org>1998-03-31 22:35:25 +0000
committerManfred Hollstein <manfred@gcc.gnu.org>1998-03-31 22:35:25 +0000
commita26fd1652b6b8280eee7746c25d7c083d72ba29b (patch)
tree304933e6f61fc6369823795cf6549a5dacc3797f /gcc/fixincludes
parentb5026c5068e0c23a8229829e8f23ab7833223e6f (diff)
downloadgcc-a26fd1652b6b8280eee7746c25d7c083d72ba29b.zip
gcc-a26fd1652b6b8280eee7746c25d7c083d72ba29b.tar.gz
gcc-a26fd1652b6b8280eee7746c25d7c083d72ba29b.tar.bz2
fixincludes (limits.h): Fix nested comments in Motorola's limits.h and sys/limits.h.
8 * fixincludes (limits.h): Fix nested comments in Motorola's limits.h and sys/limits.h. From-SVN: r18923
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 8ed09c0..9320094 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -2166,6 +2166,31 @@ if [ -r ${LIB}/$file ]; then
fi
fi
+# Fix nested comments in Motorola's <limits.h> and <sys/limits.h>
+for file in limits.h sys/limits.h; do
+ if [ $target_canonical = m88k-motorola-sysv3 -o \
+ $target_canonical = m68k-motorola-sysv ]; then
+
+ 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 "Fixing nested comments in Motorola's $file"
+ sed \
+ -e 's@^\(#undef[ ][ ]*PIPE_BUF[ ]*/\* max # bytes atomic in write to a\)$@\1 */@' \
+ -e 's@\(/\*#define HUGE_VAL 3.40282346638528860e+38 \)\(/\*error value returned by Math lib\*/\)$@\1*/ \2@' \
+ < ${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
+ fi
+ fi
+ fi
+done
+
# Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX.
for file in stdio.h stdlib.h; do
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then