summaryrefslogtreecommitdiff
path: root/ptw32_callUserDestroyRoutines.c
diff options
context:
space:
mode:
Diffstat (limited to 'ptw32_callUserDestroyRoutines.c')
-rw-r--r--ptw32_callUserDestroyRoutines.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c
index 8873f87..f290f7b 100644
--- a/ptw32_callUserDestroyRoutines.c
+++ b/ptw32_callUserDestroyRoutines.c
@@ -38,10 +38,20 @@
#include "pthread.h"
#include "implement.h"
-#ifdef __cplusplus
-# if ! defined (_MSC_VER) && ! (defined(__GNUC__) && __GNUC__ < 3) && ! defined(__WATCOMC__)
-using
- std::terminate;
+#if defined(__CLEANUP_CXX)
+# if defined(_MSC_VER)
+# include <eh.h>
+# elif defined(__WATCOMC__)
+# include <eh.h>
+# include <exceptio.h>
+# else
+# if defined(__GNUC__) && __GNUC__ < 3
+# include <new.h>
+# else
+# include <new>
+ using
+ std::terminate;
+# endif
# endif
#endif
@@ -172,7 +182,7 @@ ptw32_callUserDestroyRoutines (pthread_t thread)
assocsRemaining++;
-#ifdef __cplusplus
+#if defined(__cplusplus)
try
{