Remove nested brackets in change of Oct 21.
authorRichard Stallman <rms@gnu.org>
Mon, 25 Oct 1993 17:57:20 +0000 (17:57 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 25 Oct 1993 17:57:20 +0000 (17:57 +0000)
Fix token pasting operator in ARM/RISCiX include files.

From-SVN: r5881

gcc/fixincludes

index 6c4e583..ffa5386 100755 (executable)
@@ -472,8 +472,8 @@ fi
 
 if [ -r ${LIB}/$file ]; then
   echo Fixing $file
-  sed -e "s/\(#[       ]*\(ifndef\)[   ]*\)__wchar_t/\1_GCC_WCHAR_T/" \
-      -e "s/\(#[       ]*\(define\)[   ]*\)__wchar_t/\1_GCC_WCHAR_T/" \
+  sed -e "s/\(#[       ]*ifndef[       ]*\)__wchar_t/\1_GCC_WCHAR_T/" \
+      -e "s/\(#[       ]*define[       ]*\)__wchar_t/\1_GCC_WCHAR_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
@@ -1242,6 +1242,27 @@ do
   fi
 done
 
+# These files in ARM/RISCiX use /**/ to concatenate tokens.
+for file in arm/as_support.h arm/mc_type.h arm/xcb.h dev/chardefmac.h \
+       dev/ps_irq.h dev/screen.h dev/scsi.h sys/tty.h \
+       X11/extensions/multibufst.h X11/Xmd.h X11/Xlibinit.h \
+       Xm.acorn/XmP.h
+do
+  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
+    sed -e 's|/\*\*/|##|g' ${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
+done
+
 echo 'Removing unneeded directories:'
 cd $LIB
 files=`find . -type d -print | sort -r`