This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/9968] Prefix ending in "/" causes trouble in prefix.c
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2007 15:46:39 -0000
- Subject: [Bug bootstrap/9968] Prefix ending in "/" causes trouble in prefix.c
- References: <bug-9968-741@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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