diff options
author | Christopher Faylor <me@cgf.cx> | 2005-03-30 15:54:28 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-03-30 15:54:28 +0000 |
commit | 47dc3dec0ab30187d3502e0c66ed78396aa14672 (patch) | |
tree | 427565aef23cdecea2db8f37b794880e34c8c79b /winsup/cygwin/environ.h | |
parent | f3fd76d41826effa0f94202be1811a52a9547b56 (diff) | |
download | newlib-47dc3dec0ab30187d3502e0c66ed78396aa14672.zip newlib-47dc3dec0ab30187d3502e0c66ed78396aa14672.tar.gz newlib-47dc3dec0ab30187d3502e0c66ed78396aa14672.tar.bz2 |
* environ.h (win_env::immediate): Declare new field.
(win_env::operator = ): Declare new operator.
(win_env::reset): Declare new function.
(win_env::~win_env): Declare new destructor.
(getwinenv): Add optional third argument to declaration.
* environ.cc (conv_envvars): Accommodate immediate field.
(win_env::operator =): Define new operator.
(win_env::~win_env): Define new destructor.
(win_env::add_cache): Add value to environment immediately if "immediate" is
set.
(getwinenv): Accept optional third argument which will be used to store
"cached" values to avoid overwriting real cache.
(spenv::force): Declare new field.
(spenvs): Accommodate force field. Add "PATH=" with force set to true.
(spenv::retrieve): Avoid duping anything if we're not building an envblock.
(build_env): Ditto. Use size of potentially constructed new environment block
to determine if we need to create an environment block. Pass getwinenv
temporary storage to avoid inappropriately overwriting the environment cache.
Diffstat (limited to 'winsup/cygwin/environ.h')
-rw-r--r-- | winsup/cygwin/environ.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h index f6a1797..b953148 100644 --- a/winsup/cygwin/environ.h +++ b/winsup/cygwin/environ.h @@ -27,13 +27,17 @@ struct win_env int (*towin32) (const char *, char *); int (*posix_len) (const char *); int (*win32_len) (const char *); + bool immediate; void add_cache (const char *in_posix, const char *in_native = NULL) __attribute__ ((regparm (3))); const char * get_native () const {return native ? native + namelen : NULL;} const char * get_posix () const {return posix ? posix : NULL;} + struct win_env& operator = (struct win_env& x); + void reset () {native = posix = NULL;} + ~win_env (); }; -win_env * __stdcall getwinenv (const char *name, const char *posix = NULL) +win_env * __stdcall getwinenv (const char *name, const char *posix = NULL, win_env * = NULL) __attribute__ ((regparm (3))); char * __stdcall getwinenveq (const char *name, size_t len, int) __attribute__ ((regparm (3))); |