summaryrefslogtreecommitdiff
path: root/gcc/prefix.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-04 17:02:51 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-04 17:02:51 +0000
commit75883c4f512c45d51c5982cb44654135eb19e291 (patch)
tree617c48f602124e1a40772e9b4093518127470787 /gcc/prefix.c
parent4e79af62dcdde0710527e5649e9b90e3a5bf760f (diff)
downloadgcc-75883c4f512c45d51c5982cb44654135eb19e291.tar.gz
* prefix.c (translate_name): Don't strip trailing DIR_SEPARATOR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/prefix.c')
-rw-r--r--gcc/prefix.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/prefix.c b/gcc/prefix.c
index 1c98271b187..4789ed82b97 100644
--- a/gcc/prefix.c
+++ b/gcc/prefix.c
@@ -268,14 +268,10 @@ translate_name (name)
if (prefix == 0)
prefix = PREFIX;
- /* Remove any trailing directory separator from what we got. First check
- for an empty prefix. */
- if (prefix[0] && IS_DIR_SEPARATOR (prefix[strlen (prefix) - 1]))
- {
- char * temp = xstrdup (prefix);
- temp[strlen (temp) - 1] = 0;
- prefix = temp;
- }
+ /* We used to strip trailing DIR_SEPARATORs here, but that can
+ sometimes yield a result with no separator when one was coded
+ and intended by the user, causing two path components to run
+ together. */
return concat (prefix, name, NULL_PTR);
}