summaryrefslogtreecommitdiff
path: root/gcc/prefix.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-04 13:32:39 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-04 13:32:39 +0000
commit997d68fef349f244932d14a82f06cbfe26e344f6 (patch)
tree6743f11e58bd7a933b08900d973d89026cd11c43 /gcc/prefix.c
parent68215e49a61b9179c353b5edd9b5796b04acdba0 (diff)
downloadgcc-997d68fef349f244932d14a82f06cbfe26e344f6.tar.gz
* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details. * haifa-sched.c: Mirror recent changes from gcc2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18984 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/prefix.c')
-rw-r--r--gcc/prefix.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/prefix.c b/gcc/prefix.c
index c07944764d4..1c96c58e54a 100644
--- a/gcc/prefix.c
+++ b/gcc/prefix.c
@@ -240,7 +240,7 @@ translate_name (name)
char *name;
{
char code = name[0];
- char *key, *prefix;
+ char *key, *prefix = 0;
int keylen;
if (code != '@' && code != '$')
@@ -268,11 +268,10 @@ translate_name (name)
prefix = std_prefix;
}
else
- {
- prefix = getenv (key);
- if (prefix == 0)
- prefix = concat ("$", key, NULL_PTR);
- }
+ prefix = getenv (key);
+
+ if (prefix == 0)
+ prefix = PREFIX;
/* Remove any trailing directory separator from what we got. */
if (prefix[strlen (prefix) - 1] == '/'