[Bug bootstrap/9968] Prefix ending in "/" causes trouble in prefix.c

manu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Feb 17 15:46:00 GMT 2007



------- Comment #10 from manu at gcc dot gnu dot org  2007-02-17 15:46 -------
How can this be tested? Would this work?

Index: gcc/prefix.c
===================================================================
--- gcc/prefix.c        (revision 121953)
+++ gcc/prefix.c        (working copy)
@@ -252,6 +252,12 @@ update_path (const char *path, const cha
   char *result, *p;
   const int len = strlen (std_prefix);

+  if (IS_DIR_SEPARATOR (std_prefix[len-1]))
+    {
+      set_std_prefix (std_prefix, len-1);
+      return update_path (path, key);
+    }
+
   if (! strncmp (path, std_prefix, len)
       && (IS_DIR_SEPARATOR(path[len])
           || path[len] == '\0')


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9968



More information about the Gcc-bugs mailing list