mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 15:09:37 +08:00
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
This commit is contained in:
parent
565083069d
commit
2f8dd115d2
@ -1,3 +1,16 @@
|
||||
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'.
|
||||
|
@ -44,9 +44,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#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;
|
||||
|
@ -246,10 +246,6 @@ int pexecute_pid;
|
||||
/* 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. */
|
||||
|
||||
@ -753,7 +749,7 @@ prefix_from_env (env, pprefix)
|
||||
struct path_prefix *pprefix;
|
||||
{
|
||||
const char *p;
|
||||
GET_ENV_PATH_LIST (p, env);
|
||||
GET_ENVIRONMENT (p, env);
|
||||
|
||||
if (p)
|
||||
prefix_from_string (p, pprefix);
|
||||
|
@ -29,12 +29,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#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. */
|
||||
@ -729,23 +723,23 @@ init_standard_includes (pfile)
|
||||
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)
|
||||
|
@ -23,6 +23,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#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
|
||||
|
14
gcc/gcc.c
14
gcc/gcc.c
@ -125,10 +125,6 @@ static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
|
||||
#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"
|
||||
@ -2352,7 +2348,7 @@ make_relative_prefix (progname, bin_prefix, prefix)
|
||||
{
|
||||
char *temp;
|
||||
|
||||
GET_ENV_PATH_LIST (temp, "PATH");
|
||||
GET_ENVIRONMENT (temp, "PATH");
|
||||
if (temp)
|
||||
{
|
||||
char *startp, *endp, *nstore;
|
||||
@ -3169,7 +3165,7 @@ process_command (argc, argv)
|
||||
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;
|
||||
@ -3282,7 +3278,7 @@ process_command (argc, argv)
|
||||
/* 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;
|
||||
@ -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')
|
||||
{
|
||||
const char *startp, *endp;
|
||||
@ -3350,7 +3346,7 @@ process_command (argc, argv)
|
||||
}
|
||||
|
||||
/* 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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
|
@ -30,12 +30,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
||||
|
||||
#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 ':'
|
||||
@ -244,7 +238,7 @@ jcf_path_init ()
|
||||
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);
|
||||
@ -315,7 +309,7 @@ jcf_path_init ()
|
||||
jcf_path_extdirs_arg (extdirs);
|
||||
}
|
||||
|
||||
GET_ENV_PATH_LIST (cp, "CLASSPATH");
|
||||
GET_ENVIRONMENT (cp, "CLASSPATH");
|
||||
add_path (&classpath_env, cp, 0);
|
||||
}
|
||||
|
||||
|
@ -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_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. */
|
||||
@ -4415,7 +4411,7 @@ do_processing ()
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user