[CVS 980326] PATCH to make fixincludes fix nested comments on Motorola
Manfred Hollstein
manfred@s-direktnet.de
Fri Mar 27 13:49:00 GMT 1998
Motorola's <limits.h> and <sys/limits.h> contain nested comments which
this patch fixes. The lines in question are:
limits.h (on m68k-motorola-sysv):
/*#define HUGE_VAL 3.40282346638528860e+38 /*error value returned by Math lib*/
sys/limits.h (on m88k-motorola-sysv3):
#undef PIPE_BUF /* max # bytes atomic in write to a
/* pipe */
Fri Mar 27 08:39:32 1998 Manfred Hollstein <manfred@s-direktnet.de>
* fixincludes (limits.h): Fix nested comments in Motorola's
limits.h and sys/limits.h.
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980326.orig/gcc/fixincludes egcs-980326/gcc/fixincludes
--- egcs-980326.orig/gcc/fixincludes Tue Jan 27 22:16:28 1998
+++ egcs-980326/gcc/fixincludes Tue Jan 27 22:16:28 1998
@@ -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
More information about the Gcc-bugs
mailing list