* cxx.cc (default_cygwin_cxx_malloc): Enhance commenting.
* dll_init.cc (dll_dllcrt0_1): Likewise. * dlfcn.cc (dlopen): Prevent dlopen()'d DLL from installing any cxx malloc overrides. * include/cygwin/cygwin_dll.h (__dynamically_loaded): New variable. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Check it and only install cxx malloc overrides when statically loaded. Extend comments.
This commit is contained in:
@ -33,6 +33,7 @@ CDECL_END \
|
||||
static HINSTANCE storedHandle; \
|
||||
static DWORD storedReason; \
|
||||
static void* storedPtr; \
|
||||
int __dynamically_loaded; \
|
||||
\
|
||||
static int __dllMain (int a, char **b, char **c) \
|
||||
{ \
|
||||
@ -53,6 +54,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
|
||||
storedHandle = h; \
|
||||
storedReason = reason; \
|
||||
storedPtr = ptr; \
|
||||
__dynamically_loaded = (ptr == NULL); \
|
||||
dll_index = cygwin_attach_dll (h, &__dllMain); \
|
||||
if (dll_index == (DWORD) -1) \
|
||||
ret = 0; \
|
||||
|
Reference in New Issue
Block a user