* c-lex.c (GET_ENVIRONMENT): Remove.
* collect2.c (GET_ENV_PATH_LIST): Remove.
(prefix_from_env): Use GET_ENVIRONMENT.
* cppinit.c (GET_ENV_PATH_LIST): Remove.
(init_standard_includes): Use GET_ENVIRONMENT.
* defaults.h (GET_ENVIRONMENT): Define here if not already.
* gcc.c (GET_ENV_PATH_LIST): Remove.
(make_relative_prefix, process_command): Update.
* protoize.c (GET_ENV_PATH_LIST): Remove.
(do_processing): Update.
java:
* jcf-path.c (GET_ENV_PATH_LIST): Remove.
(jcf_path_init): Use GET_ENVIRONMENT.
From-SVN: r55630
+2002-07-21 Neil Booth <neil@daikokuya.co.uk>
+
+ * c-lex.c (GET_ENVIRONMENT): Remove.
+ * collect2.c (GET_ENV_PATH_LIST): Remove.
+ (prefix_from_env): Use GET_ENVIRONMENT.
+ * cppinit.c (GET_ENV_PATH_LIST): Remove.
+ (init_standard_includes): Use GET_ENVIRONMENT.
+ * defaults.h (GET_ENVIRONMENT): Define here if not already.
+ * gcc.c (GET_ENV_PATH_LIST): Remove.
+ (make_relative_prefix, process_command): Update.
+ * protoize.c (GET_ENV_PATH_LIST): Remove.
+ (do_processing): Update.
+
2002-07-21 Gabriel Dos Reis <gdr@nerim.net>
* c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'.
#include "mbchar.h"
#include <locale.h>
#endif /* MULTIBYTE_CHARS */
-#ifndef GET_ENVIRONMENT
-#define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ((ENV_VALUE) = getenv (ENV_NAME))
-#endif
/* The current line map. */
static const struct line_map *map;
/* Defined in the automatically-generated underscore.c. */
extern int prepends_underscore;
-#ifndef GET_ENV_PATH_LIST
-#define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0)
-#endif
-
/* Structure to hold all the directories in which to search for files to
execute. */
struct path_prefix *pprefix;
{
const char *p;
- GET_ENV_PATH_LIST (p, env);
+ GET_ENVIRONMENT (p, env);
if (p)
prefix_from_string (p, pprefix);
#include "mkdeps.h"
#include "cppdefault.h"
-/* Predefined symbols, built-in macros, and the default include path. */
-
-#ifndef GET_ENV_PATH_LIST
-#define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0)
-#endif
-
/* Windows does not natively support inodes, and neither does MSDOS.
Cygwin's emulation can generate non-unique inodes, so don't use it.
VMS has non-numeric inodes. */
etc. specify an additional list of directories to be searched as
if specified with -isystem, for the language indicated. */
- GET_ENV_PATH_LIST (path, "CPATH");
+ GET_ENVIRONMENT (path, "CPATH");
if (path != 0 && *path != 0)
path_include (pfile, path, BRACKET);
switch ((CPP_OPTION (pfile, objc) << 1) + CPP_OPTION (pfile, cplusplus))
{
case 0:
- GET_ENV_PATH_LIST (path, "C_INCLUDE_PATH");
+ GET_ENVIRONMENT (path, "C_INCLUDE_PATH");
break;
case 1:
- GET_ENV_PATH_LIST (path, "CPLUS_INCLUDE_PATH");
+ GET_ENVIRONMENT (path, "CPLUS_INCLUDE_PATH");
break;
case 2:
- GET_ENV_PATH_LIST (path, "OBJC_INCLUDE_PATH");
+ GET_ENVIRONMENT (path, "OBJC_INCLUDE_PATH");
break;
case 3:
- GET_ENV_PATH_LIST (path, "OBJCPLUS_INCLUDE_PATH");
+ GET_ENVIRONMENT (path, "OBJCPLUS_INCLUDE_PATH");
break;
}
if (path != 0 && *path != 0)
#ifndef GCC_DEFAULTS_H
#define GCC_DEFAULTS_H
+#ifndef GET_ENVIRONMENT
+#define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
+#endif
+
/* Define default standard character escape sequences. */
#ifndef TARGET_BELL
# define TARGET_BELL 007
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-#ifndef GET_ENV_PATH_LIST
-#define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0)
-#endif
-
/* Most every one is fine with LIBRARY_PATH. For some, it conflicts. */
#ifndef LIBRARY_PATH_ENV
#define LIBRARY_PATH_ENV "LIBRARY_PATH"
{
char *temp;
- GET_ENV_PATH_LIST (temp, "PATH");
+ GET_ENVIRONMENT (temp, "PATH");
if (temp)
{
char *startp, *endp, *nstore;
int j;
#endif
- GET_ENV_PATH_LIST (gcc_exec_prefix, "GCC_EXEC_PREFIX");
+ GET_ENVIRONMENT (gcc_exec_prefix, "GCC_EXEC_PREFIX");
n_switches = 0;
n_infiles = 0;
/* COMPILER_PATH and LIBRARY_PATH have values
that are lists of directory names with colons. */
- GET_ENV_PATH_LIST (temp, "COMPILER_PATH");
+ GET_ENVIRONMENT (temp, "COMPILER_PATH");
if (temp)
{
const char *startp, *endp;
}
}
- GET_ENV_PATH_LIST (temp, LIBRARY_PATH_ENV);
+ GET_ENVIRONMENT (temp, LIBRARY_PATH_ENV);
if (temp && *cross_compile == '0')
{
const char *startp, *endp;
}
/* Use LPATH like LIBRARY_PATH (for the CMU build program). */
- GET_ENV_PATH_LIST (temp, "LPATH");
+ GET_ENVIRONMENT (temp, "LPATH");
if (temp && *cross_compile == '0')
{
const char *startp, *endp;
+2002-07-21 Neil Booth <neil@daikokuya.co.uk>
+
+ * jcf-path.c (GET_ENV_PATH_LIST): Remove.
+ (jcf_path_init): Use GET_ENVIRONMENT.
+
2002-07-10 Roger Sayle <roger@eyesopen.com>
Zack Weinberg <zack@codesourcery.com>
#include "jcf.h"
-/* Some boilerplate that really belongs in a header. */
-
-#ifndef GET_ENV_PATH_LIST
-#define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0)
-#endif
-
/* By default, colon separates directories in a path. */
#ifndef PATH_SEPARATOR
#define PATH_SEPARATOR ':'
sep[0] = DIR_SEPARATOR;
sep[1] = '\0';
- GET_ENV_PATH_LIST (cp, "GCC_EXEC_PREFIX");
+ GET_ENVIRONMENT (cp, "GCC_EXEC_PREFIX");
if (cp)
{
try = alloca (strlen (cp) + 50);
jcf_path_extdirs_arg (extdirs);
}
- GET_ENV_PATH_LIST (cp, "CLASSPATH");
+ GET_ENVIRONMENT (cp, "CLASSPATH");
add_path (&classpath_env, cp, 0);
}
static const char * const target_machine = DEFAULT_TARGET_MACHINE;
static const char * const target_version = DEFAULT_TARGET_VERSION;
-#ifndef GET_ENV_PATH_LIST
-#define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0)
-#endif
-
#endif /* !defined (UNPROTOIZE) */
/* Suffix of aux_info files. */
}
else
{
- GET_ENV_PATH_LIST (default_syscalls_dir, "GCC_EXEC_PREFIX");
+ GET_ENVIRONMENT (default_syscalls_dir, "GCC_EXEC_PREFIX");
if (!default_syscalls_dir)
{
default_syscalls_dir = standard_exec_prefix;