From 7a3190f081175cc5cb5fda60ce20a06c75ffd28d Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 1 Mar 2011 22:36:19 +0000 Subject: [PATCH] * autoload.cc (dll_load): Avoid in_forkee test since this apparently fails even when not forked. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/autoload.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e171c4fcf..cc702cc6c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-03-01 Christopher Faylor + + * autoload.cc (dll_load): Avoid in_forkee test since this apparently + fails even when not forked. + 2011-03-01 Christopher Faylor * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9. diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index 8b20fea2b..f959edd6b 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -216,8 +216,8 @@ static __inline bool dll_load (HANDLE& handle, WCHAR *name) { HANDLE h = LoadLibraryW (name); - if (!h && in_forkee && handle && GetLastError () == ERROR_INVALID_ADDRESS - && wincap.use_dont_resolve_hack ()) + if (!h && handle && wincap.use_dont_resolve_hack () + && GetLastError () == ERROR_INVALID_ADDRESS) h = LoadLibraryExW (name, NULL, DONT_RESOLVE_DLL_REFERENCES); if (!h) return false;