Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-03-01 03:19:23 +0300
committerChristopher Faylor <me@cgf.cx>2011-03-01 03:19:23 +0300
commitba5f92981d9071c79838017587085a1c0cbce7b3 (patch)
tree6ccd717e8a3a310a76a81d055c1f492bc91c7d14 /winsup
parent8ceb4854b6d0382aabd9a31daf1896be84fb9004 (diff)
* 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.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/autoload.cc3
-rw-r--r--winsup/cygwin/wincap.cc9
-rw-r--r--winsup/cygwin/wincap.h2
4 files changed, 20 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a80a7419b..2fade6ae0 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
+ * 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.
+
+2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
+
* autoload.cc (dll_load): Make inline. Clarify logic.
2011-02-27 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index e3c719176..8b20fea2b 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -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;
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index fe8a05173..89d032367 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -61,6 +61,7 @@ wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
+ use_dont_resolve_hack:false,
};
wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -101,6 +102,7 @@ wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
+ use_dont_resolve_hack:false,
};
wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -141,6 +143,7 @@ wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
+ use_dont_resolve_hack:false,
};
wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -181,6 +184,7 @@ wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
+ use_dont_resolve_hack:true,
};
wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -221,6 +225,7 @@ wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
+ use_dont_resolve_hack:true,
};
wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -261,6 +266,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
+ use_dont_resolve_hack:true,
};
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -301,6 +307,7 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:false,
has_fast_cwd:false,
has_restricted_raw_disk_access:false,
+ use_dont_resolve_hack:false,
};
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -341,6 +348,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:true,
has_fast_cwd:true,
has_restricted_raw_disk_access:true,
+ use_dont_resolve_hack:false,
};
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -381,6 +389,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_buggy_thread_startup:false,
has_fast_cwd:true,
has_restricted_raw_disk_access:true,
+ use_dont_resolve_hack:false,
};
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index 288146873..f1eb7a6ec 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -51,6 +51,7 @@ struct wincaps
unsigned has_buggy_thread_startup : 1;
unsigned has_fast_cwd : 1;
unsigned has_restricted_raw_disk_access : 1;
+ unsigned use_dont_resolve_hack : 1;
};
class wincapc
@@ -107,6 +108,7 @@ public:
bool IMPLEMENT (has_buggy_thread_startup)
bool IMPLEMENT (has_fast_cwd)
bool IMPLEMENT (has_restricted_raw_disk_access)
+ bool IMPLEMENT (use_dont_resolve_hack)
#undef IMPLEMENT
};