summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/prefix.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-03-08 18:31:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-03-08 18:31:45 +0000
commit5af0055602c4db78f82eccafe751ca54f499fdf1 (patch)
treeead0655d4b5ec422a5903a6bba4b1168cd5963e7 /gnu/usr.bin/gcc/prefix.c
parent6e60ece9f7cb1dc3cf104ee80f2b47c728eed447 (diff)
update to gcc 2.8.1
Diffstat (limited to 'gnu/usr.bin/gcc/prefix.c')
-rw-r--r--gnu/usr.bin/gcc/prefix.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/gnu/usr.bin/gcc/prefix.c b/gnu/usr.bin/gcc/prefix.c
index bf501c74391..aa6cf51ed18 100644
--- a/gnu/usr.bin/gcc/prefix.c
+++ b/gnu/usr.bin/gcc/prefix.c
@@ -1,5 +1,5 @@
/* Utility to update paths from internal to external forms.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -102,9 +102,6 @@ get_key_value (key)
if (prefix == 0)
prefix = getenv (concat (key, "_ROOT", NULL_PTR));
- if (prefix == 0)
- prefix = PREFIX;
-
return prefix;
}
@@ -235,7 +232,7 @@ translate_name (name)
char *name;
{
char code = name[0];
- char *key, *prefix;
+ char *key, *prefix = 0;
int keylen;
if (code != '@' && code != '$')
@@ -257,17 +254,12 @@ translate_name (name)
name = &name[keylen + 1];
if (code == '@')
- {
- prefix = get_key_value (key);
- if (prefix == 0)
- prefix = PREFIX;
- }
+ prefix = get_key_value (key);
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] == '/'