aboutsummaryrefslogtreecommitdiff
path: root/gcc/cccp.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/cccp.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/cccp.c')
-rw-r--r--gcc/cccp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index fa359d7..5afba12 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -45,8 +45,8 @@ typedef unsigned char U_CHAR;
#include <locale.h>
#endif /* MULTIBYTE_CHARS */
-#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
#ifndef STANDARD_INCLUDE_DIR
@@ -1310,7 +1310,7 @@ main (argc, argv)
#ifdef MULTIBYTE_CHARS
/* Change to the native locale for multibyte conversions. */
setlocale (LC_CTYPE, "");
- GET_ENVIRONMENT (literal_codeset, "LANG");
+ literal_codeset = getenv ("LANG");
#endif
/* Process switches and find input file name. */
@@ -1742,7 +1742,7 @@ main (argc, argv)
/* Some people say that CPATH should replace the standard include dirs,
but that seems pointless: it comes before them, so it overrides them
anyway. */
- GET_ENVIRONMENT (cp, "CPATH");
+ GET_ENV_PATH_LIST (cp, "CPATH");
if (cp && ! no_standard_includes)
path_include (cp);
@@ -1926,16 +1926,16 @@ main (argc, argv)
switch ((objc << 1) + cplusplus)
{
case 0:
- GET_ENVIRONMENT (epath, "C_INCLUDE_PATH");
+ GET_ENV_PATH_LIST (epath, "C_INCLUDE_PATH");
break;
case 1:
- GET_ENVIRONMENT (epath, "CPLUS_INCLUDE_PATH");
+ GET_ENV_PATH_LIST (epath, "CPLUS_INCLUDE_PATH");
break;
case 2:
- GET_ENVIRONMENT (epath, "OBJC_INCLUDE_PATH");
+ GET_ENV_PATH_LIST (epath, "OBJC_INCLUDE_PATH");
break;
case 3:
- GET_ENVIRONMENT (epath, "OBJCPLUS_INCLUDE_PATH");
+ GET_ENV_PATH_LIST (epath, "OBJCPLUS_INCLUDE_PATH");
break;
}
/* If the environment var for this language is set,