diff options
Diffstat (limited to 'winsup/cygwin/dll_init.h')
-rw-r--r-- | winsup/cygwin/dll_init.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/dll_init.h index 9a712a3cc..90cfa03e2 100644 --- a/winsup/cygwin/dll_init.h +++ b/winsup/cygwin/dll_init.h @@ -50,10 +50,19 @@ struct dll per_module p; HMODULE handle; int count; + bool has_dtors; dll_type type; WCHAR name[1]; void detach (); int init (); + void run_dtors () + { + if (has_dtors) + { + has_dtors = 0; + p.run_dtors (); + } + } }; #define MAX_DLL_BEFORE_INIT 100 |