fix _cplusplus typo in SCO's tinfo.h
authorTom Wood <wood@gnu.org>
Sat, 5 Dec 1992 00:49:52 +0000 (00:49 +0000)
committerTom Wood <wood@gnu.org>
Sat, 5 Dec 1992 00:49:52 +0000 (00:49 +0000)
From-SVN: r2838

gcc/fixincludes

index 93d8b30..d07f24d 100755 (executable)
@@ -361,6 +361,24 @@ EOF
   fi
 fi
 
+# Fix an error in this file: the #if says _cplusplus, not the double
+# underscore __cplusplus that it should be
+file=tinfo.h
+if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+  mkdir ${LIB}/rpcsvc 2>/dev/null
+  cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
+  chmod +w ${LIB}/$file 2>/dev/null
+fi
+
+if [ -r ${LIB}/$file ]; then
+  echo Fixing $file, __cplusplus macro
+  sed -e 's/[  ]_cplusplus/ __cplusplus/' ${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 ${LIB}/$file
+  fi
+fi
+
 # Fix an error in this file: a missing semi-colon at the end of the statsswtch
 # structure definition.
 file=rpcsvc/rstat.h