* autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack on

systems which need it.
* wincap.cc (use_dont_resolve_hack): Set as appropriate.
* wincap.h (use_dont_resolve_hack): Define.
This commit is contained in:
Christopher Faylor
2011-03-01 00:19:23 +00:00
parent 8ceb4854b6
commit ba5f92981d
4 changed files with 20 additions and 1 deletions

View File

@ -216,7 +216,8 @@ static __inline bool
dll_load (HANDLE& handle, WCHAR *name)
{
HANDLE h = LoadLibraryW (name);
if (!h && in_forkee && handle && GetLastError () == ERROR_INVALID_ADDRESS)
if (!h && in_forkee && handle && GetLastError () == ERROR_INVALID_ADDRESS
&& wincap.use_dont_resolve_hack ())
h = LoadLibraryExW (name, NULL, DONT_RESOLVE_DLL_REFERENCES);
if (!h)
return false;