aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.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/cpplib.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/cpplib.c')
-rw-r--r--gcc/cpplib.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index baf6e6f..7521723 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -39,8 +39,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "cpplib.h"
#include "cpphash.h"
-#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 *update_path PARAMS ((char *, char *));
@@ -5710,7 +5710,7 @@ cpp_start_read (pfile, fname)
/* 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 (p, "CPATH");
+ GET_ENV_PATH_LIST (p, "CPATH");
if (p != 0 && ! opts->no_standard_includes)
path_include (pfile, p);
@@ -5840,16 +5840,16 @@ cpp_start_read (pfile, fname)
switch ((opts->objc << 1) + opts->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,