Overview
| Artifact ID: | f9e67f85fe1e32324d247487ee583f32aadce544baad83d80a8a6bda85145dad |
|---|---|
| Ticket: | ef23a85ac6bab7d4f2cdb1eb1a03d23bb2e5b289
Tcl_PanicProc - Tcl9 & NaviServer |
| User & Date: | mookie on 2024-04-22 23:57:35 |
Changes
- comment changed to:
Hi Core, In attempt of using NaviServer with TCL9.0x -- a module for the server fails, log.c when compiling against TCL9. OS: FreeBSD 14 TCL: 9.0b2/b3 NaviServer: 4.99 (pre-fix) After reaching out to Gustaf, dev of NaviServer, a hot-patch has been created. His explanation: The issue is that Tcl_PanicProc is defined in Tcl9 with the attribute declaration TCL_NORETURN1, but it seems, this attribute definition has to be provided as well for the prototype. It would be certainly better, if this attribute definition would be part of the type declaration of Tcl_PanicProc in Tcl9. Not very long ago, the same code worked fine, so something has changed in Tcl9. The patch below addresses this issue, but this is not nice. Maybe, the tcl-core people have a suggestion, since this will effect as well other applications requiring the use of Tcl_SetPanicProc(). Example Compilation error: > log.c:262:22: error: incompatible function pointer types passing 'Tcl_PanicProc' (aka 'void (const char *, ...)') to parameter of type 'void (*)(const char *, ...) __attribute__((noreturn))' [-Wincompatible-function-pointer-types] Tcl_SetPanicProc(Panic); ^~~~~ /usr/local/include/tcl.h:2366:37: note: passing argument to parameter 'panicProc' here TCL_NORETURN1 Tcl_PanicProc *panicProc); NaviServer Issue: https://sourceforge.net/p/naviserver/mailman/message/58763387/ Source to patched log.c: https://github.com/naviserver-project/naviserver/commit/c96c143ac2c7a88b99f8c32e7d140019fe5e7629 Many Thanks, David F - login: "mookie"
- mimetype: "text/plain"