* 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:
Corinna Vinschen
2009-11-04 17:00:45 +00:00
parent 44a019897f
commit b5f48aa961
4 changed files with 28 additions and 15 deletions

View File

@@ -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;