Fossil SCM

When building with tcl8.7 or higher, eliminate the call to Tcl_MakeSafe(), which does not exist in those versions (8.7 includes it in their headers but not their lib). Building with tcl8.7+ reveals an unrelated function-type conversion error caused (apparently) by changes in tcl8.7+, and that's still unresolved.

stephan 2024-10-14 19:00 trunk
Commit 2d5a23e919dff2f689307f7b656218687f63b1804099d377d1839b0e3abe1817
1 file changed +9
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -731,10 +731,19 @@
731731
Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDIN));
732732
Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDOUT));
733733
Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDERR));
734734
}
735735
Tcl_Preserve((ClientData)tclInterp);
736
+#if ((TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>6) \
737
+ || (TCL_MAJOR_VERSION>8))
738
+ /* TCL 8.7+ removes Tcl_MakeSafe():
739
+ ** https://core.tcl-lang.org/tcl/tktview?name=655300
740
+ ** https://core.tcl-lang.org/tips/doc/trunk/tip/624.md
741
+ ** 8.7 has it in the headers but not in the libs.
742
+ */
743
+# define Tcl_MakeSafe(X) TCL_OK
744
+#endif
736745
if( Tcl_MakeSafe(tclInterp)!=TCL_OK ){
737746
int nResult;
738747
const char *zResult = getTclResult(tclInterp, &nResult);
739748
Th_ErrorMessage(interp,
740749
"could not make Tcl interpreter 'safe':", zResult, nResult);
741750
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -731,10 +731,19 @@
731 Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDIN));
732 Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDOUT));
733 Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDERR));
734 }
735 Tcl_Preserve((ClientData)tclInterp);
 
 
 
 
 
 
 
 
 
736 if( Tcl_MakeSafe(tclInterp)!=TCL_OK ){
737 int nResult;
738 const char *zResult = getTclResult(tclInterp, &nResult);
739 Th_ErrorMessage(interp,
740 "could not make Tcl interpreter 'safe':", zResult, nResult);
741
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -731,10 +731,19 @@
731 Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDIN));
732 Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDOUT));
733 Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDERR));
734 }
735 Tcl_Preserve((ClientData)tclInterp);
736 #if ((TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>6) \
737 || (TCL_MAJOR_VERSION>8))
738 /* TCL 8.7+ removes Tcl_MakeSafe():
739 ** https://core.tcl-lang.org/tcl/tktview?name=655300
740 ** https://core.tcl-lang.org/tips/doc/trunk/tip/624.md
741 ** 8.7 has it in the headers but not in the libs.
742 */
743 # define Tcl_MakeSafe(X) TCL_OK
744 #endif
745 if( Tcl_MakeSafe(tclInterp)!=TCL_OK ){
746 int nResult;
747 const char *zResult = getTclResult(tclInterp, &nResult);
748 Th_ErrorMessage(interp,
749 "could not make Tcl interpreter 'safe':", zResult, nResult);
750

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button