diff options
author | Nick Clifton <nickc@cygnus.com> | 1998-03-24 15:55:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 1998-03-24 15:55:46 +0000 |
commit | 72cf69027418d4fe4f75fe66e5fede2959a4d364 (patch) | |
tree | 949492015abf9a6f2ccad7d23fd63031cf2f8ff4 /gcc/collect2.c | |
parent | 1fdb7d9353e9bc64bd6ec8ef243f35059b9740e5 (diff) | |
download | gcc-72cf69027418d4fe4f75fe66e5fede2959a4d364.zip gcc-72cf69027418d4fe4f75fe66e5fede2959a4d364.tar.gz gcc-72cf69027418d4fe4f75fe66e5fede2959a4d364.tar.bz2 |
Add definition of GET_ENVIRONMENT and make prefix_from_env() use it.
From-SVN: r18801
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index d974f5d..1d6bb754 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -242,9 +242,14 @@ char * temporary_firstobj; /* Defined in the automatically-generated underscore.c. */ extern int prepends_underscore; +extern char *getenv (); extern char *mktemp (); extern FILE *fdopen (); +#ifndef GET_ENVIRONMENT +#define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ENV_VALUE = getenv (ENV_NAME) +#endif + /* Structure to hold all the directories in which to search for files to execute. */ @@ -906,7 +911,8 @@ prefix_from_env (env, pprefix) char *env; struct path_prefix *pprefix; { - char *p = getenv (env); + char *p; + GET_ENVIRONMENT (p, env); if (p) prefix_from_string (p, pprefix); @@ -1032,7 +1038,7 @@ main (argc, argv) In practice, collect will rarely invoke itself. This can happen now that we are no longer called gld. A perfect example is when running gcc in a build directory that has been installed. When looking for - ld, we will find our installed version and believe that's the real ld. */ + ld's, we will find our installed version and believe that's the real ld. */ /* We must also append COLLECT_NAME to COLLECT_NAMES to watch for the previous version of collect (the one that used COLLECT_NAME and only |