summaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/os
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-19 15:25:12 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-19 15:25:12 +0000
commit39a4a453059d2f49fab18e9b2a788789ecd4f2e0 (patch)
tree4ebc6dcde228f02fbdfffc3c62c33700b0653771 /libstdc++-v3/config/os
parent1db4f54b5b0d78f8de678c099c6bd117ff95d82f (diff)
downloadgcc-39a4a453059d2f49fab18e9b2a788789ecd4f2e0.tar.gz
2014-08-19 Yaakov Selkowitz <yselkowi@redhat.com>
Kai Tietz <ktietz@redhat.com> * config/os/mingw32-w64/os_defines.h (_GLIBCXX_THREAD_ATEXIT_WIN32): Define. * config/os/newlib/os_defines.h (_GLIBCXX_THREAD_ATEXIT_WIN32): Ditto. * libsupc++/atexit_thread.cc [_GLIBCXX_THREAD_ATEXIT_WIN32]: #include <windows.h>. (struct elt): Add dll member. (run): Decrement dll refcount. (__cxxabiv1::__cxa_thread_atexit): Increment dll refcount. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config/os')
-rw-r--r--libstdc++-v3/config/os/mingw32-w64/os_defines.h5
-rw-r--r--libstdc++-v3/config/os/newlib/os_defines.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
index c736f6c04bf..5e7aec8e458 100644
--- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h
+++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
@@ -78,4 +78,9 @@
#define _GLIBCXX_LLP64 1
#endif
+// 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
diff --git a/libstdc++-v3/config/os/newlib/os_defines.h b/libstdc++-v3/config/os/newlib/os_defines.h
index 92748dad635..2e01d3bdf7d 100644
--- a/libstdc++-v3/config/os/newlib/os_defines.h
+++ b/libstdc++-v3/config/os/newlib/os_defines.h
@@ -47,6 +47,12 @@
// See libstdc++/20806.
#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 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
#endif