]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-lex.c (GET_ENVIRONMENT): Remove.
authorNeil Booth <neil@daikokuya.co.uk>
Sun, 21 Jul 2002 21:59:03 +0000 (21:59 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 21 Jul 2002 21:59:03 +0000 (21:59 +0000)
* 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

gcc/ChangeLog
gcc/c-lex.c
gcc/collect2.c
gcc/cppinit.c
gcc/defaults.h
gcc/gcc.c
gcc/java/ChangeLog
gcc/java/jcf-path.c
gcc/protoize.c

index efb665865ffd5385a4a0fd735fb62fa55e296f60..29dad05254c68e8a78f5a775c50543e3d71a4a52 100644 (file)
@@ -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'.
index 4a7f05ae7468b65877859babec2e4ca6390cdee4..bf5c424740f49c99bb0241c100623b23afb6e165 100644 (file)
@@ -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;
index 97f1597deb5c2861f85fa029eb081941985e2cec..537c076f939d906bad19c44200372c524cc2800c 100644 (file)
@@ -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);
index 72e26ce87de5c3f8be4968b625ad76b1f8c00115..a6be4aa67365dbf1f794ee9e0314dde7a7689aa1 100644 (file)
@@ -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)
index 5b88ac2d880befd5f3b67800de4e91d9beb2f61d..b542e5361387fbd907d12bdf2abe50a476e409dd 100644 (file)
@@ -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
index 0682c48ad07a4414f967dbe8d104c9d0e38f8582..73ae1987ef98eede42d20cc24765c780bfcac387 100644 (file)
--- a/gcc/gcc.c
+++ b/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;
index 0bbdcb966d099e4aa1ff67ca66e879dadca03578..601e766175f7410620924c0599c5f9688b1dcc52 100644 (file)
@@ -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>
 
index b68a538f45b7ba73881c3316335dfadd94a02dc3..ce05088ba81525d86c08e0444cae6a0f818200ee 100644 (file)
@@ -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);
 }
 
index 98179bc6cf3d125dd672e224abd492db46524ec1..61d583c0ceba649c5999cf33c25a44f6a5661a82 100644 (file)
@@ -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;