summaryrefslogtreecommitdiff
path: root/tests/cancel2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cancel2.c')
-rw-r--r--tests/cancel2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/cancel2.c b/tests/cancel2.c
index 44d1b77..b09eab9 100644
--- a/tests/cancel2.c
+++ b/tests/cancel2.c
@@ -88,7 +88,7 @@ mythread(void * arg)
break;
}
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && !defined(__cplusplus)
__try
#else
try
@@ -104,11 +104,15 @@ mythread(void * arg)
pthread_testcancel();
}
}
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && !defined(__cplusplus)
__except(EXCEPTION_EXECUTE_HANDLER)
#else
+#if defined(PtW32CatchAll)
+ PtW32CatchAll
+#else
catch(...)
#endif
+#endif
{
/*
* Should not get into here.