diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-11-04 17:00:45 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-11-04 17:00:45 +0000 |
commit | b5f48aa96165f6f18f4f5c2b337171c626c6b423 (patch) | |
tree | 15260f52949ccf73e45c16c034540b9123cff86f /winsup/utils/strace.cc | |
parent | 44a019897fde5a5fbbd2a36c8a6c99066ec18d42 (diff) | |
download | newlib-b5f48aa96165f6f18f4f5c2b337171c626c6b423.zip newlib-b5f48aa96165f6f18f4f5c2b337171c626c6b423.tar.gz newlib-b5f48aa96165f6f18f4f5c2b337171c626c6b423.tar.bz2 |
* 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.
Diffstat (limited to 'winsup/utils/strace.cc')
-rw-r--r-- | winsup/utils/strace.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index eb3b1a8..f3acec6 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; |