diff options
author | Christopher Faylor <me@cgf.cx> | 2005-04-30 17:07:05 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-04-30 17:07:05 +0000 |
commit | f0b14f146e02256b3f99d997194e9cdbba85acb5 (patch) | |
tree | 11a2311f660fb61b54476ece73202233bfd7c3c7 /winsup/cygwin/environ.cc | |
parent | 06e0dc9a4672966742410aae4967f3c7bfa5188c (diff) | |
download | newlib-f0b14f146e02256b3f99d997194e9cdbba85acb5.zip newlib-f0b14f146e02256b3f99d997194e9cdbba85acb5.tar.gz newlib-f0b14f146e02256b3f99d997194e9cdbba85acb5.tar.bz2 |
* environ.cc (spenv::force_into_environment): Rename from add_always.
(spenv::add_if_exists): Rename from force.
(build_env): Accommodate name changes. Make sure that stuff that is always
supposed to be in the environment is actually added to the environment.
* shared.cc (open_shared): Restore VirtualFree eliminated by 2005-04-28 change.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r-- | winsup/cygwin/environ.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 75c1a81..51ed344 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -1,7 +1,7 @@ /* environ.cc: Cygwin-adopted functions from newlib to manipulate process's environment. - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -854,8 +854,8 @@ struct spenv { const char *name; size_t namelen; - bool add_always; /* If true, always add to env if missing */ - bool force; /* if true, retrieve value from cache */ + bool force_into_environmentironment; /* If true, always add to env if missing */ + bool add_if_exists; /* if true, retrieve value from cache */ const char * (cygheap_user::*from_cygheap) (const char *, size_t); char *retrieve (bool, const char * const = NULL) @@ -953,7 +953,7 @@ build_env (const char * const *envp, char *&envblock, int &envc, saw_spenv[i] = 1; if (*dstp == env_dontadd) goto next1; - if (spenvs[i].force) + if (spenvs[i].add_if_exists) calc_tl = true; goto next0; } @@ -975,10 +975,10 @@ build_env (const char * const *envp, char *&envblock, int &envc, assert ((srcp - envp) == n); /* Fill in any required-but-missing environment variables. */ for (unsigned i = 0; i < SPENVS_SIZE; i++) - if (!saw_spenv[i] && (spenvs[i].add_always || cygheap->user.issetuid ())) + if (!saw_spenv[i] && (spenvs[i].force_into_environmentironment || cygheap->user.issetuid ())) { - *dstp = spenvs[i].retrieve (no_envblock); - if (*dstp && (!no_envblock || spenvs[i].force) && *dstp != env_dontadd) + *dstp = spenvs[i].retrieve (false); + if (*dstp && *dstp != env_dontadd) { *pass_dstp++ = *dstp; tl += strlen (*dstp) + 1; |