OSDN Git Service

Syntax error in sed script, combine '//' fixes
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Sep 1998 07:22:00 +0000 (07:22 +0000)
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Sep 1998 07:22:00 +0000 (07:22 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22544 138bc75d-0d04-0410-961f-82ee72b054a4

contrib/fixinc/inclhack.def

index da95cb8..6c04a48 100644 (file)
@@ -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"