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.
Commit
2d5a23e919dff2f689307f7b656218687f63b1804099d377d1839b0e3abe1817
Parent
e8d328cbd320e24…
1 file changed
+9
+9
| --- src/th_tcl.c | ||
| +++ src/th_tcl.c | ||
| @@ -731,10 +731,19 @@ | ||
| 731 | 731 | Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDIN)); |
| 732 | 732 | Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDOUT)); |
| 733 | 733 | Tcl_RegisterChannel(NULL, Tcl_GetStdChannel(TCL_STDERR)); |
| 734 | 734 | } |
| 735 | 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 | |
| 736 | 745 | if( Tcl_MakeSafe(tclInterp)!=TCL_OK ){ |
| 737 | 746 | int nResult; |
| 738 | 747 | const char *zResult = getTclResult(tclInterp, &nResult); |
| 739 | 748 | Th_ErrorMessage(interp, |
| 740 | 749 | "could not make Tcl interpreter 'safe':", zResult, nResult); |
| 741 | 750 |
| --- 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 |