diff options
author | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-22 07:22:00 +0000 |
---|---|---|
committer | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-22 07:22:00 +0000 |
commit | 014bd08947669e75f169e9c1bc13e88310a67785 (patch) | |
tree | bfb929a4c2c644f2efb7b7c04acfa5bcd45a946b /contrib | |
parent | 324e6e734a73acc9de0487ac70ccde7191a29be0 (diff) | |
download | gcc-014bd08947669e75f169e9c1bc13e88310a67785.tar.gz |
Syntax error in sed script, combine '//' fixes
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22544 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/fixinc/inclhack.def | 76 |
1 files changed, 45 insertions, 31 deletions
diff --git a/contrib/fixinc/inclhack.def b/contrib/fixinc/inclhack.def index da95cb805c6..6c04a4800c0 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" |