mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-03 21:45:51 +08:00
* environ.cc (renv_arr): Drop variables not usually in a Windows
environment and all variables being uppercase anyway. But keep TMP and TEMP for paranoia.
This commit is contained in:
parent
63716e7d42
commit
d63eac1033
@ -1,3 +1,9 @@
|
|||||||
|
2015-01-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* environ.cc (renv_arr): Drop variables not usually in a Windows
|
||||||
|
environment and all variables being uppercase anyway. But keep
|
||||||
|
TMP and TEMP for paranoia.
|
||||||
|
|
||||||
2015-01-14 Corinna Vinschen <corinna@vinschen.de>
|
2015-01-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* environ.cc (build_env): When merging the user's Windows environment,
|
* environ.cc (build_env): When merging the user's Windows environment,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
process's environment.
|
process's environment.
|
||||||
|
|
||||||
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||||
2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
|
2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
|
||||||
|
|
||||||
This software is a copyrighted work licensed under the terms of the
|
This software is a copyrighted work licensed under the terms of the
|
||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
@ -736,37 +736,23 @@ static struct renv {
|
|||||||
const char *name;
|
const char *name;
|
||||||
const size_t namelen;
|
const size_t namelen;
|
||||||
} renv_arr[] = {
|
} renv_arr[] = {
|
||||||
{ NL("ALLUSERSPROFILE=") }, // 0
|
{ NL("COMMONPROGRAMFILES=") }, // 0
|
||||||
{ NL("COMMONPROGRAMFILES=") }, // 1
|
|
||||||
{ NL("COMPUTERNAME=") },
|
|
||||||
{ NL("COMSPEC=") },
|
{ NL("COMSPEC=") },
|
||||||
{ NL("HOME=") }, // 4
|
{ NL("PATH=") }, // 2
|
||||||
{ NL("HOMEDRIVE=") },
|
|
||||||
{ NL("HOMEPATH=") },
|
|
||||||
{ NL("NUMBER_OF_PROCESSORS=") }, // 7
|
|
||||||
{ NL("OS=") }, // 8
|
|
||||||
{ NL("PATH=") }, // 9
|
|
||||||
{ NL("PATHEXT=") },
|
|
||||||
{ NL("PROCESSOR_ARCHITECTURE=") },
|
|
||||||
{ NL("PROCESSOR_IDENTIFIER=") },
|
|
||||||
{ NL("PROCESSOR_LEVEL=") },
|
|
||||||
{ NL("PROCESSOR_REVISION=") },
|
|
||||||
{ NL("PROGRAMFILES=") },
|
{ NL("PROGRAMFILES=") },
|
||||||
{ NL("SYSTEMDRIVE=") }, // 16
|
{ NL("SYSTEMDRIVE=") }, // 4
|
||||||
{ NL("SYSTEMROOT=") },
|
{ NL("SYSTEMROOT=") },
|
||||||
{ NL("TEMP=") }, // 18
|
{ NL("TEMP=") }, // 6
|
||||||
{ NL("TERM=") },
|
|
||||||
{ NL("TMP=") },
|
{ NL("TMP=") },
|
||||||
{ NL("TMPDIR=") },
|
{ NL("WINDIR=") } // 8
|
||||||
{ NL("WINDIR=") } // 22
|
|
||||||
};
|
};
|
||||||
#define RENV_SIZE (sizeof (renv_arr) / sizeof (renv_arr[0]))
|
#define RENV_SIZE (sizeof (renv_arr) / sizeof (renv_arr[0]))
|
||||||
|
|
||||||
/* Set of first characters of the above list of variables. */
|
/* Set of first characters of the above list of variables. */
|
||||||
static const char idx_arr[] = "ACHNOPSTW";
|
static const char idx_arr[] = "CPSTW";
|
||||||
/* Index into renv_arr at which the variables with this specific character
|
/* Index into renv_arr at which the variables with this specific character
|
||||||
starts. */
|
starts. */
|
||||||
static const int start_at[] = { 0, 1, 4, 7, 8, 9, 16, 18, 22 };
|
static const int start_at[] = { 0, 2, 4, 6, 8 };
|
||||||
|
|
||||||
/* Turn environment variable part of a=b string into uppercase - for some
|
/* Turn environment variable part of a=b string into uppercase - for some
|
||||||
environment variables only. */
|
environment variables only. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user