From a6e919b38231bf5ca006464dca59920b851466fa Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 4 Aug 2000 11:02:51 -0600 Subject: [PATCH] * prefix.c (translate_name): Don't strip trailing DIR_SEPARATOR. From-SVN: r35485 --- gcc/ChangeLog | 6 +++++- gcc/prefix.c | 12 ++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2437da28ef1..2e701efdd80 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,8 @@ -2000-07-17 Mark Elbrecht +2000-08-04 Donn Terry (donnte@microsoft.com) + + * prefix.c (translate_name): Don't strip trailing DIR_SEPARATOR. + +2000-08-04 Mark Elbrecht * i386/x-djgpp: Delete code that conditionally modifies target_alias. Delete code that conditionally modifies 'version'. 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); }