summaryrefslogtreecommitdiffstats
path: root/generic/tclPanic.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-04-21 09:07:00 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-04-21 09:07:00 (GMT)
commit7fe49bb7164153f93609697d3501cf9277b87a5c (patch)
tree03cddd21c52bcb77b2be2f53cc1f659ff76fe941 /generic/tclPanic.c
parent861a3771f91a7c67ef0cf2947ba0c5390febb62f (diff)
parentbcd88b005a09280f4b9725d611fd3763fd07241f (diff)
downloadtcl-7fe49bb7164153f93609697d3501cf9277b87a5c.zip
tcl-7fe49bb7164153f93609697d3501cf9277b87a5c.tar.gz
tcl-7fe49bb7164153f93609697d3501cf9277b87a5c.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclPanic.c')
-rw-r--r--generic/tclPanic.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index 2cb8aff..84a9136 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -14,7 +14,7 @@
*/
#include "tclInt.h"
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
MODULE_SCOPE void tclWinDebugPanic(const char *format, ...);
#endif
@@ -23,7 +23,11 @@
* procedure.
*/
+#if defined(__CYGWIN__)
+static Tcl_PanicProc *panicProc = tclWinDebugPanic;
+#else
static Tcl_PanicProc *panicProc = NULL;
+#endif
/*
*----------------------------------------------------------------------
@@ -45,7 +49,7 @@ void
Tcl_SetPanicProc(
Tcl_PanicProc *proc)
{
-#ifdef _WIN32
+#if defined(_WIN32)
/* tclWinDebugPanic only installs if there is no panicProc yet. */
if ((proc != tclWinDebugPanic) || (panicProc == NULL))
#endif
@@ -100,7 +104,7 @@ Tcl_PanicVA(
fflush(stderr);
}
/* In case the users panic proc does not abort, we do it here */
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
# if defined(__GNUC__)
__builtin_trap();
# elif defined(_WIN64)
@@ -110,6 +114,8 @@ Tcl_PanicVA(
# else
DebugBreak();
# endif
+#endif
+#if defined(_WIN32)
ExitProcess(1);
#else
abort();