aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorFelix Lee <flee@cygnus.com>1998-09-21 00:56:50 +0000
committerJeff Law <law@gcc.gnu.org>1998-09-20 18:56:50 -0600
commitb2a1e45827eae56662a02276a9db842d525740c6 (patch)
tree355b6cb7f3bebc6ed20e9e68836094752eaeaae6 /gcc/gcc.c
parent717f76d8fcfd3e6f4ba83fa18882e6b585835844 (diff)
downloadgcc-b2a1e45827eae56662a02276a9db842d525740c6.zip
gcc-b2a1e45827eae56662a02276a9db842d525740c6.tar.gz
gcc-b2a1e45827eae56662a02276a9db842d525740c6.tar.bz2
c-lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
* c-lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT (). * cccp.c (main): Likewise. * gcc.c (process_command): Similarly for "GCC_EXEC_PREFIX". * cccp.c, collect2.c, cpplib.c, gcc.c, config/i386/xm-cygwin32.h: Rename GET_ENVIRONMENT to GET_ENV_PATH_LIST, and fix some macro-use bugs. From-SVN: r22511
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 799f3d7..e5ba9cd 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -111,8 +111,8 @@ static char dir_separator_str[] = {DIR_SEPARATOR, 0};
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-#ifndef GET_ENVIRONMENT
-#define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ENV_VALUE = getenv (ENV_NAME)
+#ifndef GET_ENV_PATH_LIST
+#define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0)
#endif
extern char *my_strerror PROTO((int));
@@ -2563,7 +2563,7 @@ process_command (argc, argv)
int have_o = 0;
int lang_n_infiles = 0;
- GET_ENVIRONMENT (gcc_exec_prefix, "GCC_EXEC_PREFIX");
+ gcc_exec_prefix = getenv ("GCC_EXEC_PREFIX");
n_switches = 0;
n_infiles = 0;
@@ -2606,7 +2606,7 @@ process_command (argc, argv)
/* COMPILER_PATH and LIBRARY_PATH have values
that are lists of directory names with colons. */
- GET_ENVIRONMENT (temp, "COMPILER_PATH");
+ GET_ENV_PATH_LIST (temp, "COMPILER_PATH");
if (temp)
{
char *startp, *endp;
@@ -2640,7 +2640,7 @@ process_command (argc, argv)
}
}
- GET_ENVIRONMENT (temp, "LIBRARY_PATH");
+ GET_ENV_PATH_LIST (temp, "LIBRARY_PATH");
if (temp && *cross_compile == '0')
{
char *startp, *endp;
@@ -2673,7 +2673,7 @@ process_command (argc, argv)
}
/* Use LPATH like LIBRARY_PATH (for the CMU build program). */
- GET_ENVIRONMENT (temp, "LPATH");
+ GET_ENV_PATH_LIST (temp, "LPATH");
if (temp && *cross_compile == '0')
{
char *startp, *endp;