summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-29 08:26:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-29 08:26:43 (GMT)
commitbb78c34cf7890dfb09d3b4b98ccff86e68336508 (patch)
tree431b4a1c97b53adce19916e303201807d588b703
parent5fa771e3cdfdbf53b271cace820083ec5458fa8b (diff)
parent44f6a3be3eef72da6da477bb82fe7fb47e1a07e7 (diff)
downloadtcl-bb78c34cf7890dfb09d3b4b98ccff86e68336508.zip
tcl-bb78c34cf7890dfb09d3b4b98ccff86e68336508.tar.gz
tcl-bb78c34cf7890dfb09d3b4b98ccff86e68336508.tar.bz2
Merge 8.6
-rw-r--r--generic/tclEvent.c3
-rw-r--r--generic/tclPanic.c5
-rw-r--r--generic/tclThread.c4
-rw-r--r--unix/tclUnixPort.h4
-rw-r--r--win/tclWinError.c8
-rw-r--r--win/tclWinFile.c9
-rw-r--r--win/tclWinPort.h4
7 files changed, 27 insertions, 10 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index e7c09ca..e832422 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1023,8 +1023,7 @@ Tcl_Exit(
}
}
- TclpExit(status);
- Tcl_Panic("OS exit failed!");
+ exit(status);
}
/*
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index e379d95..1887e0f 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -15,7 +15,7 @@
#include "tclInt.h"
#if defined(_WIN32) || defined(__CYGWIN__)
- MODULE_SCOPE void tclWinDebugPanic(const char *format, ...);
+ MODULE_SCOPE TCL_NORETURN void tclWinDebugPanic(const char *format, ...);
#endif
/*
@@ -52,7 +52,7 @@ Tcl_SetPanicProc(
{
#if defined(_WIN32)
/* tclWinDebugPanic only installs if there is no panicProc yet. */
- if (((Tcl_PanicProc *)proc != tclWinDebugPanic) || (panicProc == NULL))
+ if ((proc != tclWinDebugPanic) || (panicProc == NULL))
#elif defined(__CYGWIN__)
if (proc == NULL)
panicProc = tclWinDebugPanic;
@@ -158,7 +158,6 @@ Tcl_Panic(
va_start(argList, format);
Tcl_PanicVA(format, argList);
- va_end (argList);
}
/*
diff --git a/generic/tclThread.c b/generic/tclThread.c
index 233e380..391711e 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -462,7 +462,11 @@ Tcl_ExitThread(
int status)
{
Tcl_FinalizeThread();
+#if TCL_THREADS
TclpThreadExit(status);
+#else
+ exit(status);
+#endif
}
#if !TCL_THREADS
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index f9fd702..29506de 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -665,7 +665,9 @@ typedef int socklen_t;
*---------------------------------------------------------------------------
*/
-#define TclpExit exit
+#ifndef TCL_NO_DEPRECATED
+# define TclpExit exit
+#endif
#if !defined(TCL_THREADS) || TCL_THREADS
# include <pthread.h>
diff --git a/win/tclWinError.c b/win/tclWinError.c
index 4e8ae7e..ab3d449 100644
--- a/win/tclWinError.c
+++ b/win/tclWinError.c
@@ -381,7 +381,7 @@ Tcl_WinConvertError(
*----------------------------------------------------------------------
*/
-void
+MODULE_SCOPE TCL_NORETURN void
tclWinDebugPanic(
const char *format, ...)
{
@@ -413,6 +413,12 @@ tclWinDebugPanic(
fprintf(stderr, "\n");
fflush(stderr);
}
+# if defined(__GNUC__)
+ __builtin_trap();
+# else
+ DebugBreak();
+# endif
+ abort();
}
#endif
/*
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index a808562..56ffca4 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -177,7 +177,6 @@ static int WinLink(const WCHAR *LinkSource,
const WCHAR *LinkTarget, int linkAction);
static int WinSymLinkDirectory(const WCHAR *LinkDirectory,
const WCHAR *LinkTarget);
-MODULE_SCOPE void tclWinDebugPanic(const char *format, ...);
/*
*--------------------------------------------------------------------
@@ -808,7 +807,7 @@ NativeWriteReparse(
*----------------------------------------------------------------------
*/
-void
+MODULE_SCOPE TCL_NORETURN void
tclWinDebugPanic(
const char *format, ...)
{
@@ -838,6 +837,12 @@ tclWinDebugPanic(
MessageBoxW(NULL, msgString, L"Fatal Error",
MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
}
+# if defined(__GNUC__)
+ __builtin_trap();
+# else
+ DebugBreak();
+# endif
+ abort();
}
/*
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 09a0ee5..ccb2acc 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -537,7 +537,9 @@ typedef DWORD_PTR * PDWORD_PTR;
* functions.
*/
-#define TclpExit exit
+#ifndef TCL_NO_DEPRECATED
+# define TclpExit exit
+#endif
#ifndef INVALID_SET_FILE_POINTER
#define INVALID_SET_FILE_POINTER 0xFFFFFFFF