Commit 2f8dd115 by Neil Booth Committed by Neil Booth

c-lex.c (GET_ENVIRONMENT): Remove.

	* 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
parent 56508306
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> 2002-07-21 Gabriel Dos Reis <gdr@nerim.net>
* c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'.
......
...@@ -44,9 +44,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -44,9 +44,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "mbchar.h" #include "mbchar.h"
#include <locale.h> #include <locale.h>
#endif /* MULTIBYTE_CHARS */ #endif /* MULTIBYTE_CHARS */
#ifndef GET_ENVIRONMENT
#define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ((ENV_VALUE) = getenv (ENV_NAME))
#endif
/* The current line map. */ /* The current line map. */
static const struct line_map *map; static const struct line_map *map;
......
...@@ -246,10 +246,6 @@ int pexecute_pid; ...@@ -246,10 +246,6 @@ int pexecute_pid;
/* Defined in the automatically-generated underscore.c. */ /* Defined in the automatically-generated underscore.c. */
extern int prepends_underscore; 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 /* Structure to hold all the directories in which to search for files to
execute. */ execute. */
...@@ -753,7 +749,7 @@ prefix_from_env (env, pprefix) ...@@ -753,7 +749,7 @@ prefix_from_env (env, pprefix)
struct path_prefix *pprefix; struct path_prefix *pprefix;
{ {
const char *p; const char *p;
GET_ENV_PATH_LIST (p, env); GET_ENVIRONMENT (p, env);
if (p) if (p)
prefix_from_string (p, pprefix); prefix_from_string (p, pprefix);
......
...@@ -29,12 +29,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -29,12 +29,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "mkdeps.h" #include "mkdeps.h"
#include "cppdefault.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. /* Windows does not natively support inodes, and neither does MSDOS.
Cygwin's emulation can generate non-unique inodes, so don't use it. Cygwin's emulation can generate non-unique inodes, so don't use it.
VMS has non-numeric inodes. */ VMS has non-numeric inodes. */
...@@ -729,23 +723,23 @@ init_standard_includes (pfile) ...@@ -729,23 +723,23 @@ init_standard_includes (pfile)
etc. specify an additional list of directories to be searched as etc. specify an additional list of directories to be searched as
if specified with -isystem, for the language indicated. */ if specified with -isystem, for the language indicated. */
GET_ENV_PATH_LIST (path, "CPATH"); GET_ENVIRONMENT (path, "CPATH");
if (path != 0 && *path != 0) if (path != 0 && *path != 0)
path_include (pfile, path, BRACKET); path_include (pfile, path, BRACKET);
switch ((CPP_OPTION (pfile, objc) << 1) + CPP_OPTION (pfile, cplusplus)) switch ((CPP_OPTION (pfile, objc) << 1) + CPP_OPTION (pfile, cplusplus))
{ {
case 0: case 0:
GET_ENV_PATH_LIST (path, "C_INCLUDE_PATH"); GET_ENVIRONMENT (path, "C_INCLUDE_PATH");
break; break;
case 1: case 1:
GET_ENV_PATH_LIST (path, "CPLUS_INCLUDE_PATH"); GET_ENVIRONMENT (path, "CPLUS_INCLUDE_PATH");
break; break;
case 2: case 2:
GET_ENV_PATH_LIST (path, "OBJC_INCLUDE_PATH"); GET_ENVIRONMENT (path, "OBJC_INCLUDE_PATH");
break; break;
case 3: case 3:
GET_ENV_PATH_LIST (path, "OBJCPLUS_INCLUDE_PATH"); GET_ENVIRONMENT (path, "OBJCPLUS_INCLUDE_PATH");
break; break;
} }
if (path != 0 && *path != 0) if (path != 0 && *path != 0)
......
...@@ -23,6 +23,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -23,6 +23,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_DEFAULTS_H #ifndef GCC_DEFAULTS_H
#define 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. */ /* Define default standard character escape sequences. */
#ifndef TARGET_BELL #ifndef TARGET_BELL
# define TARGET_BELL 007 # define TARGET_BELL 007
......
...@@ -125,10 +125,6 @@ static const char dir_separator_str[] = { DIR_SEPARATOR, 0 }; ...@@ -125,10 +125,6 @@ static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #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. */ /* Most every one is fine with LIBRARY_PATH. For some, it conflicts. */
#ifndef LIBRARY_PATH_ENV #ifndef LIBRARY_PATH_ENV
#define LIBRARY_PATH_ENV "LIBRARY_PATH" #define LIBRARY_PATH_ENV "LIBRARY_PATH"
...@@ -2352,7 +2348,7 @@ make_relative_prefix (progname, bin_prefix, prefix) ...@@ -2352,7 +2348,7 @@ make_relative_prefix (progname, bin_prefix, prefix)
{ {
char *temp; char *temp;
GET_ENV_PATH_LIST (temp, "PATH"); GET_ENVIRONMENT (temp, "PATH");
if (temp) if (temp)
{ {
char *startp, *endp, *nstore; char *startp, *endp, *nstore;
...@@ -3169,7 +3165,7 @@ process_command (argc, argv) ...@@ -3169,7 +3165,7 @@ process_command (argc, argv)
int j; int j;
#endif #endif
GET_ENV_PATH_LIST (gcc_exec_prefix, "GCC_EXEC_PREFIX"); GET_ENVIRONMENT (gcc_exec_prefix, "GCC_EXEC_PREFIX");
n_switches = 0; n_switches = 0;
n_infiles = 0; n_infiles = 0;
...@@ -3282,7 +3278,7 @@ process_command (argc, argv) ...@@ -3282,7 +3278,7 @@ process_command (argc, argv)
/* COMPILER_PATH and LIBRARY_PATH have values /* COMPILER_PATH and LIBRARY_PATH have values
that are lists of directory names with colons. */ that are lists of directory names with colons. */
GET_ENV_PATH_LIST (temp, "COMPILER_PATH"); GET_ENVIRONMENT (temp, "COMPILER_PATH");
if (temp) if (temp)
{ {
const char *startp, *endp; const char *startp, *endp;
...@@ -3317,7 +3313,7 @@ process_command (argc, argv) ...@@ -3317,7 +3313,7 @@ process_command (argc, argv)
} }
} }
GET_ENV_PATH_LIST (temp, LIBRARY_PATH_ENV); GET_ENVIRONMENT (temp, LIBRARY_PATH_ENV);
if (temp && *cross_compile == '0') if (temp && *cross_compile == '0')
{ {
const char *startp, *endp; const char *startp, *endp;
...@@ -3350,7 +3346,7 @@ process_command (argc, argv) ...@@ -3350,7 +3346,7 @@ process_command (argc, argv)
} }
/* Use LPATH like LIBRARY_PATH (for the CMU build program). */ /* 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') if (temp && *cross_compile == '0')
{ {
const char *startp, *endp; 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> 2002-07-10 Roger Sayle <roger@eyesopen.com>
Zack Weinberg <zack@codesourcery.com> Zack Weinberg <zack@codesourcery.com>
......
...@@ -30,12 +30,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -30,12 +30,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "jcf.h" #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. */ /* By default, colon separates directories in a path. */
#ifndef PATH_SEPARATOR #ifndef PATH_SEPARATOR
#define PATH_SEPARATOR ':' #define PATH_SEPARATOR ':'
...@@ -244,7 +238,7 @@ jcf_path_init () ...@@ -244,7 +238,7 @@ jcf_path_init ()
sep[0] = DIR_SEPARATOR; sep[0] = DIR_SEPARATOR;
sep[1] = '\0'; sep[1] = '\0';
GET_ENV_PATH_LIST (cp, "GCC_EXEC_PREFIX"); GET_ENVIRONMENT (cp, "GCC_EXEC_PREFIX");
if (cp) if (cp)
{ {
try = alloca (strlen (cp) + 50); try = alloca (strlen (cp) + 50);
...@@ -315,7 +309,7 @@ jcf_path_init () ...@@ -315,7 +309,7 @@ jcf_path_init ()
jcf_path_extdirs_arg (extdirs); jcf_path_extdirs_arg (extdirs);
} }
GET_ENV_PATH_LIST (cp, "CLASSPATH"); GET_ENVIRONMENT (cp, "CLASSPATH");
add_path (&classpath_env, cp, 0); add_path (&classpath_env, cp, 0);
} }
......
...@@ -128,10 +128,6 @@ static const char * const standard_exec_prefix = STANDARD_EXEC_PREFIX; ...@@ -128,10 +128,6 @@ static const char * const standard_exec_prefix = STANDARD_EXEC_PREFIX;
static const char * const target_machine = DEFAULT_TARGET_MACHINE; static const char * const target_machine = DEFAULT_TARGET_MACHINE;
static const char * const target_version = DEFAULT_TARGET_VERSION; 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) */ #endif /* !defined (UNPROTOIZE) */
/* Suffix of aux_info files. */ /* Suffix of aux_info files. */
...@@ -4415,7 +4411,7 @@ do_processing () ...@@ -4415,7 +4411,7 @@ do_processing ()
} }
else else
{ {
GET_ENV_PATH_LIST (default_syscalls_dir, "GCC_EXEC_PREFIX"); GET_ENVIRONMENT (default_syscalls_dir, "GCC_EXEC_PREFIX");
if (!default_syscalls_dir) if (!default_syscalls_dir)
{ {
default_syscalls_dir = standard_exec_prefix; default_syscalls_dir = standard_exec_prefix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment