From c1d40554910707ad87f9bcef43b537b5d6ca2f78 Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10walls@gmail.com> Date: Fri, 31 Oct 2014 06:46:02 +0800 Subject: [PATCH 18/21] prevent modules from being unloaded before their dtors are called --- libstdc++-v3/config/os/mingw32-w64/os_defines.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h index 976355c..b1d048d 100644 --- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h +++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h @@ -86,4 +86,9 @@ // See libstdc++/59807 #define _GTHREAD_USE_MUTEX_INIT_FUNC 1 +// Enable use of GetModuleHandleEx (requires Windows XP/2003) in +// __cxa_thread_atexit to prevent modules from being unloaded before +// their dtors are called +#define _GLIBCXX_THREAD_ATEXIT_WIN32 1 + #endif -- 2.4.5