diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-14 19:07:36 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-14 19:07:36 +0000 |
commit | e5aa298da5598c651d500fd097ed8ff417458641 (patch) | |
tree | 49f4eb15dc154a99dc9106c70e67123f04b35432 /winsup/cygwin/environ.cc | |
parent | 3b731dc0e18a975b6627b0a821b68ceb41ec86ab (diff) | |
download | cygnal-e5aa298da5598c651d500fd097ed8ff417458641.tar.gz cygnal-e5aa298da5598c651d500fd097ed8ff417458641.tar.bz2 cygnal-e5aa298da5598c651d500fd097ed8ff417458641.zip |
* dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
(dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
uinfo_init...
(dll_crt0_0): ...to here.
(_dll_crt0): Call update_envptrs here after setting main_environ.
* environ.cc (environ_init): Eliminate initted variable. Don't call
update_envptrs here.
* sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to avoid a
dereference.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r-- | winsup/cygwin/environ.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 23d0993a7..28bfe3959 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -729,16 +729,12 @@ environ_init (char **envp, int envc) if (efault.faulted ()) api_fatal ("internal error reading the windows environment - too many environment variables?"); - static int initted; - if (!initted) - { - for (int i = 0; conv_envvars[i].name != NULL; i++) - { - conv_start_chars[(int) cyg_tolower (conv_envvars[i].name[0])] = 1; - conv_start_chars[(int) cyg_toupper (conv_envvars[i].name[0])] = 1; - } - initted = 1; - } + if (!conv_start_chars[0]) + for (int i = 0; conv_envvars[i].name != NULL; i++) + { + conv_start_chars[(int) cyg_tolower (conv_envvars[i].name[0])] = 1; + conv_start_chars[(int) cyg_toupper (conv_envvars[i].name[0])] = 1; + } got_something_from_registry = regopt ("default"); if (myself->progname[0]) @@ -814,7 +810,6 @@ environ_init (char **envp, int envc) out: __cygwin_environ = envp; - update_envptrs (); if (envp_passed_in) { p = getenv ("CYGWIN"); |