diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-10-27 14:33:53 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-10-27 14:33:53 +0300 |
commit | f7cb52eec7144ec100874781bc36c301b027e01d (patch) | |
tree | cc581843c0efc4cf815197230ff9bfb51c30f785 /winsup/cygwin/cygheap.cc | |
parent | 41425f2ddae53ac914dbc67cbcb25d5e1940d634 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 8e25a07ea..97090affc 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -83,7 +83,6 @@ cygheap_fixup_in_child (bool execed) _csbrk ((char *) child_proc_info->cygheap_max - (char *) cygheap); child_copy (child_proc_info->parent, false, "cygheap", cygheap, cygheap_max, NULL); cygheap_init (); - cygheap->set_dll_dir (); debug_fixup_after_fork_exec (); if (execed) { @@ -188,9 +187,10 @@ init_cygheap::init_installation_root () "Invalid DLL path"); /* Copy result into installation_dir before stripping off "bin" dir and - revert to Win32 path. This path is used in cygheap_init to call - SetDllDirectory. */ - wcpncpy (installation_dir, installation_root, PATH_MAX); + revert to Win32 path. This path is added to the Windows environment + in buildenv. See there for a description. */ + installation_dir_len = wcpncpy (installation_dir, installation_root, PATH_MAX) + - installation_dir; installation_dir[1] = L'\\'; /* If w < p, the Cygwin DLL resides in the root dir of a drive or network @@ -264,7 +264,6 @@ setup_cygheap () cygheap_init (); cygheap->user.init (); cygheap->init_installation_root (); /* Requires user.init! */ - cygheap->set_dll_dir (); cygheap->pg.init (); } |