* cygheap.cc (cygheap_fixup_in_child): Drop call to set_dll_dir.
(init_cygheap::init_installation_root): Set installation_dir_len. (setup_cygheap): Drop call to set_dll_dir. * cygheap.h (struct init_cygheap): Add installation_dir_len member. (init_cygheap::set_dll_dir): Remove. * environ.cc (win_env::add_cache): Use stpcpy for speed. (posify_maybe): Use tmp_pathbuf buffer instead of stack. (raise_envblock): New function to resize Windows environment block. (build_env): Fix indentation. Call raise_envblock function. Check if $PATH exists and is non-empty. If not, add PATH variable with Cygwin installation directory as content to Windows environment. Explain why. * uinfo.cc (cygheap_pwdgrp::_nss_init): Fill UNICODE_STRING members on the fly. Drop call to RtlInitUnicodeString. (pwdgrp::check_file): Ditto.
This commit is contained in:
@@ -506,6 +506,7 @@ struct init_cygheap: public mini_cygheap
|
||||
char *buckets[NBUCKETS];
|
||||
WCHAR installation_root[PATH_MAX];
|
||||
WCHAR installation_dir[PATH_MAX];
|
||||
size_t installation_dir_len;
|
||||
UNICODE_STRING installation_key;
|
||||
WCHAR installation_key_buf[18];
|
||||
cygheap_root root;
|
||||
@@ -534,15 +535,6 @@ struct init_cygheap: public mini_cygheap
|
||||
hook_chain hooks;
|
||||
void close_ctty ();
|
||||
void init_installation_root ();
|
||||
void set_dll_dir ()
|
||||
{
|
||||
/* Call SetDllDirectory on installation_dir. This removes "." from the
|
||||
DLL search path and installs our /bin dir instead.
|
||||
Amazing but true: This setting is propagated to child processes :-)
|
||||
but only starting with Windows 8 :-( */
|
||||
if (!SetDllDirectoryW (installation_dir))
|
||||
debug_printf ("SetDllDirectoryW (%W), %E", installation_dir);
|
||||
}
|
||||
void __reg1 init_tls_list ();;
|
||||
void __reg2 add_tls (_cygtls *);
|
||||
void __reg3 remove_tls (_cygtls *, DWORD);
|
||||
|
Reference in New Issue
Block a user