Porting extensions to Tcl 9

PO - Update on 2024-07-09 incorporating remarks and comments.

This page is the summary of my experiences trying to port the Tcl packages or programs supported by BAWT to Tcl9.

The following Tcl and Tk versions have been used for the porting tests:

Tcl9.0b29.0b2+3266fc297b4ae23ee1ddffb7fe35c1ede4939efc774f46d7d6378083842d1d15.gcc-702
Tk9.0b29.0b2+58f75f997e2e1438a8f04978c3c8c0f21e4bbd88bbff83680149ad4553f00c44.gcc-702.win32
  • Table Packages lists all packages looked at and their current status.
  • Table Changes in Tcl summarizes all changes done at the Tcl level for all packages.
  • Table Changes in C summarizes all changes done at the C level for all packages.
  • All other tables summarize the changes done for each individual package or program.

The tables below are based on the following Excel file: https://www.tcl3d.org/bawt/download/Tcl9-Port.xlsx

Please feel free to add your experiences, additions and comments.


Other porting experiences:

Porting tools:


Packages

This table summarizes the status of the package ports.

The columns show the folllowing information:

  • Package: The name and a link to the package home page.
  • Start version: The version number and a link to the source of the package as used for start of the porting or the working Tcl 9 version.
  • Ported version: The version number and a link to the source of the ported package. If entry is Works, then the Start version is working. If entry is NoTcl9, I either did not look at the package or it was too much effort.
  • Build: The modified package could be compiled with Tcl 9.
  • Require: A package require suceeded for the package with Tcl 9.
  • Bawt Test: The simple BAWT test program for this package works with Tcl 9.
  • Responsible: The name or link of the package maintainer.
  • Active Tcl9 Development: Flag indicating active Tcl9 development.
  • Comments: Short comments regarding this package. Add longer comments at the end of the table.

Note, that the ported versions also work with Tcl/Tk 8.6.15 and 8.7.b1.

Package Start version Ported version Build Require Bawt Test Responsible Active Tcl9 Development Comments
CMake 3.25.2 WorksYesN/AN/ANoWorks with simple patch applied in BAWT Build script.
SWIG 4.2.1 WorksYesN/AN/APOYes
apave 4.4.5 WorksYesYesYesaplsimpleYes
awthemes 10.4.0 WorksYesYesYesNo
BWidget 1.9.16 1.10.0 YesYesYesoehharYesReleased 2024-10-15
Canvas3d 1.2.2 1.2.3 YesYesNoNo
cawt 2.9.6 WorksYesYesYesPOYesNeeds Twapi 5.0 for Tcl 9.
cffi 1.2.0 1.2.1 YesYesYesAPNYes
critcl 3.2 3.2.1 YesYesN/AAKYesRepository version working. No official release yet.
DiffUtil 0.4.2 0.4.3 YesYesYesNo
expect 5.45.4 NoTcl9NoNoNoNo
ffidl 0.9.0 0.9.1 YesYesYesNo
fitsTcl 2.5 2.5.1 YesYesYesNo
gdi 0.9.9.15 WorksYesYesN/ANo
gorilla 1.6.0 1.6.1 YesYesN/ANo
hdc 0.2.0.1 WorksYesYesN/ANo
Img 2.0b1 WorksYesYesYesPOYes
imgjp2 0.1 0.1.1 YesYesYesNo
imgtools 0.3 0.3.1 YesYesYesNo
iocp 1.1.0 1.1.1 YesYesYesAPNYesVersion 2.0a0 available.
itk 4.2.5 WorksYesYesYescore.tcl-lang.orgYes
iwidgets 4.1.1 4.1.2 YesYesYesNo
materialicons 0.2 WorksYesYesYesNo
mawt 0.4.4 WorksYesYesYesPOYes
memchan 2.3 2.3.1 YesYesNoNo
mentry 4.2 WorksYesYesYesnemethiYes
Mpexpr 1.2 1.2.1 YesYesYesNoNot working with gcc 14.
mqtt 3.1 3.1.1 YesYesYesNo
MuPDFWidget 2.3.1 2.3.2 YesYesYesNo
nacl 1.1 1.1.1 YesYesYesNo
nsf 2.4.0 NoTcl9NoNoNoGnYesRepository version working. No official release yet.
ooxml 1.8 WorksYesYesYesALXYes
oratcl 4.6 NoTcl9NoNoN/ANo
parse_args 0.3.3 0.3.4 YesYesYesNoNewer version 0.5.1 available. Release file not working because of wrong links.
pawt 1.1.3 WorksYesYesYesPOYes
pdf4tcl 0.9.4 WorksYesYesYesPeter SpjuthYes
pgintcl 3.5.1 3.5.2 YesYesN/ANo
photoresize 0.2 0.2.1 YesYesYesNo
poApps 2.13.0 WorksYesYesN/APOYes
poImg 2.0.5 WorksYesYesYesPOYes
printer 0.9.6.15 0.9.6.16 YesYesYesNo
puppyicons 0.1 WorksYesYesYesNo
rbc 0.2 NoTcl9NoNoNoNoSee package tko::graph as replacement.
rl_json 0.11.5 0.11.6 YesNoNoNoNewer version 0.15.1 available. Release file not working because of wrong links.
ruff 2.3.0 2.3.1 YesYesYesAPNYesRepository version working. No official release yet.
scrollutil 2.2 WorksYesYesYesnemethiYes
shellicon 0.1 0.1.1 YesYesYesNo
shtmlview 1.0.0 1.0.1 YesYesYesNo
Snack 2.2.11 2.2.12 YesYesYesNo
tablelist 7.2 WorksYesYesYesnemethiYes
tbcload 1.7.1 1.7.2 YesNoNoNo
tcl3dBasic 0.9.5 1.0a1 YesYesYesPOYesRepository version working. No official release yet.
Tcladdressbook 1.2.4 NoTcl9NoNoN/ANo
tclAE 2.0.7 NoTcl9NoNoN/ANo
Tclapplescript 2.2 NoTcl9NoNoN/ANo
tclargp 0.2 WorksYesYesYesNo
tclcompiler 1.7.3 1.7.4 YesYesNoNo
tclcsv 2.3 2.3.1 YesYesYesNo
tclfpdf 1.6 WorksYesYesYesNo
tclgd 1.4 1.4.1 YesYesYesNo
Tclkit N/AN/AYesYesN/ANo
tcllib 2.0 WorksYesYesYesakuYesRepository version working. No official release yet.
tclMuPdf 2.3 2.3.1 YesYesYesN/ANewer version 2.4 available. Not tested yet.
tclparser 1.8 1.8.1 YesYesN/ANo
tclpy 0.4 0.4.1 YesYesYesNo
tclssg 2.3.0 WorksYesYesN/AdbohdanYes
tcltls 1.7.22 1.7.23 YesYesYescore.tcl-lang.orgYesRepository version 1.8. No official release yet.
tclvfs 1.4.2 1.4.3 YesYesYesNo
tclws 3.4.0 3.4.1 YesYesN/AoehharYesRepository version working. No official release yet.
tclx 8.4.4 NoTcl9NoNoNoNoCurrent release 8.6.3 not yet working with Tcl 9.
tdom 0.9.5 WorksYesYesYesdeYes
Tix 8.4.3 NoTk9NoNoNoNo
tkcon 2.7.11 WorksYesYesN/ANo
tkdnd 2.9.3 2.9.4 YesYesYespetasisYesRepository version working. No official release yet.
Tkhtml 3.0.1 3.0.2 YesYesYesNo
tklib 0.8 WorksYesYesN/AakuYes
tko 0.4 WorksYesYesYesrzYesReplacement for rbc and tkpath.
tkpath 0.3.3 NoTcl9NoNoNoNoSee package tko::path as replacement.
tkribbon 1.1 1.2 YesYesN/ANo
tksqlite 0.5.13 0.5.14 YesYesN/ANo
tksvg 0.14 WorksYesYesYesoehharYesNot needed for Tk 8.7 and newer. SVG support built into Tk.
Tktable 2.11 2.11.1 YesYesYesemilianoYes
tkwintrack 2.0.1 2.0.2 YesYesN/ANo
treectrl 2.4.1 2.4.2 YesYesYesNo
Trf 2.1.4 NoTcl9NoNoNoNo
trofs 0.4.9 NoTcl9NoNoNoNo
tserialport 1.1 1.1.1 YesYesYesNo
twapi 4.7.2 5.0a1 YesYesYesAPNYesRepository version working. No official release yet.
tzint 1.1 1.1.1 YesYesYesNo
udp 1.0.11 1.0.12 YesYesNoAPNYesTcl9 version available at https://core.tcl-lang.org/tcludp . Not tested yet.
ukaz 2.0a3 2.0.0 YesYesYesNo
vectcl 0.2 0.2.1 YesYesNoNo
wcb 4.0 WorksYesYesYesnemethiYes
windetect 1.0.0 1.0.1 YesYesN/ANo
winhelp 1.1 1.1.1 YesYesYes

Additional comments:


Changes in Tcl

This table summarizes the changes done for porting Tcl programs.

Some of the actions are described first as code examples.

Replaced package require Tcl 8.X with package require Tcl 8.X-

Replaced package require Tk 8.X with package require Tk 8.X-

An alternative to the above is as follows:

AK While going from 8.X to 8.X- opens the package to 9, it also opens it to 10, 11, etc. A more restricted way would be to go to package require Tcl 8.X 9. The two requirements, 8.X, and 9 are OR-ed. The command accepts the Tcl version, if it matches at least one of the requirements. With this change the package is opened to 9, but not beyond.

Common changes in Tcl files Comments
Replaced $tcl_platform with $::tcl_platform in namespaces
Replaced package require Tcl 8.X with package require Tcl 8.X-
Replaced package require Tk 8.X with package require Tk 8.X-
Replaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Added string totitle in pkgIndex.tcl.in or pkgIndex.tcl
Added string totitle in Makefile.in
Replaced "~" with file tildeexpand "~" for Tcl >= 9
Replaced obsolete case command with switch
Use source -encoding utf-8 instead of plain source
Changed functionality: ttk::combobox::current returns empty string instead of -1
Check for octal numbers.

Additional comments:


Changes in C

This table summarizes the changes done for porting C/C++ extensions.

Some of the actions are described first as code examples.

Added Tcl_Size related definitions, if TCL_SIZE_MAX is not defined

/* Check, if Tcl version supports Tcl_Size,
   which was introduced in Tcl 8.7 and 9.
*/
#ifndef TCL_SIZE_MAX
    #include <limits.h>
    #define TCL_SIZE_MAX INT_MAX

    #ifndef Tcl_Size
        typedef int Tcl_Size;
    #endif

    #define TCL_SIZE_MODIFIER ""
    #define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj
#endif

Replaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions

DKF: Note that Tcl_SaveResult() has basically been deprecated since Tcl 8.5 because it doesn't handle the full state of the interpreter (and can't; not enough space in the Tcl_SavedResult structure definition and that's caller allocated; by comparison, Tcl_InterpState is an opaque handle and has its definition entirely managed by Tcl's internals). Unless you need the code to still work in Tcl 8.4 and before, you should update to use the new API. Tcl 9 just removes that deprecated API. Tcl 8.5 and 8.6 were the transition period (over a decade).

#if TCL_MAJOR_VERSION < 9
    Tcl_SavedResult savedResult;
#else
    Tcl_InterpState savedResult;
#endif

#if TCL_MAJOR_VERSION < 9
    Tcl_SaveResult(interp, &savedResult);
#else
    savedResult = Tcl_SaveInterpState(interp, TCL_OK);
#endif

#if TCL_MAJOR_VERSION < 9
    Tcl_RestoreResult(interp, &savedResult);
#else
    Tcl_RestoreInterpState(interp, savedResult);
#endif

#if TCL_MAJOR_VERSION < 9
    Tcl_DiscardResult(&state);
#else
    Tcl_DiscardInterpState(state);
#endif
Common changes in C/C++ files Comments
Replaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
Replaced Tcl_PkgRequire(interp, "Tk", "8.X", 0) with Tcl_PkgRequire(interp, "Tk", "8.X-", 0)
Replaced Tk_InitStubs(interp, "8.X") with Tk_InitStubs(interp, "8.X-")
Added #include <stdarg.h>
Removed _ANSI_ARGS_ statements
Added definition of _ANSI_ARGS_Too lazy to replace them all
Added definition of TCL_VARARGSToo lazy to replace them all
Changed CONST to const
Changed CONST84 to const
Changed CONST86 to const
Changed VOID to void
Replaced TCL_CHANNEL_VERSION_2 with TCL_CHANNEL_VERSION_5
Replaced TCL_CHANNEL_VERSION_4 with TCL_CHANNEL_VERSION_5
Unicode related changes
Replaced Tcl_UniCharNcasecmp with Tcl_UtfNcasecmp
Replaced Tcl_UniCharNcmp with Tcl_UtfNcmp
Replaced Tcl_UniCharCaseMatch with Tcl_StringCaseMatch
Replaced Tcl_Backslash with Tcl_UtfBackslash
Replaced Tcl_DStringTrunc with Tcl_DStringSetLength
Replaced TclOffset with offsetof
Replaced Tk_Offset with offsetof
Replaced Tcl_WinUtfToTChar with Tcl_UtfToChar16DString
Replaced Tk_BackgroundError with Tcl_BackgroundError
Replaced Tk_CancelIdleCall with Tcl_CancelIdleCall
Replaced Tk_DoWhenIdle with Tcl_DoWhenIdle
Replaced Tk_EventuallyFree with Tcl_EventuallyFree
Replaced Tk_Preserve with Tcl_Preserve
Replaced Tk_Release with Tcl_Release
Replaced Tk_InternalBorderWidth with Tk_InternalBorderLeft
Replaced TkpDrawHighlightBorder with Tk_DrawHighlightBorder for Tcl >= 9
Replaced TkpMakeWindow with Tk_MakeWindow for Tcl >= 9
Replaced TclSetPreInitScript with Tcl_SetPreInitScript for Tcl >= 9
Added parameter compRule to Tk_PhotoPutBlock for Tcl >= 9
Replaced Tk_PhotoPutBlock_NoComposite with Tk_PhotoPutBlock(..., TK_PHOTO_COMPOSITE_OVERLAY)
Replaced Tcl_PanicVA with `Tcl_Panic using method described in TIP 422
Replaced panic with Tcl_Panic
Replaced Tcl_DriverCloseProc with Tcl_DriverClose2Proc. Changed signature of corresponding function.
Removed expressions using obsolete TCL_INTERP_DESTROYEDDGP: Any code still making use of the TCL_INTERP_DESTROYED flag should be converted to call the Tcl_InterpDeleted routine.
Removed expressions using obsolete TCL_PARSE_PART1DGP: The last Tcl release where the TCL_PARSE_PART1 flag had any effect was Tcl 8.0. Just remove it.
Removed expressions using obsolete TK_CONFIG_OPTION_SPECIFIED
Replaced obsolete TCL_OUT_LINE_COMPILE with TCL_ERROR
Replaced obsolete TK_X_EVENTS with TCL_WINDOW_EVENTS
Replaced obsolete TK_DONT_WAIT with TCL_DONT_WAIT
Replaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
Updated tclconfig files
Updated files config.guess and config.sub
Added Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Replaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Replaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
Replaced NULL with (char *)NULL in calls of function Tcl_AppendResult or Tcl_SetErrorCodechrstphrchvz: Note that casting the NULL sentinel is not for Tcl 9 readiness, but rather something that should be done anyway for portability.

Additional comments:


CMake

File Changes Comments
Modules/FindTCL.cmakeAdded search for tcl9tk87 library files in BAWT Build script CMake.bawt
Modules/FindTCL.cmakeAdded search for tcl9tk90 library files in BAWT Build script CMake.bawt

Additional comments:


BWidget

File Changes Comments
demo/tree.tclReplaced "~" with file tildeexpand "~" for Tcl >= 9
dropsite.tclReplaced $tcl_platform with $::tcl_platform in namespaces
statusbar.tclReplaced package require Tk 8.X with package require Tk 8.X-
widget.tclReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


Canvas3d

File Changes Comments
generic/c3dsearch.cRemoved CONST86 in struct
generic/c3d.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesReplaced Tk_Offset with offsetof
Updated tclconfig files

Additional comments:


cffi

File Changes Comments
generic/tclhBase.hUsed definitions of Tclh_SSizeT and Tclh_USizeT as are used for Tcl 8TODO
generic/tclhBase.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tclhPointer.hAdded #include <stdarg.h>
pkgIndex.tcl.inAdded string totitle
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


critcl

File Changes Comments
build.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
lib/critcl/critcl.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
lib/critcl/pkgIndex.tclReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Updated tclconfig files

Additional comments:


DiffUtil

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/diffutil.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/diffutil.cReplaced Tcl_UniCharNcasecmp with Tcl_UtfNcasecmp
generic/diffutil.cReplaced Tcl_UniCharNcmp with Tcl_UtfNcmp
generic/diffutil.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/diff.cUnicode related changes
Several filesChanged CONST to const
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


ffidl

File Changes Comments
generic/ffidl.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/ffidl.cChanged CONST to const
generic/ffidl.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/ffidl.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
library/ffidlrt.tclReplaced $tcl_platform with $::tcl_platform in namespaces
library/ffidlrt.tclNeed to correct stubs number of obsolete Tcl_GetUnicode and Tcl_GetByteArrayFromObjTODO
Updated tclconfig files

Additional comments:


fitsTcl

File Changes Comments
configure.inAdded search for Tcl9 libraries.
fitsTcl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter

Additional comments:


gorilla

File Changes Comments
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-
sources/tcllibUpdated csv module to 0.8.1
sources/tcllibUpdated md5 module to 2.0.8
sources/tcllibUpdated sha1module to 2.0.4
sources/tcllibUpdated sha1module to 1.0.7
gorilla.tclReplaced "~" with file tildeexpand "~" for Tcl >= 9

Additional comments:


imgjp2

File Changes Comments
Makefile.inAdded string totitle
imgjp2.cReplaced Tk_PhotoPutBlock_NoComposite with Tk_PhotoPutBlock(..., TK_PHOTO_COMPOSITE_OVERLAY)
imgjp2.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
imgjp2.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


imgtools

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/imgtoolsDecl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


iocp

File Changes Comments
win/tclWinIocp.cReplaced TCL_CHANNEL_VERSION_4 with TCL_CHANNEL_VERSION_5
win/tclWinIocp.cReplaced Tcl_DriverCloseProc with Tcl_DriverClose2Proc. Define IocpChannelClose only for Tcl < 9.
win/tclWinIocpTcp.cReplaced Tcl_DStringTrunc with Tcl_DStringSetLength
win/tclWinIocpWinsock.cReplaced Tcl_DStringTrunc with Tcl_DStringSetLength
win/tclWinIocpUtil.cReplaced Tcl_PanicVA with Tcl_Panic using method described in TIP 422
win/tclhBase.hDeclared for Tcl9: typedef ptrdiff_t Tclh_SSizeTTODO
win/tclPointer.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/tclWinIocp.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


iwidgets

File Changes Comments
win/iwidgets.tclReplaced $iwidgets with $::iwidgets in namespaces
iwidgets.tcl.inReplaced $iwidgets with $::iwidgets in namespaces
iwidgets.tcl.inReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:


memchan

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
Several header filesAdded definition of _ANSI_ARGS_
generic/memchanInt.hCorrected #if ((TCL_MAJOR_VERSION >= 8) && ...) to #if ((TCL_MAJOR_VERSION == 8) && ...)
generic/memchanInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/memchan.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: channel type memory/fifo must be version TCL_CHANNEL_VERSION_5

Mpexpr

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
Several filesRemoved _ANSI_ARGS_ statements
./generic/mpexpr.hAdded definition of TCL_VARARGS
./generic/mpparse.cReplaced Tcl_Backslash with Tcl_UtfBackslash

Additional comments:


mqtt

File Changes Comments
mqtt-3.1.tmReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


MuPDFWidget

File Changes Comments
pkgIndex.tclReplaced package require Tk 8.X with package require Tk 8.X-

Additional comments:


nacl

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/nacl.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/nacl.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


parse_args

File Changes Comments
generic/parse_args.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/parse_args.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/parse_argsInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Updated tclconfig files

Additional comments:


pgintcl

File Changes Comments
pgin.tclReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


photoresize

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/photoresize_wrap.cppChanged CONST to const
generic/photoresize_wrap.cppReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
generic/photoresize_wrap.cppAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/photoresize_wrap.cppReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


printer

File Changes Comments
printer.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
printer.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
printer.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions

Additional comments:


rl_json

File Changes Comments
Several filesChanged CONST to const
Several filesRemoved _ANSI_ARGS_ statements
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/rl_json.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
pkgIndex.tcl.inAdded string totitle
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: Can't retrieve objType for int

rbc

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST86 to const
Several filesAdded definition of _ANSI_ARGS_
Several filesAdded definition of TCL_VARARGS
Several filesRemoved expressions using obsolete TCL_INTERP_DESTROYED

Additional comments:

  • Stopped porting because of lots of other needed changes

ruff

File Changes Comments
ruff.tclReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


shellicon

File Changes Comments
shellicon.cChanged CONST to const
shellicon.cReplaced Tcl_AppendResult with Tcl_SetResult for return of image name

Additional comments:


shtmlview

File Changes Comments
shtmlview/shtmlview.tclReplaced $tcl_platform with $::tcl_platform in namespaces

Additional comments:


Snack

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged CONST86 to const
Several filesRemoved _ANSI_ARGS_ statements
generic/jkSound.hAdded #if TCL_MAJOR_VERSION >= 9 to hide obsolete Tcl_SeekOld and Tcl_TellOld
generic/snack.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesRemoved expressions using obsolete TCL_INTERP_DESTROYED
Several filesRemoved expressions using obsolete TCL_PARSE_PART1
Several filesRemoved expressions using obsolete TK_CONFIG_OPTION_SPECIFIED
Several filesReplaced Tk_Offset with offsetof

Additional comments:


tbcload

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
cmpInt.hAdded definition of _ANSI_ARGS_
cmpRead.cReplaced TclOffset with offsetof
Updated tclconfig files

Additional comments:

  • Critical compiler warnings regarding int * vs. size_t * with ExceptionRange
  • package require tbcload generates error message: InitTypes: failed to find the int type

tcl3dBasic

File Changes Comments
CMakeModules/Macros.cmakeAdded macro GET_TCL_MAJOR_VERSION
tcl3dOgl/Togl/togl.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
tcl3dOgl/Togl/togl.cReplaced Tk_Preserve with Tcl_Preserve
tcl3dOgl/Togl/togl.cReplaced Tk_Release with Tcl_Release
tcl3dOgl/Togl/togl.cReplaced TkpMakeWindow with Tk_MakeWindow for Tcl >= 9
tcl3dOgl/Togl/togl.cReplaced panic with `Tcl_Panic
tcl3dOgl/Togl/togl.cReplaced Tk_DoWhenIdle with Tcl_DoWhenIdle
tcl3dOgl/Togl/togl.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
tcl3dOgl/Togl/togl.cReplaced Tk_Offset with offsetof
Several filesReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
swigfiles/tcl3dDefines.iAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several pkgIndex.tcl filesUse source -encoding utf-8 instead of plain source
Several pkgIndex.tcl filesReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Several SWIG filesAdapted SWIG module names

Additional comments:


tclcompiler

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
cmpInt.hAdded definition of _ANSI_ARGS_
cmpInt.hReplaced panic with Tcl_Panic
cmpWrite.cReplaced TclOffset with offsetof
cmpWrite.cReplaced obsolete TCL_OUT_LINE_COMPILE with TCL_ERROR
cmpWrite.cReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
cmpWrite.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
cmpWrite.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Updated tclconfig files

Additional comments:

  • Critical compiler warnings regarding int * vs. size_t * with ForeachVarList

tclcsv

File Changes Comments
src/tclcsv.cChanged CONST to const
pkgIndex.tcl.inAdded string totitle
src/csv.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


tclgd

File Changes Comments
Several filesChanged CONST to const
generic/tclgdtcl.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/tclgd.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tclgd.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


Tclkit

File Changes Comments
kbskit/generic/kitInit.cReplaced TclSetPreInitScript with Tcl_SetPreInitScript for Tcl >= 9
Several filesChanged CONST to const
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-
Several filesReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
kbskit/library/setupvfs.tclAdded ability to specify different Tcl and Tk versions.
TclVfs/generic/vfs.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
Several filesRemoved _ANSI_ARGS_ statements
vqtcl/generic/vlerq.cReplaced Tcl_WinUtfToTChar with Tcl_UtfToChar16DString
Several filesReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
Several filesAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


tclMuPDF

File Changes Comments
Several filesAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter

Additional comments:


tclparser

File Changes Comments
tclParser.cChanged CONST to const
tclParser.cRemoved _ANSI_ARGS_ statements
tclParser.cUsed Tcl_Size for size parameter of TclFindElement for Tcl >= 9
tclParser.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
tclParser.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


tclpy

File Changes Comments
generic/tclpy.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/tclpy.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tclpy.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
pkgIndex.tcl.in.cmakeAdded string totitle

Additional comments:


tcltls

File Changes Comments
Several filesRemoved _ANSI_ARGS_ statements
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
tlsIO.cReplaced TCL_CHANNEL_VERSION_2 with TCL_CHANNEL_VERSION_5
tls.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
tls.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
tls.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
tls.cReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
pkgIndex.tcl.inReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Updated files config.guess and config.sub

Additional comments:


tclvfs

File Changes Comments
generic/vfs.cRemoved _ANSI_ARGS_ statements
generic/vfs.cChanged CONST to const
generic/vfs.cChanged CONST86 to const
generic/vfs.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
generic/vfs.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/vfs.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/vfs.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
library/vfs.tcl.inReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:


tclws

File Changes Comments
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


tix

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
generic/tix.hAdded definition of _ANSI_ARGS_
generic/tix.hAdded definition of TCL_VARARGS
generic/tix.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tixInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tixGrSort.cReplaced Tcl_DStringTrunc with Tcl_DStringSetLength
Several filesReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
Several filesReplaced Tk_Preserve with Tcl_Preserve
Several filesReplaced Tk_Release with Tcl_Release
Several filesReplaced Tk_CancelIdleCall with Tcl_CancelIdleCall
Several filesReplaced Tk_DoWhenIdle with Tcl_DoWhenIdle
Several filesReplaced Tk_EventuallyFree with Tcl_EventuallyFree
Several filesReplaced Tk_BackgroundError with Tcl_BackgroundError
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesReplaced Tk_Offset with offsetof
generic/tixWidget.cReplaced obsolete TK_X_EVENTS with TCL_WINDOW_EVENTS
generic/tixWidget.cReplaced obsolete TK_DONT_WAIT with TCL_DONT_WAIT
generic/tixForm.cReplaced Tk_InternalBorderWidth with Tk_InternalBorderLeft
library/Init.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
Makefile.inReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:

  • TODO: Replace obsolete case command with switch

tkdnd

File Changes Comments
library/tkdnd.tclAdded string totitle
Several filesReplaced Tk_BackgroundError with Tcl_BackgroundError
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/OleDND.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/OleDND.hUnicode related changes
Updated tclconfig files

Additional comments:


tkhtml

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
Several filesRemoved _ANSI_ARGS_ statements
src/htmltcl.cAdded #include <stdarg.h>
src/htmltcl.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
src/htmlimage.cAdded parameter compRule to Tk_PhotoPutBlock for Tcl >= 9
src/html.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
hv/hv3see.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesReplaced Tk_Offset with offsetof
Updated tclconfig files

Additional comments:


tkpath

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void

Additional comments:

  • Stopped porting because of lots of needed Tk_OptionSpec adaptions

tkribbon

File Changes Comments
CMakeLists.txtReplaced tkribbon with Tkribbon in load command
generic/TkRibbon_Widget.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/TkRibbon.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesReplaced Tk_Offset with offsetof

Additional comments:


tksqlite

File Changes Comments
tksqlite.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
tksqlite.tclReplaced ttk with ::ttk in namespaces
tksqlite.tclReplaced "~" with file tildeexpand "~" for Tcl >= 9

Additional comments:


tktable

File Changes Comments
generic/tkTable.cRemoved expressions using obsolete TCL_INTERP_DESTROYEDTODO
generic/tkTable.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
Several filesRemoved _ANSI_ARGS_ statements
Several filesReplaced Tk_Offset with offsetof
Makefile.inReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:


tkwintrack

File Changes Comments
tkwintrack.tclReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-

Additional comments:


treectrl

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesReplaced Tk_Offset with offsetof
generic/tkTreeUtils.cRemoved _ANSI_ARGS_ statements
generic/tkTreeCtrl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/qebind.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/qebind.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
generic/tkTreeDisplay.cReplaced TkpDrawHighlightBorder with Tk_DrawHighlightBorder for Tcl >= 9
generic/tkTreeElem.cRemoved expressions using obsolete TCL_INTERP_DESTROYED
Makefile.inAdded string totitle
Updated tclconfig files

Additional comments:


tserialport

File Changes Comments
pkgIndex.tcl.inAdded string totitle
Updated files config.guess and config.sub
Updated tclconfig files

Additional comments:


tzint

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/tzint.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tzint.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


udp

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/udp_tcl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/udp_tcl.cChanged CONST to const
generic/udp_tcl.cChanged CONST86 to const
generic/udp_tcl.cReplaced Tcl_DriverCloseProc with Tcl_DriverClose2Proc. Changed signature of corresponding function.
generic/udp_tcl.cAdded #include <stdarg.h>
generic/udp_tcl.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: channel type udp must be version TCL_CHANNEL_VERSION_5

ukaz

File Changes Comments
ukaz.tclReplaced package require Tk 8.X with package require Tk 8.X-

Additional comments:


vectcl

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/vmparser.cChanged CONST to const
generic/vmparser.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/vectclInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: expected integer but got "1.0 0.0 0.0"

windetect

File Changes Comments
windetect.tclReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-

Additional comments:


winhelp

File Changes Comments
Makefile.inAdded string totitle
Updated tclconfig files

Additional comments: