summaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-23 14:03:47 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-23 14:03:47 +0000
commit7648573392bc5304a028675fb3f89b295c643b1b (patch)
tree269ecb4b84d370654dbca3496ab0cc5d4c608a38 /gcc/fixinc
parent5fe444e3d869a97be6f4bb399d2653a60a58c9f6 (diff)
downloadgcc-7648573392bc5304a028675fb3f89b295c643b1b.tar.gz
Fix sed script for sysv86_string fix
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35908 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixincl.x4
-rw-r--r--gcc/fixinc/inclhack.def11
2 files changed, 6 insertions, 9 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 14c697f6f83..746a5e375cd 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -4217,12 +4217,12 @@ const char* apzSysv68_StringPatch[] = { "sed",
"-e", "s/strdup(char \\*s1);/strdup(const char *s1);/",
"-e", "/^extern char$/N",
"-e", "s/^extern char\\(\\n\t\\*memccpy(),\\)$/extern void\\1/",
+ "-e", "/^extern int$/N",
+ "-e", "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/",
"-e", "/^\tstrncmp(),$/N",
"-e", "s/^\\(\tstrncmp()\\),\\n\\(\tstrlen(),\\)$/\\1;\\\n\
extern unsigned int\\\n\
\\2/",
- "-e", "/^extern int$/N",
- "-e", "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index b1172d72779..cfc545a1070 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -2587,17 +2587,13 @@ fix = {
sed = "/^extern char$/N";
sed = "s/^extern char\\(\\n\t\\*memccpy(),\\)$/extern void\\1/";
- /*
- * This sed expression is broken inside fixincl.
- * The same expression seems to work outside, however :-(
- */
+ sed = "/^extern int$/N";
+ sed = "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/";
+
sed = "/^\tstrncmp(),$/N";
sed = 's/^\(' "\t" 'strncmp()\),\n\(' "\t" 'strlen(),\)$/'
'\1;' "\\\nextern unsigned int\\\n\\2/";
- sed = "/^extern int$/N";
- sed = "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/";
-
test_text =
"extern int strlen();\n"
@@ -2608,6 +2604,7 @@ fix = {
"\tmemcpy();\n"
"extern int\n"
+ "\tstrcmp(),\n"
"\tstrncmp(),\n"
"\tstrlen(),\n"
"\tstrspn();\n"