OSDN Git Service

Fix sed script for sysv86_string fix
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Aug 2000 14:03:47 +0000 (14:03 +0000)
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Aug 2000 14:03:47 +0000 (14:03 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35908 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fixinc/fixincl.x
gcc/fixinc/inclhack.def

index 33096a3..e2940b2 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-12  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * fixinc/inclhack.def (sysv68_string): Fix the Sed script so it
+       works inside fixincl.
+
 Wed Aug 23 04:55:48 2000  Alexandre Oliva  <aoliva@redhat.com>
 
        * simplify-rtx.c (simplify_rtx): Don't pass VOIDmode to
index 14c697f..746a5e3 100644 (file)
@@ -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 };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
index b1172d7..cfc545a 100644 (file)
@@ -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"