* cygcheck.cc (cygwin_dll_path): New global variable.
(load_cygwin): Fetch cygwin DLL path and store in cygwin_dll_path. * strace.cc: Full ditto. * path.cc (read_mounts): First use the path stored in cygwin_dll_path, if available. Then fall back to fetching own path. Add comment. Drop printing warnings since they look funny in strace output.
This commit is contained in:
@@ -264,6 +264,7 @@ ctrl_c (DWORD)
|
||||
|
||||
extern "C" {
|
||||
unsigned long (*cygwin_internal) (int, ...);
|
||||
WCHAR cygwin_dll_path[32768];
|
||||
};
|
||||
|
||||
static int
|
||||
@@ -282,6 +283,7 @@ load_cygwin ()
|
||||
errno = ENOENT;
|
||||
return 0;
|
||||
}
|
||||
GetModuleFileNameW (h, cygwin_dll_path, 32768);
|
||||
if (!(cygwin_internal = (DWORD (*) (int, ...)) GetProcAddress (h, "cygwin_internal")))
|
||||
{
|
||||
errno = ENOSYS;
|
||||
|
Reference in New Issue
Block a user