#include <windows.h>
#endif
+// Simplify it a little for this file.
+#ifndef _GLIBCXX_CDTOR_CALLABI
+# define _GLIBCXX_CDTOR_CALLABI
+#endif
+
#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT
// Libc provides __cxa_thread_atexit definition.
#elif _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
-extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
+extern "C" int __cxa_thread_atexit_impl (void (_GLIBCXX_CDTOR_CALLABI *func) (void *),
void *arg, void *d);
extern "C" int
-__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
+__cxxabiv1::__cxa_thread_atexit (void (_GLIBCXX_CDTOR_CALLABI *dtor)(void *),
void *obj, void *dso_handle)
_GLIBCXX_NOTHROW
{
// One element in a singly-linked stack of cleanups.
struct elt
{
- void (*destructor)(void *);
+ void (_GLIBCXX_CDTOR_CALLABI *destructor)(void *);
void *object;
elt *next;
#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
}
extern "C" int
-__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_handle*/)
+__cxxabiv1::__cxa_thread_atexit (void (_GLIBCXX_CDTOR_CALLABI *dtor)(void *),
+ void *obj, void */*dso_handle*/)
_GLIBCXX_NOTHROW
{
// Do this initialization once.
// DSO destruction.
int
+#ifdef _GLIBCXX_CDTOR_CALLABI
+ __cxa_atexit(void (_GLIBCXX_CDTOR_CALLABI *)(void*), void*, void*) _GLIBCXX_NOTHROW;
+#else
__cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW;
+#endif
void
__cxa_finalize(void*);
// TLS destruction.
int
+#ifdef _GLIBCXX_CDTOR_CALLABI
+ __cxa_thread_atexit(void (_GLIBCXX_CDTOR_CALLABI *)(void*), void*, void *) _GLIBCXX_NOTHROW;
+#else
__cxa_thread_atexit(void (*)(void*), void*, void *) _GLIBCXX_NOTHROW;
+#endif
// Pure virtual functions.
void