summaryrefslogtreecommitdiffstats
path: root/generic/tclPanic.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-02 09:45:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-02 09:45:33 (GMT)
commit4616d563cc45f6587cd89ceafe025fb0a7c3f5d3 (patch)
treebaa804a74e866af1714879cd34feea75a7700cda /generic/tclPanic.c
parent00ecea59b1312bc698ecae83fe7ba38e9641d6be (diff)
parentfc2795b65712079b300f7e819aeb48aca040dfbf (diff)
downloadtcl-4616d563cc45f6587cd89ceafe025fb0a7c3f5d3.zip
tcl-4616d563cc45f6587cd89ceafe025fb0a7c3f5d3.tar.gz
tcl-4616d563cc45f6587cd89ceafe025fb0a7c3f5d3.tar.bz2
[Bug 3508771] load tclreg.dll in cygwin tclsh
Implement TclWinGetTclInstance, TclpGetTZName, and various others for Cygwin
Diffstat (limited to 'generic/tclPanic.c')
-rw-r--r--generic/tclPanic.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index 2cb8aff..7df3cb3 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)