summaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-09-24 08:00:06 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-09-24 08:00:06 -0400
commit2dbb8078bf1a26e87a1c1ba350c4a4dedf4bbe4c (patch)
tree1cdc412f2bc66e156fa1c00ffd2db054067ede6e /gcc/fixincludes
parent30657ee33dd334a375a7aaf5f76f45ffddd0c189 (diff)
downloadgcc-2dbb8078bf1a26e87a1c1ba350c4a4dedf4bbe4c.tar.gz
Insert newlines just before end of 'sed' command strings if last 'sed'
command is 'a' or 'i'. From-SVN: r12830
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 5b7ddfc0c76..f4803b728ff 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -2078,13 +2078,17 @@ for files in curses.h; do
echo Fixing $file
sed -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\
-#ifndef __cplusplus'\
+#ifndef __cplusplus
+'\
-e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/a\
-#endif'\
+#endif
+'\
-e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/i\
-#ifndef __cplusplus'\
+#ifndef __cplusplus
+'\
-e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\
-#endif'\
+#endif
+'\
${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