From b5f48aa96165f6f18f4f5c2b337171c626c6b423 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 4 Nov 2009 17:00:45 +0000 Subject: * 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. --- winsup/utils/strace.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/utils/strace.cc') diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index eb3b1a875..f3acec68f 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -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; -- cgit v1.2.3