diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-10-14 23:14:33 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-10-14 23:14:33 +0400 |
commit | 1dd75c50d5727dcd9330377053dfe673d617fead (patch) | |
tree | c6f6d2d649730df4393715f7c5cec0761e40008e /winsup/cygwin/cygheap.h | |
parent | 2599a694a6c3b74a9c6424e933d964a4fee06309 (diff) |
* cygheap.cc (init_cygheap::init_installation_root): Install Cygwin's
installation dir as DLL search path, instead of ".".
* cygheap.h (class cwdstuff): Add parameter names in function
declarations for readability.
(cwdstuff::get): Ad inline implementation fetching the CWD as wide char
string.
* dlfcn.cc (dlopen): Add searching for dependent DLLs in DLL
installation dir or CWD, if all else failed.
Add comment to explain scenarios this is accommodating.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r-- | winsup/cygwin/cygheap.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index b08569d13..c2f60e94d 100644 --- a/winsup/cygwin/cygheap.h +++ b/winsup/cygwin/cygheap.h @@ -308,14 +308,23 @@ private: available in shared memory avoids to test for the version every time around. Default to new version. */ fcwd_version_t fast_cwd_version; - void override_win32_cwd (bool, ULONG); + void override_win32_cwd (bool init, ULONG old_dismount_count); public: UNICODE_STRING win32; static muto cwd_lock; const char *get_posix () const { return posix; }; - void reset_posix (wchar_t *); - char *get (char *, int = 1, int = 0, unsigned = NT_MAX_PATH); + void reset_posix (wchar_t *w_cwd); + char *get (char *buf, int need_posix = 1, int with_chroot = 0, + unsigned ulen = NT_MAX_PATH); + PWCHAR get (PWCHAR buf, unsigned buflen = NT_MAX_PATH) + { + cwd_lock.acquire (); + buf[0] = L'\0'; + wcsncat (buf, win32.Buffer, buflen - 1); + cwd_lock.release (); + return buf; + } HANDLE get_handle () { return dir; } DWORD get_drive (char * dst) { |