summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-12-20 10:28:47 (GMT)
committernijtmans <nijtmans>2010-12-20 10:28:47 (GMT)
commitf4896c75acae1daf0de3083f043e2774af381f39 (patch)
treeadd8b93d686ed26ce3a50a4738cca50838e9e9d9 /generic
parent12bacc8dbf73d87fe93142111922f28ff19c322a (diff)
downloadtcl-f4896c75acae1daf0de3083f043e2774af381f39.zip
tcl-f4896c75acae1daf0de3083f043e2774af381f39.tar.gz
tcl-f4896c75acae1daf0de3083f043e2774af381f39.tar.bz2
Explicitely test for intrinsics support in compiler, before assuming only MSVC has it.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclPanic.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index 6ef39e1..ad17360 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -12,12 +12,12 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPanic.c,v 1.18 2010/12/16 08:52:37 nijtmans Exp $
+ * RCS: @(#) $Id: tclPanic.c,v 1.19 2010/12/20 10:28:48 nijtmans Exp $
*/
#include "tclInt.h"
#ifdef _WIN32
-# ifdef _MSC_VER
+# ifdef HAVE_INTRIN_H
# include <intrin.h>
# endif
MODULE_SCOPE void tclWinDebugPanic(const char *format, ...);
@@ -106,10 +106,12 @@ Tcl_PanicVA(
}
/* In case the users panic proc does not abort, we do it here */
#ifdef _WIN32
-# ifdef __GNUC__
- __builtin_trap();
-# elif _MSC_VER
+# ifdef HAVE_INTRIN_H
__debugbreak();
+# elif defined(__GNUC__)
+ __builtin_trap();
+# else
+ DebugBreak();
# endif
ExitProcess(1);
#else