diff options
author | Jeff Law <law@gcc.gnu.org> | 2000-08-04 11:02:51 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-08-04 11:02:51 -0600 |
commit | a6e919b38231bf5ca006464dca59920b851466fa (patch) | |
tree | 617c48f602124e1a40772e9b4093518127470787 /gcc/prefix.c | |
parent | 93284395b02210f59118783ba162e4544061751c (diff) | |
download | gcc-a6e919b38231bf5ca006464dca59920b851466fa.zip gcc-a6e919b38231bf5ca006464dca59920b851466fa.tar.gz gcc-a6e919b38231bf5ca006464dca59920b851466fa.tar.bz2 |
* prefix.c (translate_name): Don't strip trailing DIR_SEPARATOR.
From-SVN: r35485
Diffstat (limited to 'gcc/prefix.c')
-rw-r--r-- | gcc/prefix.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/prefix.c b/gcc/prefix.c index 1c98271..4789ed8 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); } |