aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBruce Korb <korbb@gcc.gnu.org>1998-09-22 07:22:00 +0000
committerBruce Korb <korbb@gcc.gnu.org>1998-09-22 07:22:00 +0000
commit6096cf988169ef5abe461db3487ffe11761c4662 (patch)
treebfb929a4c2c644f2efb7b7c04acfa5bcd45a946b /contrib
parentda7275888fa162596e91c62809d10c398806a225 (diff)
downloadgcc-6096cf988169ef5abe461db3487ffe11761c4662.zip
gcc-6096cf988169ef5abe461db3487ffe11761c4662.tar.gz
gcc-6096cf988169ef5abe461db3487ffe11761c4662.tar.bz2
Syntax error in sed script, combine '//' fixes
From-SVN: r22544
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fixinc/inclhack.def76
1 files changed, 45 insertions, 31 deletions
diff --git a/contrib/fixinc/inclhack.def b/contrib/fixinc/inclhack.def
index da95cb8..6c04a48 100644
--- a/contrib/fixinc/inclhack.def
+++ b/contrib/fixinc/inclhack.def
@@ -251,7 +251,7 @@ fix = {
sed = "/#[ \t]*define[ \t]*[ \t]BSD43__IO/" 's/\'\([cgx]\)\'/\1/g';
};
-
+#IFDEF no_more
/*
* And also with the HP-UX 10 and HP-UX 11 sys/pci.h file
*/
@@ -298,6 +298,49 @@ fix = {
select = "Wind River";
sed = "s|//.*$||g";
};
+#endif
+
+/*
+ * Remove the double-slash comments
+ * They *must* be removed so it will not create nested comments!!
+ * However, they will *not* be removed if '++' is in any part of
+ * the file name, or if the name ends with ".hh" or ".H".
+ *
+ * There *used* to be a number of similar problems in various OSes:
+
+ * Turning // comments into normal comments trashes this IRIX 4.0.1
+ * header file, which embeds // comments inside multi-line
+ * comments. If this looks like the IRIX header file, we refix it by
+ * just throwing away the // comments.
+
+ * Same problem with a file from SunOS 4.1.3 : a header file containing
+ * the string "//" embedded in "/ * * /"
+
+ * There is a similar problem with the VxWorks drv/netif/if_med.h file.
+
+ * And also with the HP-UX 10 and HP-UX 11 sys/pci.h file
+ */
+fix = {
+ hackname = no_double_slash;
+ test = '-z "`echo ${file}|egrep \'++$|\.hh$|\.H$\'`"';
+ select = '//[^*]';
+ sed = '/\/\/[^*]/' "s|//.*$||g";
+};
+
+
+/*
+ * Multiline comment after typedef on IRIX 4.0.1.
+ */
+fix = {
+ hackname = irix_bogus_cxx_cmnt;
+ files = "elf_abi.h";
+ files = "elf.h";
+ /*
+ * This really looks like it is replacing "/ * * /" with "//"
+ * Shouldn't the replacement really be " ## "?
+ */
+ sed = 's@"/\*"\*/@"//"@';
+};
/*
@@ -533,21 +576,6 @@ fix = {
/*
- * Multiline comment after typedef on IRIX 4.0.1.
- */
-fix = {
- hackname = irix_bogus_cxx_cmnt;
- files = "elf_abi.h";
- files = "elf.h";
- /*
- * This really looks like it is replacing "/ * * /" with "//"
- * Shouldn't the replacement really be " ## "?
- */
- sed = 's@"/\*"\*/@"//"@';
-};
-
-
-/*
* IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr
* in prototype without previous definition.
*/
@@ -1040,20 +1068,6 @@ fix = {
/*
- * Remove the double-slash comments
- * They *must* be removed so it will not create nested comments!!
- * However, they will *not* be removed if '++' is in any part of
- * the file name, or if the name ends with ".hh" or ".H".
- */
-fix = {
- hackname = no_double_slash;
- test = '-z "`echo ${file}|egrep \'++|\.hh$|\.H$\'`"';
- select = '//[^*]';
- sed = '/\/\/[^*]/' "s|//\\(.*\\)$|/* \\1 */|";
-};
-
-
-/*
* a missing semi-colon at the end of the nodeent structure definition.
*/
fix = {
@@ -1817,7 +1831,7 @@ fix = {
select = "typedef[ \t]+[a-z_][ \ta-z_]*[ \t]"
"(size|ptrdiff|wchar)_t";
- sed = "/^[ \t]*\*[ \t]*typedef unsigned int size_t;/N";
+ sed = "/^[ \t]*\\*[ \t]*typedef unsigned int size_t;/N";
sed = "s/^\\([ \t]*\\*[ \t]*typedef unsigned int size_t;\\n"
"[ \t]*\\*\\/\\)/\\1\\\n"