{"base_revision":"git-v1:0fa13a6a357347b3e7a3174473b23012639d20e3","content":"diff --git a/debian/changelog b/debian/changelog\nindex 132fac5..030e89f 100644\n--- a/debian/changelog\n+++ b/debian/changelog\n@@ -1,29 +1,3 @@\n-tclx (8.6.3+dfsg-4) unstable; urgency=medium\n-\n-  * Switch dependencies from Tcl 9.0 to Tcl 9.1.\n-  * Bump debhelper compatibility level to 14.\n-\n- -- Sergei Golovan <sgolovan@debian.org>  Sun, 18 Oct 2026 22:34:08 +0300\n-\n-tclx (8.6.3+dfsg-3) unstable; urgency=medium\n-\n-  * Add a patch which makes [chmod] in Tcl 9 behave in the same way as\n-    in Tcl 8.\n-\n- -- Sergei Golovan <sgolovan@debian.org>  Mon, 17 Aug 2026 18:45:35 +0300\n-\n-tclx (8.6.3+dfsg-2) unstable; urgency=medium\n-\n-  * Add a patch from Brian Griffin, which ports TclX to Tcl 9. Build the\n-    Tclx library both for Tcl 8.6 and Tcl 9.0.\n-  * Replace tcl* by libtcl* in the package dependencies.\n-  * Add autopkgtests.\n-  * Make the tcl-tclx package multi-arch same, and the tcl-tclx-doc package\n-    multi-arch foreign.\n-  * Drop the priority field from debian/control.\n-\n- -- Sergei Golovan <sgolovan@debian.org>  Sun, 16 Aug 2026 12:27:33 +0300\n-\n tclx (8.6.3+dfsg-1) unstable; urgency=medium\n \n   * Switch to new upstream. Add debian/watch to track upstream releases.\n@@ -112,7 +86,7 @@ tclx8.4 (8.4.0-3.1) unstable; urgency=low\n \n tclx8.4 (8.4.0-3) unstable; urgency=low\n \n-  * In pkgIndex.tcl load the library on Tcl >= 8.4.\n+  * In pkgIndex.tcl load the library on Tcl >= 8.4.  \n     Closes: #538701.\n \n   * Fixed build on GNU/kFreeBSD.\n@@ -157,3 +131,4 @@ tclx8.4 (0.20040109-1) unstable; urgency=low\n   * Renamed all manpages to <manpage>.3tclx.\n \n  -- Massimo Dal Zotto <dz@debian.org>  Fri,  9 Jan 2004 15:54:49 +0100\n+\ndiff --git a/debian/control b/debian/control\nindex 6d9b788..4b5e493 100644\n--- a/debian/control\n+++ b/debian/control\n@@ -1,8 +1,9 @@\n Source: tclx\n Section: libs\n+Priority: optional\n Maintainer: Debian Tcl/Tk Team <pkg-tcltk-devel@lists.alioth.debian.org>\n Uploaders: Sergei Golovan <sgolovan@debian.org>\n-Build-Depends: autoconf, debhelper-compat (= 14), tcl-dev, tcl8.6-dev, tcl9.1-dev\n+Build-Depends: autoconf, debhelper-compat (= 13), tcl-dev\n Standards-Version: 4.7.4\n Homepage: https://github.com/flightaware/tclx\n Vcs-Browser: https://salsa.debian.org/tcltk-team/tclx8.4\n@@ -10,12 +11,11 @@ Vcs-Git: https://salsa.debian.org/tcltk-team/tclx8.4.git\n \n Package: tcl-tclx\n Architecture: any\n-Multi-Arch: same\n-Depends: libtcl8.6 | libtcl9.1 | libtcl, ${misc:Depends}, ${shlibs:Depends}\n+Depends: tcl | tcl8.6, ${misc:Depends}, ${shlibs:Depends}\n Conflicts: tclx8.4, tclx8.4-dev\n Replaces: tclx8.4, tclx8.4-dev\n-Provides: tcl8.6-tclx (= ${binary:Version}), tcl9.1-tclx (= ${binary:Version}),\n- tclx (= ${binary:Version}), tclx8.4 (= ${binary:Version}), tclx8.4-dev (= ${binary:Version})\n+Provides: tcl8.6-tclx (= ${binary:Version}), tclx (= ${binary:Version}),\n+ tclx8.4 (= ${binary:Version}), tclx8.4-dev (= ${binary:Version})\n Suggests: tcl-tclx-doc\n Description: Extended Tcl (TclX)\n  Extended Tcl (TclX), is a set of extensions to Tcl, the Tool Command\n@@ -31,7 +31,6 @@ Description: Extended Tcl (TclX)\n Package: tcl-tclx-doc\n Section: doc\n Architecture: all\n-Multi-Arch: foreign\n Depends: ${misc:Depends}\n Conflicts: tclx8.4-doc\n Replaces: tclx8.4-doc\ndiff --git a/debian/patches/chmod.patch b/debian/patches/chmod.patch\ndeleted file mode 100644\nindex e3b7ba7..0000000\n--- a/debian/patches/chmod.patch\n+++ /dev/null\n@@ -1,273 +0,0 @@\n-Author: Sergei Golovan\n-Description: Patch makes [chmod] for Tcl 9 compatible with\n- [chmod] for Tcl 8.\n-Last-Update: Mon, 17 Aug 2026 15:38:14 +0300\n-Forwarded: https://github.com/tclmonster/tclx/pull/1\n-\n---- a/generic/tclXchmod.c\n-+++ b/generic/tclXchmod.c\n-@@ -314,6 +314,7 @@\n-     Tcl_Obj     **fileObjv;\n-     char         *fileIdsString;\n-     char         *modeString;\n-+    Tcl_Size      modeLen;\n-     int          modeBits;\n- \n-     /*\n-@@ -333,36 +334,36 @@\n-     if (objIdx != objc - 2)\n- \treturn TclX_WrongArgs (interp, objv [0], \"[-fileid] mode filelist\");\n- \n--    modeString = Tcl_GetStringFromObj (objv [objIdx], NULL);\n-+    modeString = Tcl_GetStringFromObj (objv [objIdx], &modeLen);\n- #if TCL_MAJOR_VERSION > 8\n-     /*\n-      * Tcl 9 treats leading-0 integers as decimal, not octal.  We must\n-      * parse octal manually and accept the explicit 0d prefix for decimal.\n-      */\n--    if (modeString[0] == '0' && modeString[1] == 'd') {\n-+    if (modeLen >= 2 && modeString[0] == '0' && ISDIGIT (modeString[1])) {\n- \n--      /* Allow special case for explicit decimal representation */\n-+        /* Allow special case for octal numbers specified as 0644 */\n-+        int i = 0;\n-+\t    modeBits = 0;\n-+\t    while (modeString[i]) {\n-+\t        if ((!ISDIGIT(modeString[i])) || modeString[i] > '7') {\n-+\t            return TCL_ERROR;\n-+\t        }\n-+\t        modeBits = (modeBits << 3 | (0x7 & (modeString[i] - '0')));\n-+\t        i++;\n-+\t    }\n-+\t    modeInfo.absMode = modeBits;\n-+        modeInfo.symMode = NULL;\n-+\n-+    } else if (modeLen >= 1 && ISDIGIT (modeString[0])) {\n-+\n-+      /* Use the specified number as is */\n-       if (Tcl_GetIntFromObj (interp, objv [objIdx], &modeBits) != TCL_OK) {\n--\treturn TCL_ERROR;\n-+\t    return TCL_ERROR;\n-       }\n-       modeInfo.absMode = modeBits;\n-       modeInfo.symMode = NULL;\n- \n--    } else if (ISDIGIT (modeString[0])) {\n--\n--      /* parse out the octal number */\n--        int i = 0;\n--\tmodeBits = 0;\n--\twhile (modeString[i]) {\n--\t    if ((!ISDIGIT(modeString[i])) || modeString[i] > '7') {\n--\t        return TCL_ERROR;\n--\t    }\n--\t    modeBits = (modeBits << 3 | (0x7 & (modeString[i] - '0')));\n--\t    i++;\n--\t}\n--\tmodeInfo.absMode = modeBits;\n--        modeInfo.symMode = NULL;\n--\n-     } else {\n-         /* String mode */\n-         modeInfo.absMode = 0;\n-@@ -372,7 +373,7 @@\n-     /*\n-      * Tcl 8: Tcl_GetIntFromObj handles 0-prefixed integers as octal.\n-      */\n--    if (ISDIGIT (modeString[0])) {\n-+    if (modeLen >= 1 && ISDIGIT (modeString[0])) {\n-         if (Tcl_GetIntFromObj (interp, objv [objIdx], &modeBits)\n- \t  != TCL_OK)\n-             return TCL_ERROR;\n---- a/tests/chmod.test\n-+++ b/tests/chmod.test\n-@@ -31,14 +31,11 @@\n- }\n- \n- # Tcl 9 treats leading-0 as decimal, so chmod must parse octal manually.\n--# permissiveOctal: tests using 0d prefix (Tcl 9 only)\n--# strictOctal: tests where bare integers are NOT octal (Tcl 9 only)\n-+# explicitDecimal: tests using 0d prefix (Tcl 9 only)\n- if {[package vcompare [package provide Tcl] 9.0] >= 0} {\n--    testConstraint permissiveOctal 1\n--    testConstraint strictOctal 1\n-+    testConstraint explicitDecimal 1\n- } else {\n--    testConstraint permissiveOctal 0\n--    testConstraint strictOctal 0\n-+    testConstraint explicitDecimal 0\n- }\n- \n- #-----------------------------------------------------------------------------\n-@@ -221,114 +218,132 @@\n-     GetMode CHMOD.TMP\n- } {4111}\n- \n--test chmod-2.1.0 {chmod absolute integer mode tests} permissiveOctal {\n--    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod  0d65 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-1.15 {chmod absolute mode tests} {\n-+    chmod                0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod [format %03d 65] {CHMOD.TMP CHMOD2.TMP}\n-+    list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n-+} {65 65}\n-+\n-+test chmod-2.1.0 {chmod absolute integer mode tests} explicitDecimal {\n-+    chmod    0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 0d65 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {101 101}\n- \n--test chmod-2.1.1 {chmod absolute integer mode tests} strictOctal {\n--    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod  65 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-2.1.1 {chmod absolute integer mode tests} {\n-+    chmod  0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 65 {CHMOD.TMP CHMOD2.TMP}\n-+    list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n-+} {101 101}\n-+\n-+test chmod-2.1.2 {chmod absolute integer mode tests} {\n-+    chmod    0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 0o65 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {65 65}\n- \n--test chmod-2.2 {chmod absolute integer mode tests} permissiveOctal {\n--    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 0d8 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-2.1.3 {chmod absolute integer mode tests} {\n-+    chmod              0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod [expr {0o101}] {CHMOD.TMP CHMOD2.TMP}\n-+    list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n-+} {101 101}\n-+\n-+test chmod-2.2 {chmod absolute integer mode tests} {\n-+    chmod 0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 8 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {10 10}\n- \n--test chmod-2.3.0 {chmod absolute integer mode tests} permissiveOctal {\n--    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 0d511 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-2.3.0 {chmod absolute integer mode tests} {\n-+    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 511 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {777 777}\n- \n--test chmod-2.3.1 {chmod absolute integer mode tests} strictOctal {\n-+test chmod-2.3.1 {chmod absolute integer mode tests} explicitDecimal {\n-     chmod     0 {CHMOD.TMP CHMOD2.TMP}\n-     chmod 0d511 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {777 777}\n- \n--test chmod-2.4 {chmod absolute integer mode tests} permissiveOctal {\n--    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 0d438 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-2.4 {chmod absolute integer mode tests} {\n-+    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 438 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {666 666}\n- \n--test chmod-2.5 {chmod absolute integer mode tests} permissiveOctal {\n--    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 0d453 {CHMOD.TMP  CHMOD2.TMP}\n-+test chmod-2.5 {chmod absolute integer mode tests} {\n-+    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 453 {CHMOD.TMP  CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {705 705}\n- \n--test chmod-2.6 {chmod absolute integer mode tests} permissiveOctal {\n--    chmod      0 CHMOD.TMP\n--    chmod 0d2121 CHMOD.TMP\n-+test chmod-2.6 {chmod absolute integer mode tests} {\n-+    chmod    0 CHMOD.TMP\n-+    chmod 2121 CHMOD.TMP\n-     GetMode    CHMOD.TMP\n- } {4111}\n- \n--test chmod-2.7 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-+test chmod-2.7 {chmod absolute integer mode tests} {need_fchmod} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid     0 [list $fh1 $fh2]\n--    chmod -fileid  0d65 [list $fh1 $fh2]\n-+    chmod -fileid   0 [list $fh1 $fh2]\n-+    chmod -fileid  65 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {101 101}\n- \n--test chmod-2.8 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-+test chmod-2.8 {chmod absolute integer mode tests} {need_fchmod} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid  0 [list $fh1 $fh2]\n--    chmod -fileid 10 [list $fh1 $fh2]\n-+    chmod -fileid 0 [list $fh1 $fh2]\n-+    chmod -fileid 8 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {10 10}\n- \n--test chmod-2.9 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-+test chmod-2.9 {chmod absolute integer mode tests} {need_fchmod} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n-     chmod -fileid   0 [list $fh1 $fh2]\n--    chmod -fileid 777 [list $fh1 $fh2]\n-+    chmod -fileid 511 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {777 777}\n- \n--test chmod-2.10 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-+test chmod-2.10 {chmod absolute integer mode tests} {need_fchmod} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid     0 [list $fh1 $fh2]\n--    chmod -fileid 0d438 [list $fh1 $fh2]\n-+    chmod -fileid   0 [list $fh1 $fh2]\n-+    chmod -fileid 438 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {666 666}\n- \n--test chmod-2.11 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-+test chmod-2.11 {chmod absolute integer mode tests} {need_fchmod} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid     0 [list $fh1 $fh2]\n--    chmod -fileid 0d453 [list $fh1 $fh2]\n-+    chmod -fileid   0 [list $fh1 $fh2]\n-+    chmod -fileid 453 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {705 705}\n- \n--test chmod-2.12 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-+test chmod-2.12 {chmod absolute integer mode tests} {need_fchmod} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh [open CHMOD.TMP w]\n--    chmod -fileid   0    $fh\n--    chmod -fileid 0d2121 $fh\n-+    chmod -fileid 0    $fh\n-+    chmod -fileid 2121 $fh\n-     close $fh\n-     GetMode CHMOD.TMP\n- } {4111}\ndiff --git a/debian/patches/pkgindex.patch b/debian/patches/pkgindex.patch\ndeleted file mode 100644\nindex 0e6b653..0000000\n--- a/debian/patches/pkgindex.patch\n+++ /dev/null\n@@ -1,45 +0,0 @@\n-Author: Sergei Golovan\n-Description: Patch enables loading TclX from both Tcl 8 and Tcl 9\n- using the same pkgIndex.tcl. This allows a user to install Tclx\n- for both Tcl versions into a single directory.\n-Last-Update: Sun, 16 Aug 2026 12:10:52 +0300\n-\n---- a/Makefile.in\n-+++ b/Makefile.in\n-@@ -76,7 +76,15 @@\n- # configuration options) composed of the named objects.\n- #========================================================================\n- \n--PKG_LIB_FILE\t= @PKG_LIB_FILE@\n-+TCL_VERSION     = @TCL_VERSION@\n-+PKG_LIB_FILE8\t= @PKG_LIB_FILE@\n-+PKG_LIB_FILE9\t= $(subst lib,libtcl9,@PKG_LIB_FILE@)\n-+\n-+ifeq ($(patsubst 9.%,%,$(TCL_VERSION)),$(TCL_VERSION))\n-+PKG_LIB_FILE\t= $(PKG_LIB_FILE8)\n-+else\n-+PKG_LIB_FILE\t= $(PKG_LIB_FILE9)\n-+endif\n- \n- lib_BINARIES\t= $(PKG_LIB_FILE)\n- BINARIES\t= $(lib_BINARIES)\n-@@ -263,9 +271,16 @@\n- \t$(RANLIB) $(PKG_LIB_FILE)\n- \n- pkgIndex.tcl:\n--\t(echo 'package ifneeded Tclx $(PACKAGE_VERSION) \\\n--\t\t[list load [file join $$dir $(PKG_LIB_FILE)] Tclx]'\\\n--\t) > pkgIndex.tcl\n-+\t(echo 'if {[package vsatisfies [package provide Tcl] 9-]} {'\\\n-+ \t) > pkgIndex.tcl\n-+\t(echo '    package ifneeded Tclx $(PACKAGE_VERSION) \\\n-+\t    [list load [file join $$dir $(PKG_LIB_FILE9)] Tclx]'\\\n-+\t) >> pkgIndex.tcl\n-+\t(echo '} else {') >> pkgIndex.tcl\n-+\t(echo '    package ifneeded Tclx $(PACKAGE_VERSION) \\\n-+\t    [list load [file join $$dir $(PKG_LIB_FILE8)] Tclx]'\\\n-+\t) >> pkgIndex.tcl\n-+\t(echo '}') >> pkgIndex.tcl\n- \n- #========================================================================\n- # We need to enumerate the list of .c to .o lines here.\ndiff --git a/debian/patches/series b/debian/patches/series\nindex 8db8b2b..002796a 100644\n--- a/debian/patches/series\n+++ b/debian/patches/series\n@@ -1,6 +1 @@\n typos.patch\n-tcl9.patch\n-chmod.patch\n-tests.patch\n-pkgindex.patch\n-tcl9.1.patch\ndiff --git a/debian/patches/tcl9.1.patch b/debian/patches/tcl9.1.patch\ndeleted file mode 100644\nindex 7c246c9..0000000\n--- a/debian/patches/tcl9.1.patch\n+++ /dev/null\n@@ -1,110 +0,0 @@\n-Author: Sergei Golovan\n-Description: Patch adds a few changes in the tclX test suite\n- to accomodate for the difference in behavior introduced in\n- tcltest and in Tcl itself in version 9.1.\n- .\n- 1. helper procedures in cmdtest.test and profile.test needed\n-    fixing because in tcltest tests run on a deeper level than\n-    in Tcl 9.0 and earlier (they now start from tcltest::TestOnce)\n- 2. some tests in profile.test need fixing because ::uplevel\n-    does not appear in the stack in Tcl 9.1 anymore\n-Last-Update: 2026-10-18\n-\n---- a/tests/cmdtrace.test\n-+++ b/tests/cmdtrace.test\n-@@ -59,7 +59,12 @@\n-             continue}\n-         if {$linelen < $nuke} {\n-             error \"invalid trace line: `$line'\"}\n--        append result \"[crange $line $nuke end]\\n\"\n-+        if {[scan $line \"%d\" level] == 1 && $level > 20} {\n-+            set nuke1 [expr {$nuke - 2*($level - 20)}]\n-+        } else {\n-+            set nuke1 $nuke\n-+        }\n-+        append result \"[crange $line $nuke1 end]\\n\"\n-     }\n-     close $cmdtraceFH\n-     return $result\n---- a/tests/profile.test\n-+++ b/tests/profile.test\n-@@ -101,7 +101,7 @@\n-     # If \"Test\" is at the top, throw this out, or we end up with two\n-     # global.\n-     if {[cequal [lindex $stack 0] Test]\n--\t|| [regexp {::tcltest::(Eval|RunTest)} [lindex $stack 0]]} {\n-+\t|| [regexp {(::)?tcltest::(Eval|RunTest|TestOnce)} [lindex $stack 0]]} {\n- \treturn {}\n-     }\n-     #puts \"PROCESS [info level 0]\"\n-@@ -118,7 +118,7 @@\n- \t    #puts \"APPEND IN GLOBAL\"\n- \t} elseif {!$foundTest} {\n- \t    if {[cequal $elem test]\n--\t\t|| [regexp {::tcltest::(Eval|RunTest)} $elem]} {\n-+\t\t|| [regexp {(::)?tcltest::(Eval|RunTest|TestOnce)} $elem]} {\n- \t\tset foundTest 1\n- \t    } else {\n- \t\tlappend newStack $elem\n-@@ -234,6 +234,23 @@\n- \t{{::ProcD3 ::ProcB3 ::ProcA3 <global>} 1} \\\n- \t{{::ProcD3 ::ProcC3 ::ProcB3 ::ProcA3 <global>} 1}]\n- \n-+if {[package vsatisfies [package provide Tcl] 9.1-]} {\n-+# uplevel does not appear in the stack in Tcl 9.1\n-+test profile-3.2 {profile count tests} {\n-+    profile -commands on\n-+    ProcA3\n-+    profile off profData\n-+    SumCntData profData\n-+} [list {<global> 1} {<global> 1} \\\n-+\t{{::ProcA3 <global>} 1} \\\n-+\t{{::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::ProcC3 ::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::ProcD3 ::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::ProcD3 ::ProcC3 ::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::join ::ProcD3 ::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::join ::ProcD3 ::ProcC3 ::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::profile <global>} 1}]\n-+} else {\n- test profile-3.2 {profile count tests} {\n-     profile -commands on\n-     ProcA3\n-@@ -249,6 +266,7 @@\n- \t{{::join ::ProcD3 ::ProcC3 ::ProcB3 ::ProcA3 <global>} 1} \\\n- \t{{::profile <global>} 1} \\\n- \t{{::uplevel ::ProcC3 ::ProcB3 ::ProcA3 <global>} 1}]\n-+}\n- \n- test profile-3.3 {profile count tests} {\n-     profile -eval on\n-@@ -261,6 +279,21 @@\n- \t{{::ProcC3 ::ProcB3 ::ProcA3 <global>} 1} \\\n- \t{{::ProcD3 ::ProcC3 ::ProcB3 ::ProcA3 <global>} 2}]\n- \n-+if {[package vsatisfies [package provide Tcl] 9.1-]} {\n-+# uplevel does not appear in the stack in Tcl 9.1\n-+test profile-3.4 {profile count tests} {\n-+    profile -eval -commands on\n-+    ProcA3\n-+    profile off profData\n-+    SumCntData profData\n-+} [list {<global> 1} {<global> 1} \\\n-+\t{{::ProcA3 <global>} 1} \\\n-+\t{{::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::ProcC3 ::ProcB3 ::ProcA3 <global>} 1} \\\n-+\t{{::ProcD3 ::ProcC3 ::ProcB3 ::ProcA3 <global>} 2} \\\n-+\t{{::join ::ProcD3 ::ProcC3 ::ProcB3 ::ProcA3 <global>} 2} \\\n-+\t{{::profile <global>} 1}]\n-+} else {\n- test profile-3.4 {profile count tests} {\n-     profile -eval -commands on\n-     ProcA3\n-@@ -276,6 +309,7 @@\n- \t{{::join ::ProcD3 ::uplevel ::ProcC3 ::ProcB3 ::ProcA3 <global>} 1} \\\n- \t{{::profile <global>} 1} \\\n- \t{{::uplevel ::ProcC3 ::ProcB3 ::ProcA3 <global>} 1}]\n-+}\n- \n- #\n- # Test of error unwind.\ndiff --git a/debian/patches/tcl9.patch b/debian/patches/tcl9.patch\ndeleted file mode 100644\nindex dc9aa60..0000000\n--- a/debian/patches/tcl9.patch\n+++ /dev/null\n@@ -1,3955 +0,0 @@\n-Author: Brian Griffin, modified by Sergei Golovan\n-Description: Patch ports Tclx to Tcl 9 while maintaining\n- compatibility with Tcl 8.\n- The patch differs from the original patch in that it does not\n- modify configure, configure.in and tclconfig/*.\n-Origin: https://github.com/tcltk-depot/tclx/pull/1\n-Last-Update: Sun, 16 Aug 2026 12:19:48 +0300\n-\n---- a/ChangeLog\n-+++ b/ChangeLog\n-@@ -1,3 +1,20 @@\n-+2025-04-08  Brian Griffin <bgriffinfortytwo@gmail.com>\n-+\t**** Porting to Tcl 9.0 ****\n-+\n-+\t* TCLX 9.0.0\n-+\t* updated tclconfig\n-+\t* all tclx math functions use Tcl's builtin math functions.\n-+\t* int -> Tcl_Size throughout (i.e. 32-bit to 64-bit sizes)\n-+\t* chmod: default argument base changed from decimal to\n-+\t*        octal, since a leading zero is nolong considered\n-+\t*        octal in Tcl 9. Other radix forms are accepted as\n-+\t*        well, e.g. 0d65. This change makes chmod more\n-+\t*        closely compatible with unix chmod command.\n-+\t* profile: not yet working\n-+\t* tcllib: not yet working\n-+\t* tests: 44 out of 46 tests are passing.\n-+\t*        Tested only on linux.\n-+\n- 2012-11-07  Andreas Kupries  <andreask@activestate.com>\n- \n- \t**** TCLX 8.4.1 RELEASE ****\n---- a/doc/TclX.n\n-+++ b/doc/TclX.n\n-@@ -1123,10 +1123,11 @@\n- .TP\n- \\fBchmod \\fR[\\fB\\-fileid\\fR] \\fImode\\fR \\fIfilelist\\fR\n- .br\n--Set permissions of each of the files in the list \\fIfilelist\\fR to \\fImode\\fR,\n--where \\fImode\\fR is an absolute numeric mode or symbolic permissions as in the\n--UNIX \\fBchmod(1)\\fR command.  To specify a mode as octal, it should be\n--prefixed with a \"0\" (e.g. 0622).\n-+Set permissions of each of the files in the list \\fIfilelist\\fR to\n-+\\fImode\\fR, where \\fImode\\fR is an absolute numeric mode or symbolic\n-+permissions as in the UNIX \\fBchmod(1)\\fR command.  The numeric mode\n-+argument is assumed octal by default (e.g. 733), unless otherwised\n-+specified using an explicit radix indicator (e.g. 0d493).\n- .sp\n- If the option \\fB\\-fileid\\fR is specified, \\fIfilelist\\fR is a list of open\n- file identifiers rather than a list of file names.  This option is not\n---- a/generic/tclExtdInt.h\n-+++ b/generic/tclExtdInt.h\n-@@ -32,6 +32,29 @@\n- #endif\n- \n- /*\n-+ * Tcl 9 / Tcl 8 backward compatibility shim.\n-+ */\n-+#if TCL_MAJOR_VERSION < 9\n-+#  ifndef TCL_SIZE_MAX\n-+#    define TCL_SIZE_MAX INT_MAX\n-+#    ifndef Tcl_Size\n-+       typedef int Tcl_Size;\n-+#    endif\n-+#    define TCL_SIZE_MODIFIER \"\"\n-+#    define TCL_Z_MODIFIER    \"\"\n-+#  endif\n-+#  define Tcl_CreateObjCommand2 Tcl_CreateObjCommand\n-+#  define Tcl_ObjCmdProc2       Tcl_ObjCmdProc\n-+#  define Tcl_CreateObjTrace2   Tcl_CreateObjTrace\n-+#  define Tcl_CmdObjTraceProc2  Tcl_CmdObjTraceProc\n-+#  define Tcl_GetIntForIndex    TclGetIntForIndex\n-+#else\n-+#  ifndef TCL_RESULT_SIZE\n-+#    define TCL_RESULT_SIZE 200\n-+#  endif\n-+#endif\n-+\n-+/*\n-  * Internal interp flags compatibility - removed in Tcl 8.5 sources.\n-  */\n- #ifndef ERR_IN_PROGRESS\n-@@ -209,7 +232,7 @@\n- \n- extern int\n- TclX_CreateObjCommand (Tcl_Interp* interp, char* cmdName,\n--                       Tcl_ObjCmdProc *proc, ClientData clientData,\n-+                       Tcl_ObjCmdProc2 *proc, ClientData clientData,\n-                        Tcl_CmdDeleteProc *deleteProc, int flags);\n- \n- extern void *\n-@@ -282,8 +305,8 @@\n- extern int\n- TclX_RelativeExpr (Tcl_Interp  *interp,\n-                    Tcl_Obj     *exprPtr,\n--                   int          stringLen,\n--                   int         *exprResultPtr);\n-+                   Tcl_Size     stringLen,\n-+                   Tcl_Size    *exprResultPtr);\n- \n- extern int\n- TclX_SetChannelOption (Tcl_Interp  *interp,\n---- a/generic/tclXbsearch.c\n-+++ b/generic/tclXbsearch.c\n-@@ -51,7 +51,7 @@\n- static int \n- TclX_BsearchObjCmd (ClientData clientData, \n-                     Tcl_Interp *interp,\n--                    int objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj *const objv[]);\n- \n- /*-----------------------------------------------------------------------------\n-@@ -295,7 +295,7 @@\n- static int\n- TclX_BsearchObjCmd (ClientData clientData,\n-                     Tcl_Interp *interp,\n--                    int objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj *const objv[])\n- {\n-     int status;\n-@@ -343,7 +343,7 @@\n-         valPtr = Tcl_NewStringObj (Tcl_DStringValue (&searchCB.lineBuf),\n-                                    -1);\n-         if (Tcl_ObjSetVar2(interp, objv[3], NULL, valPtr,\n--                           TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {\n-+                           TCL_LEAVE_ERR_MSG) == NULL) {\n-             Tcl_DecrRefCount (valPtr);\n-             goto errorExit;\n-         }\n-@@ -367,7 +367,7 @@\n- void\n- TclX_BsearchInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n-                           \"bsearch\",\n-                           TclX_BsearchObjCmd, \n-                           (ClientData) NULL,\n---- a/generic/tclXchmod.c\n-+++ b/generic/tclXchmod.c\n-@@ -38,20 +38,20 @@\n- static int \n- TclX_ChmodObjCmd (ClientData clientData, \n-                   Tcl_Interp *interp,\n--                  int objc,\n--                  Tcl_Obj *const objv[]);\n-+                  Tcl_Size objc,\n-+                  Tcl_Obj *const *objv);\n- \n- static int \n- TclX_ChownObjCmd (ClientData clientData, \n-                   Tcl_Interp *interp,\n--                  int objc,\n--                  Tcl_Obj *const objv[]);\n-+                  Tcl_Size objc,\n-+                  Tcl_Obj *const *objv);\n- \n- static int \n- TclX_ChgrpObjCmd (ClientData clientData, \n-                   Tcl_Interp *interp,\n--                  int objc,\n--                  Tcl_Obj *const objv[]);\n-+                  Tcl_Size objc,\n-+                  Tcl_Obj *const *objv);\n- \n- \f\n- /*-----------------------------------------------------------------------------\n-@@ -306,9 +306,10 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static int\n--TclX_ChmodObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])\n-+TclX_ChmodObjCmd (ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const *objv)\n- {\n--    int           objIdx, idx, fileObjc, fileIds, result;\n-+    Tcl_Size      objIdx, idx, fileObjc;\n-+    int           fileIds, result;\n-     modeInfo_t    modeInfo;\n-     Tcl_Obj     **fileObjv;\n-     char         *fileIdsString;\n-@@ -333,15 +334,55 @@\n- \treturn TclX_WrongArgs (interp, objv [0], \"[-fileid] mode filelist\");\n- \n-     modeString = Tcl_GetStringFromObj (objv [objIdx], NULL);\n-+#if TCL_MAJOR_VERSION > 8\n-+    /*\n-+     * Tcl 9 treats leading-0 integers as decimal, not octal.  We must\n-+     * parse octal manually and accept the explicit 0d prefix for decimal.\n-+     */\n-+    if (modeString[0] == '0' && modeString[1] == 'd') {\n-+\n-+      /* Allow special case for explicit decimal representation */\n-+      if (Tcl_GetIntFromObj (interp, objv [objIdx], &modeBits) != TCL_OK) {\n-+\treturn TCL_ERROR;\n-+      }\n-+      modeInfo.absMode = modeBits;\n-+      modeInfo.symMode = NULL;\n-+\n-+    } else if (ISDIGIT (modeString[0])) {\n-+\n-+      /* parse out the octal number */\n-+        int i = 0;\n-+\tmodeBits = 0;\n-+\twhile (modeString[i]) {\n-+\t    if ((!ISDIGIT(modeString[i])) || modeString[i] > '7') {\n-+\t        return TCL_ERROR;\n-+\t    }\n-+\t    modeBits = (modeBits << 3 | (0x7 & (modeString[i] - '0')));\n-+\t    i++;\n-+\t}\n-+\tmodeInfo.absMode = modeBits;\n-+        modeInfo.symMode = NULL;\n-+\n-+    } else {\n-+        /* String mode */\n-+        modeInfo.absMode = 0;\n-+        modeInfo.symMode = modeString;\n-+    }\n-+#else\n-+    /*\n-+     * Tcl 8: Tcl_GetIntFromObj handles 0-prefixed integers as octal.\n-+     */\n-     if (ISDIGIT (modeString[0])) {\n--        if (Tcl_GetIntFromObj (interp, objv [objIdx], &modeBits) \n-+        if (Tcl_GetIntFromObj (interp, objv [objIdx], &modeBits)\n- \t  != TCL_OK)\n-             return TCL_ERROR;\n- \tmodeInfo.absMode = modeBits;\n-         modeInfo.symMode = NULL;\n-     } else {\n-+        modeInfo.absMode = 0;\n-         modeInfo.symMode = modeString;\n-     }\n-+#endif\n- \n-     if (Tcl_ListObjGetElements (interp, objv [objIdx + 1], &fileObjc,\n-                        &fileObjv) != TCL_OK)\n-@@ -371,14 +412,15 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static int\n--TclX_ChownObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])\n-+TclX_ChownObjCmd (ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const *objv)\n- {\n--    int        objIdx, ownerObjc, fileIds;\n-+    Tcl_Size   objIdx, ownerObjc;\n-+    int        fileIds;\n-     Tcl_Obj  **ownerObjv = NULL;\n-     unsigned   options;\n-     char      *fileIdsSwitch;\n-     char      *owner, *group;\n--    int        groupStrLen;\n-+    Tcl_Size   groupStrLen;\n- \n- \n-     /*\n-@@ -455,7 +497,7 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static int\n--TclX_ChgrpObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])\n-+TclX_ChgrpObjCmd (ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const *objv)\n- {\n-     int        objIdx, fileIds;\n-     char      *fileIdsSwitch, *groupString;\n-@@ -505,19 +547,19 @@\n- void\n- TclX_ChmodInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"chgrp\",\n- \t\t\t  TclX_ChgrpObjCmd,\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"chmod\",\n- \t\t\t  TclX_ChmodObjCmd,\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n-                           \"chown\",\n- \t\t\t  TclX_ChownObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXcmdloop.c\n-+++ b/generic/tclXcmdloop.c\n-@@ -71,7 +71,7 @@\n- static int \n- TclX_CommandloopObjCmd (ClientData clientData, \n-                         Tcl_Interp *interp,\n--                        int objc,\n-+                        Tcl_Size objc,\n-                         Tcl_Obj *const objv[]);\n- \f\n- /*-----------------------------------------------------------------------------\n-@@ -665,7 +665,7 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static int\n--TclX_CommandloopObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])\n-+TclX_CommandloopObjCmd (ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])\n- {\n-     int options = 0, async = FALSE, argIdx, interactive;\n-     char *argStr,  *endCommand = NULL;\n-@@ -757,7 +757,7 @@\n- void\n- TclX_CmdloopInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n-                           \"commandloop\",\n-                           TclX_CommandloopObjCmd, \n-                           (ClientData) NULL,\n---- a/generic/tclXcoalesce.c\n-+++ b/generic/tclXcoalesce.c\n-@@ -29,7 +29,7 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static int\n--TclX_CoalesceObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])\n-+TclX_CoalesceObjCmd (ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])\n- {\n-     int i;\n-     Tcl_Obj *val;\n-@@ -76,13 +76,13 @@\n- void\n- TclX_CoalesceInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"coalesce\",\n- \t\t\t  TclX_CoalesceObjCmd,\n-               (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"tcl::mathfunc::coalesce\",\n- \t\t\t  TclX_CoalesceObjCmd,\n-               (ClientData) NULL,\n---- a/generic/tclXdebug.c\n-+++ b/generic/tclXdebug.c\n-@@ -89,7 +89,7 @@\n- static int\n- TclX_CmdtraceObjCmd (ClientData clientData, \n-                      Tcl_Interp *interp,\n--                     int objc,\n-+                     Tcl_Size objc,\n-                      Tcl_Obj *const objv[]);\n- \n- static void\n-@@ -304,7 +304,7 @@\n-     sprintf (numBuf, \"%d\", level);\n-     Tcl_DStringAppendElement (&callback, numBuf);\n- \n--    sprintf (numBuf, \"%d\",  ((iPtr->varFramePtr == NULL) ? 0 : \n-+    sprintf (numBuf, \"%\" TCL_Z_MODIFIER \"d\",  ((iPtr->varFramePtr == NULL) ? 0 : \n-              iPtr->varFramePtr->level));\n-     Tcl_DStringAppendElement (&callback, numBuf);\n- \n-@@ -386,7 +386,7 @@\n- static int\n- TclX_CmdtraceObjCmd (ClientData clientData,\n-                      Tcl_Interp *interp,\n--                     int objc,\n-+                     Tcl_Size objc,\n-                      Tcl_Obj *const objv[])\n- {\n-     traceInfo_pt  infoPtr = (traceInfo_pt) clientData;\n-@@ -570,7 +570,7 @@\n- \n-     Tcl_CallWhenDeleted (interp, DebugCleanUp, (ClientData) infoPtr);\n- \n--    Tcl_CreateObjCommand (interp, \"cmdtrace\",\n-+    Tcl_CreateObjCommand2 (interp, \"cmdtrace\",\n-                           TclX_CmdtraceObjCmd, \n-                           (ClientData) infoPtr,\n-                           (Tcl_CmdDeleteProc*) NULL);\n---- a/generic/tclXdup.c\n-+++ b/generic/tclXdup.c\n-@@ -33,7 +33,7 @@\n- static int\n- TclX_DupObjCmd (ClientData   clientData,\n-                 Tcl_Interp  *interp,\n--                int          objc,\n-+                Tcl_Size     objc,\n-                 Tcl_Obj     *const objv[]);\n- \n- \f\n-@@ -57,7 +57,7 @@\n- {\n-     Tcl_DString strValues;\n-     const char *option, *value, **optArgv = NULL;\n--    int optArgc, idx;\n-+    Tcl_Size optArgc, idx;\n- \n-     Tcl_DStringInit (&strValues);\n- \n-@@ -192,11 +192,11 @@\n- static int\n- TclX_DupObjCmd (ClientData clientData,\n-                 Tcl_Interp *interp,\n--                int objc,\n-+                Tcl_Size objc,\n-                 Tcl_Obj *const objv[])\n- {\n-     Tcl_Channel newChannel;\n--    int bindFnum, fnum;\n-+    int fnum;\n-     char *srcChannelId, *targetChannelId;\n- \n-     if ((objc < 2) || (objc > 3)) {\n-@@ -208,24 +208,22 @@\n-      * If a number is supplied, bind it to a file handle rather than doing\n-      * a dup.\n-      */\n--    if (objv [1]->typePtr == Tcl_GetObjType (\"int\")) {\n--        bindFnum = TRUE;\n--    } else {\n--        srcChannelId = Tcl_GetStringFromObj (objv [1], NULL);\n--        if (ISDIGIT (srcChannelId [0])) {\n--            if (Tcl_ConvertToType (interp, objv [1],\n--                                   Tcl_GetObjType (\"int\")) != TCL_OK)\n--                goto badFnum;\n--            bindFnum = TRUE;\n--        } else {\n--            bindFnum = FALSE;\n--        }\n--    }\n--    if (bindFnum) {\n--        if (objc != 2)\n--            goto bind2ndArg;\n--        if (Tcl_GetIntFromObj (interp, objv [1], &fnum) != TCL_OK)\n-+    srcChannelId = Tcl_GetStringFromObj (objv [1], NULL);\n-+    if (ISDIGIT (srcChannelId [0])) {\n-+        if (Tcl_GetIntFromObj (interp, objv [1], &fnum) != TCL_OK) {\n-+\t    Tcl_ResetResult (interp);\n-+\t    TclX_AppendObjResult (interp, \"invalid integer file number \\\"\",\n-+\t\t\t\t  Tcl_GetStringFromObj (objv [1], NULL),\n-+\t\t\t\t  \"\\\", expected unsigned integer or Tcl file id\",\n-+\t\t\t\t  (char *) NULL);\n-             return TCL_ERROR;\n-+\t}\n-+\tif (objc != 2) {\n-+\t    TclX_AppendObjResult (interp, \"the second argument, targetChannelId, \",\n-+\t\t\t\t  \"is not allow when binding a file number to \",\n-+\t\t\t\t  \"a Tcl channel\", (char *) NULL);\n-+\t    return TCL_ERROR;\n-+\t}\n-         newChannel = TclXOSBindOpenFile (interp,  fnum);\n-     } else {\n-         if (objc > 2) {\n-@@ -237,27 +235,14 @@\n-                                      srcChannelId,\n-                                      targetChannelId);\n-     }\n--    if (newChannel == NULL)\n--        return TCL_ERROR;\n-+    if (newChannel == NULL) {\n-+      return TCL_ERROR;\n-+    }\n- \n-     Tcl_RegisterChannel (interp, newChannel);\n-     Tcl_SetStringObj (Tcl_GetObjResult (interp),\n-                       Tcl_GetChannelName (newChannel), -1);\n-     return TCL_OK;\n--\n--  badFnum:\n--    Tcl_ResetResult (interp);\n--    TclX_AppendObjResult (interp, \"invalid integer file number \\\"\",\n--                          Tcl_GetStringFromObj (objv [1], NULL),\n--                          \"\\\", expected unsigned integer or Tcl file id\",\n--                          (char *) NULL);\n--    return TCL_ERROR;\n--\n--  bind2ndArg:\n--    TclX_AppendObjResult (interp, \"the second argument, targetChannelId, \",\n--                          \"is not allow when binding a file number to \",\n--                          \"a Tcl channel\", (char *) NULL);\n--    return TCL_ERROR;\n- }\n- \n- /*-----------------------------------------------------------------------------\n-@@ -271,7 +256,7 @@\n- void\n- TclX_DupInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"dup\",\n- \t\t\t  TclX_DupObjCmd, \n-                           (ClientData) NULL,\n---- a/generic/tclXfcntl.c\n-+++ b/generic/tclXfcntl.c\n-@@ -84,7 +84,7 @@\n- static int \n- TclX_FcntlObjCmd (ClientData clientData, \n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size objc,\n-                   Tcl_Obj *const objv[]);\n- \n- \f\n-@@ -278,7 +278,7 @@\n- static int\n- TclX_FcntlObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size objc,\n-                   Tcl_Obj *const objv[])\n- {\n-     Tcl_Channel  channel;\n-@@ -322,7 +322,7 @@\n- void\n- TclX_FcntlInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"fcntl\",\n- \t\t\t  TclX_FcntlObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXfilecmds.c\n-+++ b/generic/tclXfilecmds.c\n-@@ -38,19 +38,19 @@\n- static int \n- TclX_PipeObjCmd (ClientData  clientData,\n-                  Tcl_Interp *interp,\n--                 int         objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj    *const objv[]);\n- \n- static int\n- TclX_FtruncateObjCmd (ClientData  clientData, \n-                       Tcl_Interp *interp, \n--                      int         objc,\n-+                      Tcl_Size    objc,\n-                       Tcl_Obj    *const objv[]);\n- \n- static int\n- TclX_ReaddirObjCmd (ClientData clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size    objc,\n-                     Tcl_Obj    *const objv[]);\n- \n- \f\n-@@ -66,7 +66,7 @@\n- static int \n- TclX_PipeObjCmd (ClientData  clientData,\n-                  Tcl_Interp *interp,\n--                 int         objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj    *const objv[])\n- {\n-     Tcl_Channel   channels [2];\n-@@ -87,12 +87,12 @@\n-                               channelNames [1], (char *) NULL);\n-     } else {\n-         if (Tcl_ObjSetVar2(interp, objv[1], NULL, Tcl_NewStringObj(channelNames [0], -1),\n--                           TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL)\n-+                           TCL_LEAVE_ERR_MSG) == NULL)\n-             goto errorExit;\n- \n-         if (Tcl_ObjSetVar2(interp, objv[2], NULL,\n-                            Tcl_NewStringObj(channelNames [1], -1),\n--                           TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL)\n-+                           TCL_LEAVE_ERR_MSG) == NULL)\n-             goto errorExit;\n-     }\n- \n-@@ -159,10 +159,11 @@\n- static int\n- TclX_FtruncateObjCmd (ClientData clientData,\n-                       Tcl_Interp *interp,\n--                      int objc,\n-+                      Tcl_Size objc,\n-                       Tcl_Obj *const objv[])\n- {\n--    int           objIdx, fileIds;\n-+    Tcl_Size      objIdx;\n-+    int           fileIds;\n-     off_t         newSize;\n-     long          convSize;\n-     Tcl_Channel   channel;\n-@@ -246,7 +247,7 @@\n- static int\n- TclX_ReaddirObjCmd (ClientData clientData,\n-                     Tcl_Interp *interp,\n--                    int objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj *const objv[])\n- {\n-     Tcl_DString  pathBuf;\n-@@ -254,7 +255,7 @@\n-     int          hidden, status;\n-     Tcl_Obj     *fileListObj;\n-     char        *switchString;\n--    int          dirPathLen;\n-+    Tcl_Size     dirPathLen;\n-     \n-     if ((objc < 2) || (objc > 3))\n-         return TclX_WrongArgs (interp, objv [0], \"?-hidden? dirPath\");\n-@@ -310,19 +311,19 @@\n- void\n- TclX_FilecmdsInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"pipe\",\n- \t\t\t  TclX_PipeObjCmd,\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"ftruncate\",\n- \t\t\t  TclX_FtruncateObjCmd,\n- \t\t\t  (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n-                           \"readdir\",\n- \t\t\t  TclX_ReaddirObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXfilescan.c\n-+++ b/generic/tclXfilescan.c\n-@@ -83,13 +83,13 @@\n- static int\n- TclX_ScancontextObjCmd (ClientData  clientData,\n-                         Tcl_Interp *interp,\n--                        int         objc,\n-+                        Tcl_Size    objc,\n-                         Tcl_Obj    *const objv[]);\n- \n- static int\n- TclX_ScanmatchObjCmd (ClientData  clientData,\n-                       Tcl_Interp *interp,\n--                      int         objc,\n-+                      Tcl_Size    objc,\n-                       Tcl_Obj    *const objv[]);\n- \n- static void\n-@@ -118,7 +118,7 @@\n- static int\n- TclX_ScanfileObjCmd (ClientData  clientData,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size    objc,\n-                      Tcl_Obj    *const objv[]);\n- \n- static void\n-@@ -330,7 +330,7 @@\n- static int\n- TclX_ScancontextObjCmd (ClientData clientData,\n-                         Tcl_Interp *interp,\n--                        int objc,\n-+                        Tcl_Size objc,\n-                         Tcl_Obj *const objv[])\n- {\n-     char *subCommand;\n-@@ -393,12 +393,12 @@\n- static int\n- TclX_ScanmatchObjCmd (ClientData clientData,\n-                       Tcl_Interp *interp,\n--                      int objc, Tcl_Obj *const objv[])\n-+                      Tcl_Size objc, Tcl_Obj *const objv[])\n- {\n-     scanContext_t  *contextPtr, **tableEntryPtr;\n-     matchDef_t     *newmatch;\n-     int             regExpFlags = TCL_REG_ADVANCED;\n--    int             firstArg = 1;\n-+    Tcl_Size        firstArg = 1;\n- \n-     if (objc < 3)\n-         goto argError;\n-@@ -775,7 +775,7 @@\n- static int\n- TclX_ScanfileObjCmd (ClientData clientData,\n-                      Tcl_Interp *interp,\n--                     int objc,\n-+                     Tcl_Size objc,\n-                      Tcl_Obj *const objv[])\n- {\n-     scanContext_t *contextPtr, **tableEntryPtr;\n-@@ -888,19 +888,19 @@\n-     /*\n-      * Initialize the commands.\n-      */\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"scanfile\",\n- \t\t\t  TclX_ScanfileObjCmd,\n-                           (ClientData) scanTablePtr,\n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"scanmatch\",\n- \t\t\t  TclX_ScanmatchObjCmd,\n-                           (ClientData) scanTablePtr, \n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"scancontext\",\n- \t\t\t  TclX_ScancontextObjCmd,\n-                           (ClientData) scanTablePtr,\n---- a/generic/tclXflock.c\n-+++ b/generic/tclXflock.c\n-@@ -24,7 +24,7 @@\n-  */\n- static int\n- ParseLockUnlockArgs (Tcl_Interp     *interp,\n--                     int             objc,\n-+                     Tcl_Size        objc,\n-                      Tcl_Obj *const  objv[],\n-                      int             argIdx,\n-                      TclX_FlockInfo *lockInfoPtr);\n-@@ -32,13 +32,13 @@\n- static int\n- TclX_FlockObjCmd (ClientData clientData, \n-                   Tcl_Interp *interp,\n--                  int         objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj    *const objv[]);\n- \n- static int\n- TclX_FunlockObjCmd (ClientData clientData, \n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size    objc,\n-                      Tcl_Obj    *const objv[]);\n- \n- \f\n-@@ -65,7 +65,7 @@\n-  */\n- static int\n- ParseLockUnlockArgs (Tcl_Interp     *interp,\n--                     int             objc,\n-+                     Tcl_Size        objc,\n-                      Tcl_Obj *const  objv[],\n-                      int             argIdx,\n-                      TclX_FlockInfo *lockInfoPtr)\n-@@ -123,7 +123,7 @@\n- static int\n- TclX_FlockObjCmd (ClientData clientData, \n-                   Tcl_Interp *interp,\n--                  int         objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj    *const objv[])\n- {\n-     int argIdx;\n-@@ -207,7 +207,7 @@\n- static int\n- TclX_FunlockObjCmd (ClientData clientData, \n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size    objc,\n-                      Tcl_Obj    *const objv[])\n- {\n-     TclX_FlockInfo lockInfo;\n-@@ -233,13 +233,13 @@\n- void\n- TclX_FlockInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n-                           \"flock\",\n-                           TclX_FlockObjCmd,\n-                           (ClientData) NULL,\n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n-                           \"funlock\",\n-                           TclX_FunlockObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXgeneral.c\n-+++ b/generic/tclXgeneral.c\n-@@ -32,25 +32,25 @@\n- static int \n- TclX_EchoObjCmd (ClientData clientData, \n-                  Tcl_Interp *interp,\n--                 int         objc,\n-+                 Tcl_Size         objc,\n-                  Tcl_Obj    *const objv[]);\n- \n- static int \n- TclX_InfoxObjCmd (ClientData clientData, \n-                   Tcl_Interp *interp,\n--                  int         objc,\n-+                  Tcl_Size         objc,\n-                   Tcl_Obj    *const objv[]);\n- \n- static int \n- TclX_LoopObjCmd (ClientData clientData, \n-                  Tcl_Interp *interp,\n--                 int         objc,\n-+                 Tcl_Size         objc,\n-                  Tcl_Obj    *const objv[]);\n- \n- static int\n- SetLoopCounter (Tcl_Interp *interp,\n-                 char *varName,\n--                int idx);\n-+                Tcl_Size idx);\n- \n- static int\n- GlobalImport (Tcl_Interp *interp);\n-@@ -58,7 +58,7 @@\n- static int\n- TclX_Try_EvalObjCmd (ClientData clientData, \n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size         objc,\n-                      Tcl_Obj    *const objv[]);\n- \n- \f\n-@@ -118,14 +118,14 @@\n- static int\n- TclX_EchoObjCmd (ClientData dummy,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj *const objv[])\n- {\n--    int\t  idx;\n-+    Tcl_Size\t  idx;\n-     Tcl_Channel channel;\n- #ifndef TCL_UTF_MAX\n-     char *stringPtr;\n--    int stringPtrLen;\n-+    Tcl_Size stringPtrLen;\n- #endif\n- \n-     channel = TclX_GetOpenChannel (interp, \"stdout\", TCL_WRITABLE);\n-@@ -163,7 +163,7 @@\n- static int\n- TclX_InfoxObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size objc,\n-                   Tcl_Obj *const objv[])\n- {\n-     Tcl_Obj *resultPtr = Tcl_GetObjResult (interp);\n-@@ -317,11 +317,11 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static int\n--SetLoopCounter (Tcl_Interp *interp, char *varName, int idx)\n-+SetLoopCounter (Tcl_Interp *interp, char *varName, Tcl_Size idx)\n- {\n-     Tcl_Obj *iObj, *newVarObj;\n- \n--    iObj = Tcl_GetVar2Ex(interp, varName, NULL, TCL_PARSE_PART1);\n-+    iObj = Tcl_GetVar2Ex(interp, varName, NULL, 0);\n-     if ((iObj == NULL) || (Tcl_IsShared (iObj))) {\n- \tiObj = newVarObj = Tcl_NewLongObj (idx);\n-     } else {\n-@@ -330,7 +330,7 @@\n- \n-     Tcl_SetLongObj (iObj, idx);\n-     if (Tcl_SetVar2Ex(interp, varName, NULL, iObj,\n--\t    TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {\n-+\t    TCL_LEAVE_ERR_MSG) == NULL) {\n- \tif (newVarObj != NULL) {\n- \t    Tcl_DecrRefCount (newVarObj);\n- \t}\n-@@ -352,7 +352,7 @@\n- static int\n- TclX_LoopObjCmd (ClientData dummy,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj *const objv[])\n- {\n-     int result = TCL_OK;\n-@@ -432,7 +432,8 @@\n-     Tcl_CmdInfo cmdInfo;\n- #define globalObjc (4)\n-     Tcl_Obj *globalObjv [globalObjc];\n--    int idx, code = TCL_OK;\n-+    Tcl_Size idx;\n-+    int code = TCL_OK;\n- \n-     savedResult = Tcl_DuplicateObj (Tcl_GetObjResult (interp));\n- \n-@@ -450,11 +451,24 @@\n-     for (idx = 0; idx < globalObjc; idx++) {\n-         Tcl_IncrRefCount (globalObjv [idx]);\n-     }\n-+\n-+    switch (cmdInfo.isNativeObjectProc) {\n-+    case 1:\n-+      code = (*cmdInfo.objProc) (cmdInfo.objClientData,\n-+\t\t\t\t interp,\n-+\t\t\t\t globalObjc,\n-+\t\t\t\t globalObjv);\n-+      break;\n-+#if TCL_MAJOR_VERSION > 8\n-+    case 2:\n-+      code = (*cmdInfo.objProc2) (cmdInfo.objClientData2,\n-+\t\t\t\t  interp,\n-+\t\t\t\t  globalObjc,\n-+\t\t\t\t  globalObjv);\n-+      break;\n-+#endif\n-+    }\n-     \n--    code = (*cmdInfo.objProc) (cmdInfo.objClientData,\n--                               interp,\n--                               globalObjc,\n--                               globalObjv);\n-     for (idx = 0; idx < globalObjc; idx++) {\n-         Tcl_DecrRefCount (globalObjv [idx]);\n-     }\n-@@ -483,7 +497,7 @@\n- static int\n- TclX_Try_EvalObjCmd (ClientData  dummy,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size         objc,\n-                      Tcl_Obj *const objv[])\n- {\n-     int code, code2;\n-@@ -553,25 +567,25 @@\n- void\n- TclX_GeneralInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n-                           \"echo\",\n-                           TclX_EchoObjCmd,\n-                           (ClientData) NULL,\n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n-                          \"infox\",\n-                          TclX_InfoxObjCmd,\n-                          (ClientData) NULL,\n-                          (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n-                          \"loop\",\n-                          TclX_LoopObjCmd,\n-                          (ClientData) NULL,\n-                          (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n-                          \"try_eval\",\n-                          TclX_Try_EvalObjCmd,\n-                          (ClientData) NULL,\n---- a/generic/tclXinit.c\n-+++ b/generic/tclXinit.c\n-@@ -77,9 +77,9 @@\n- {\n-     if (\n- #ifdef USE_TCL_STUBS\n--\t(Tcl_InitStubs(interp, \"8.0\", 0) == NULL)\n-+\t(Tcl_InitStubs(interp, \"8.5-10\", 0) == NULL)\n- #else\n--\t(Tcl_PkgRequire(interp, \"Tcl\", \"8.0\", 0) == NULL)\n-+\t(Tcl_PkgRequire(interp, \"Tcl\", \"8.5-10\", 0) == NULL)\n- #endif\n- \t|| (Tclxcmd_Init(interp) != TCL_OK)\n- \t|| (Tcl_PkgProvide(interp, \"Tclx\", PACKAGE_VERSION) != TCL_OK)\n---- a/generic/tclXkeylist.c\n-+++ b/generic/tclXkeylist.c\n-@@ -54,8 +54,8 @@\n-  * Internal representation of a keyed list object.\n-  */\n- typedef struct {\n--    int\t\t arraySize;   /* Current slots available in the array.\t*/\n--    int\t\t numEntries;  /* Number of actual entries in the array. */\n-+    Tcl_Size\t arraySize;   /* Current slots available in the array.\t*/\n-+    Tcl_Size\t numEntries;  /* Number of actual entries in the array. */\n-     keylEntry_t *entries;     /* Array of keyed list entries.\t\t*/\n- #ifndef NO_KEYLIST_HASH_TABLE\n-     Tcl_HashTable *hashTbl;   /* hash table mirror of the entries */\n-@@ -144,26 +144,26 @@\n- static int \n- TclX_KeylgetObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int\t     objc,\n--                    Tcl_Obj\t    *const objv[]);\n-+                    Tcl_Size     objc,\n-+                    Tcl_Obj\t*const objv[]);\n- \n- static int\n- TclX_KeylsetObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int\t     objc,\n--                    Tcl_Obj\t    *const objv[]);\n-+                    Tcl_Size     objc,\n-+                    Tcl_Obj     *const objv[]);\n- \n- static int \n- TclX_KeyldelObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int\t     objc,\n--                    Tcl_Obj\t    *const objv[]);\n-+                    Tcl_Size     objc,\n-+                    Tcl_Obj     *const objv[]);\n- \n- static int \n--TclX_KeylkeysObjCmd (ClientData   clientData,\n--                     Tcl_Interp  *interp,\n--                     int\t      objc,\n--                     Tcl_Obj     *const objv[]);\n-+TclX_KeylkeysObjCmd (ClientData     clientData,\n-+                     Tcl_Interp    *interp,\n-+                     Tcl_Size       objc,\n-+                     Tcl_Obj *const objv[]);\n- \n- /*\n-  * Type definition.\n-@@ -278,14 +278,14 @@\n- \tTcl_DecrRefCount(keylIntPtr->entries [idx].valuePtr);\n-     }\n-     if (keylIntPtr->entries != NULL)\n--\tckfree ((VOID*) keylIntPtr->entries);\n-+\tckfree ((void*) keylIntPtr->entries);\n- #ifndef NO_KEYLIST_HASH_TABLE\n-     if (keylIntPtr->hashTbl != NULL) {\n- \tTcl_DeleteHashTable(keylIntPtr->hashTbl);\n- \tckfree((char *) (keylIntPtr->hashTbl));\n-     }\n- #endif\n--    ckfree ((VOID*) keylIntPtr);\n-+    ckfree ((void*) keylIntPtr);\n- }\n- \f\n- /*-----------------------------------------------------------------------------\n-@@ -312,7 +312,7 @@\n- \t\tckalloc (newSize * sizeof (keylEntry_t));\n- \t} else {\n- \t    keylIntPtr->entries = (keylEntry_t *)\n--\t\tckrealloc ((VOID *) keylIntPtr->entries,\n-+\t\tckrealloc ((void *) keylIntPtr->entries,\n- \t\t\t   newSize * sizeof (keylEntry_t));\n- \t}\n- \tkeylIntPtr->arraySize = newSize;\n-@@ -520,7 +520,7 @@\n- #endif\n-     }\n- \n--    copyPtr->internalRep.otherValuePtr = (VOID *) copyIntPtr;\n-+    copyPtr->internalRep.otherValuePtr = (void *) copyIntPtr;\n-     copyPtr->typePtr = &keyedListType;\n- \n-     KEYL_REP_ASSERT (copyIntPtr);\n-@@ -542,7 +542,7 @@\n-     keylIntObj_t *keylIntPtr;\n-     keylEntry_t *keyEntryPtr;\n-     char *key;\n--    int keyLen, idx, objc, subObjc;\n-+    Tcl_Size keyLen, idx, objc, subObjc;\n-     Tcl_Obj **objv, **subObjv;\n- #ifndef NO_KEYLIST_HASH_TABLE\n-     int dummy;\n-@@ -605,7 +605,7 @@\n- \t(objPtr->typePtr->freeIntRepProc != NULL)) {\n- \t(*objPtr->typePtr->freeIntRepProc) (objPtr);\n-     }\n--    objPtr->internalRep.otherValuePtr = (VOID *) keylIntPtr;\n-+    objPtr->internalRep.otherValuePtr = (void *) keylIntPtr;\n-     objPtr->typePtr = &keyedListType;\n- \n-     KEYL_REP_ASSERT (keylIntPtr);\n-@@ -624,7 +624,7 @@\n- UpdateStringOfKeyedList (Tcl_Obj *keylPtr)\n- {\n- #define UPDATE_STATIC_SIZE 32\n--    int idx, strLen;\n-+    Tcl_Size idx, strLen;\n-     Tcl_Obj **listObjv, *entryObjv [2], *tmpListObj;\n-     Tcl_Obj *staticListObjv [UPDATE_STATIC_SIZE];\n-     char *listStr;\n-@@ -662,7 +662,7 @@\n-     Tcl_DecrRefCount(tmpListObj);\n- \n-     if (listObjv != staticListObjv)\n--\tckfree ((VOID*) listObjv);\n-+\tckfree ((void*) listObjv);\n- }\n- \f\n- /*-----------------------------------------------------------------------------\n-@@ -679,7 +679,7 @@\n-     Tcl_Obj *keylPtr = Tcl_NewObj ();\n-     keylIntObj_t *keylIntPtr = AllocKeyedListIntRep ();\n- \n--    keylPtr->internalRep.otherValuePtr = (VOID *) keylIntPtr;\n-+    keylPtr->internalRep.otherValuePtr = (void *) keylIntPtr;\n-     keylPtr->typePtr = &keyedListType;\n-     return keylPtr;\n- }\n-@@ -1007,12 +1007,13 @@\n- static int\n- TclX_KeylgetObjCmd (ClientData      clientData,\n-                     Tcl_Interp     *interp,\n--                    int             objc,\n-+                    Tcl_Size        objc,\n-                     Tcl_Obj *const objv[])\n- {\n-     Tcl_Obj *keylPtr, *valuePtr;\n-     char *key;\n--    int keyLen, status;\n-+    Tcl_Size keyLen;\n-+    int status;\n- \n-     if ((objc < 2) || (objc > 4)) {\n- \treturn TclX_WrongArgs (interp, objv [0],\n-@@ -1085,12 +1086,13 @@\n- static int\n- TclX_KeylsetObjCmd (ClientData     clientData,\n-                     Tcl_Interp    *interp,\n--                    int            objc,\n-+                    Tcl_Size       objc,\n-                     Tcl_Obj *const objv[])\n- {\n-     Tcl_Obj *keylVarPtr, *newVarObj;\n-     char *key;\n--    int idx, keyLen, result = TCL_OK;\n-+    Tcl_Size idx, keyLen;\n-+    int result = TCL_OK;\n- \n-     if ((objc < 4) || ((objc % 2) != 0)) {\n- \treturn TclX_WrongArgs (interp, objv [0],\n-@@ -1144,12 +1146,13 @@\n- static int\n- TclX_KeyldelObjCmd (ClientData  clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size    objc,\n-                     Tcl_Obj    *const objv[])\n- {\n-     Tcl_Obj *keylVarPtr, *keylPtr;\n-     char *key;\n--    int idx, keyLen, status;\n-+    Tcl_Size idx, keyLen;\n-+    int status;\n- \n-     if (objc < 3) {\n- \treturn TclX_WrongArgs (interp, objv [0], \"listvar key ?key ...?\");\n-@@ -1205,12 +1208,13 @@\n- static int\n- TclX_KeylkeysObjCmd (ClientData   clientData,\n-                      Tcl_Interp  *interp,\n--                     int          objc,\n-+                     Tcl_Size     objc,\n-                      Tcl_Obj     *const objv[])\n- {\n-     Tcl_Obj *keylPtr, *listObjPtr;\n-     char *key;\n--    int keyLen, status;\n-+    Tcl_Size keyLen;\n-+    int status;\n- \n-     if ((objc < 2) || (objc > 3)) {\n- \treturn TclX_WrongArgs (interp, objv [0], \"listvar ?key?\");\n-@@ -1262,16 +1266,16 @@\n- {\n-     Tcl_RegisterObjType (&keyedListType);\n- \n--    Tcl_CreateObjCommand (interp, \"keylget\", TclX_KeylgetObjCmd,\n-+    Tcl_CreateObjCommand2 (interp, \"keylget\", TclX_KeylgetObjCmd,\n- \t    (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \"keylset\", TclX_KeylsetObjCmd,\n-+    Tcl_CreateObjCommand2 (interp, \"keylset\", TclX_KeylsetObjCmd,\n- \t    (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \"keyldel\", TclX_KeyldelObjCmd,\n-+    Tcl_CreateObjCommand2 (interp, \"keyldel\", TclX_KeyldelObjCmd,\n- \t    (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \"keylkeys\", TclX_KeylkeysObjCmd,\n-+    Tcl_CreateObjCommand2 (interp, \"keylkeys\", TclX_KeylkeysObjCmd,\n- \t    (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n- }\n- \n---- a/generic/tclXlgets.c\n-+++ b/generic/tclXlgets.c\n-@@ -56,7 +56,7 @@\n- static int \n- TclX_LgetsObjCmd (ClientData  clientData, \n-                  Tcl_Interp  *interp, \n--                 int          objc,\n-+                 Tcl_Size     objc,\n-                  Tcl_Obj     *const objv[]);\n- \n- \f\n-@@ -281,14 +281,14 @@\n- \t     */\n- \n- \t    case '\\\\': {\n--\t\tchar bsChar;\n--\n--                bsChar = Tcl_Backslash(p, &numChars);\n-+\t\tchar bsChars[4];\n-+\t\tTcl_Size bsLen;\n-+                bsLen = Tcl_UtfBackslash(p, &numChars, bsChars);\n-                 if (openBraces > 0) {\n-                     p += (numChars - 1);  /* Advanced again at end of loop */\n-                 } else {\n-                     Tcl_AppendToObj (elemObjPtr, cpStart, (p - cpStart));\n--                    Tcl_AppendToObj (elemObjPtr, &bsChar, 1);\n-+                    Tcl_AppendToObj (elemObjPtr, bsChars, bsLen);\n-                     p += (numChars - 1);\n-                     cpStart = p + 1;  /* already stored character */\n-                 }\n-@@ -408,7 +408,7 @@\n- static int \n- TclX_LgetsObjCmd (ClientData  clientData, \n-                  Tcl_Interp  *interp, \n--                 int          objc,\n-+                 Tcl_Size     objc,\n-                  Tcl_Obj     *const objv[])\n- {\n-     Tcl_Channel channel;\n-@@ -470,7 +470,7 @@\n-         int resultLen;\n- \n-         if (Tcl_ObjSetVar2(interp, objv[2], NULL, dataObj,\n--                           TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {\n-+                           TCL_LEAVE_ERR_MSG) == NULL) {\n-             goto errorExit;\n-         }\n- \n-@@ -512,7 +512,7 @@\n-          * FIX: Need functions to save/restore error state.\n-          */\n-         if (Tcl_ObjSetVar2(interp, objv[2], NULL, dataObj,\n--                           TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) != NULL) {\n-+                           TCL_LEAVE_ERR_MSG) != NULL) {\n-             Tcl_SetObjResult (interp, saveResult);  /* Restore old message */\n-         }\n-         Tcl_DecrRefCount (saveResult);\n-@@ -533,7 +533,7 @@\n- void\n- TclX_LgetsInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n-                           \"lgets\",\n-                           TclX_LgetsObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXlib.c\n-+++ b/generic/tclXlib.c\n-@@ -126,19 +126,19 @@\n- static int\n- TclX_load_tndxsObjCmd (ClientData  clientData,\n-                        Tcl_Interp *interp,\n--                       int         objc,\n-+                       Tcl_Size    objc,\n-                        Tcl_Obj    *const objv[]);\n-                                    \n- static int\n- TclX_Auto_load_pkgObjCmd (ClientData clientData, \n-                           Tcl_Interp *interp,\n--                          int objc,\n-+                          Tcl_Size objc,\n-                           Tcl_Obj *const objv[]);\n- \n- static int\n- TclX_LoadlibindexObjCmd (ClientData clientData, \n-                          Tcl_Interp *interp,\n--                         int objc,\n-+                         Tcl_Size objc,\n-                          Tcl_Obj *const objv[]);\n- \n- \f\n-@@ -396,7 +396,7 @@\n-                       off_t      *offsetPtr,\n-                       unsigned   *lengthPtr)\n- {\n--    int   pkgDataObjc;\n-+    Tcl_Size  pkgDataObjc;\n-     Tcl_Obj **pkgDataObjv, *pkgDataPtr;\n-    \n-     /*\n-@@ -524,7 +524,8 @@\n- {\n-     Tcl_Channel  indexChannel = NULL;\n-     Tcl_DString  lineBuffer;\n--    int          lineArgc, idx, result, tmpNum;\n-+    Tcl_Size     lineArgc, idx;\n-+    int          result, tmpNum;\n-     const char **lineArgv = NULL;\n-     off_t        offset;\n-     unsigned     length;\n-@@ -643,7 +644,7 @@\n-     Tcl_DStringInit (&command);\n- \n-     Tcl_DStringAppend (&command, \n--\t\t       \"if [catch {source -rsrc buildidx}] {source [file join $tclx_library buildidx.tcl]};\", -1);\n-+\t\t       \"if {[catch {source buildidx.tcl} foo]} {source [file join $tclx_library buildidx.tcl]};\", -1);\n-     Tcl_DStringAppend (&command, \"buildpackageindex \", -1);\n-     Tcl_DStringAppend (&command, tlibFilePath, -1);\n- \n-@@ -854,7 +855,7 @@\n- static int\n- TclX_load_tndxsObjCmd (ClientData  clientData,\n-                        Tcl_Interp *interp,\n--                       int         objc,\n-+                       Tcl_Size    objc,\n-                        Tcl_Obj    *const objv[])\n- {\n-     char *dirname;\n-@@ -878,7 +879,7 @@\n- static int\n- TclX_Auto_load_pkgObjCmd (ClientData clientData, \n-                           Tcl_Interp *interp,\n--                          int objc,\n-+                          Tcl_Size objc,\n-                           Tcl_Obj *const objv[])\n- {\n-     char     *fileName;\n-@@ -914,7 +915,7 @@\n- static int\n- TclX_LoadlibindexObjCmd (ClientData clientData, \n-                          Tcl_Interp *interp,\n--                         int objc,\n-+                         Tcl_Size objc,\n-                          Tcl_Obj *const objv[])\n- {\n-     char        *pathName;\n-@@ -979,15 +980,15 @@\n-         return TCL_ERROR;\n-     }\n-     \n--    Tcl_CreateObjCommand (interp, \"tclx_load_tndxs\",\n-+    Tcl_CreateObjCommand2 (interp, \"tclx_load_tndxs\",\n-                           TclX_load_tndxsObjCmd,\n-                           (ClientData) NULL,\n-                           (Tcl_CmdDeleteProc*) NULL);\n--    Tcl_CreateObjCommand (interp, \"auto_load_pkg\",\n-+    Tcl_CreateObjCommand2 (interp, \"auto_load_pkg\",\n-                           TclX_Auto_load_pkgObjCmd,\n-                           (ClientData) NULL,\n-                           (Tcl_CmdDeleteProc*) NULL);\n--    Tcl_CreateObjCommand (interp, \"loadlibindex\",\n-+    Tcl_CreateObjCommand2 (interp, \"loadlibindex\",\n-                           TclX_LoadlibindexObjCmd,\n-                           (ClientData) NULL,\n-                           (Tcl_CmdDeleteProc*) NULL);\n---- a/generic/tclXlist.c\n-+++ b/generic/tclXlist.c\n-@@ -25,43 +25,43 @@\n- static int\n- TclX_LvarcatObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n-+                    Tcl_Size     objc,\n-                     Tcl_Obj     *const objv[]);\n- \n- static int\n- TclX_LvarpopObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n--                    Tcl_Obj    *const objv[]);\n-+                    Tcl_Size     objc,\n-+                    Tcl_Obj     *const objv[]);\n- \n- static int\n- TclX_LvarpushObjCmd (ClientData   clientData,\n-                      Tcl_Interp  *interp,\n--                     int          objc,\n--                     Tcl_Obj    *const objv[]);\n-+                     Tcl_Size     objc,\n-+                     Tcl_Obj     *const objv[]);\n- \n- static int\n- TclX_LemptyObjCmd (ClientData   clientData,\n-                    Tcl_Interp  *interp,\n--                   int          objc,\n--                   Tcl_Obj    *const objv[]);\n-+                   Tcl_Size     objc,\n-+                   Tcl_Obj     *const objv[]);\n- \n- static int\n- TclX_LassignObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n-+                    Tcl_Size     objc,\n-                     Tcl_Obj    *const objv[]);\n- \n- static int\n- TclX_LmatchObjCmd (ClientData   clientData,\n-                    Tcl_Interp  *interp,\n--                   int          objc,\n-+                   Tcl_Size     objc,\n-                    Tcl_Obj    *const objv[]);\n- \n- static int\n- TclX_LcontainObjCmd (ClientData   clientData,\n-                      Tcl_Interp  *interp,\n--                     int          objc,\n-+                     Tcl_Size     objc,\n-                      Tcl_Obj    *const objv[]);\n- \n- \f\n-@@ -74,7 +74,7 @@\n- static int\n- TclX_LvarcatObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n-+                    Tcl_Size     objc,\n-                     Tcl_Obj     *const objv[])\n- {\n-     Tcl_Obj *varObjPtr, *newObjPtr;\n-@@ -92,7 +92,7 @@\n-      * Get the variable that we are going to update.  Include it if it\n-      * exists.\n-      */\n--    varObjPtr = Tcl_GetVar2Ex(interp, varName, NULL, TCL_PARSE_PART1);\n-+    varObjPtr = Tcl_GetVar2Ex(interp, varName, NULL, 0);\n- \n-     if (varObjPtr != NULL) {\n-         catObjc = objc - 1;\n-@@ -120,7 +120,7 @@\n-         ckfree ((char *) catObjv);\n- \n-     if (Tcl_SetVar2Ex(interp, varName, NULL, newObjPtr,\n--                      TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {\n-+                      TCL_LEAVE_ERR_MSG) == NULL) {\n-         Tcl_DecrRefCount (newObjPtr);\n-         return TCL_ERROR;\n-     }\n-@@ -137,11 +137,11 @@\n- static int\n- TclX_LvarpopObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n-+                    Tcl_Size     objc,\n-                     Tcl_Obj    *const objv[])\n- {\n-     Tcl_Obj *listVarPtr, *newVarObj, *returnElemPtr = NULL;\n--    int listIdx, listLen;\n-+    Tcl_Size listIdx, listLen;\n-     char *varName;\n- \n-     if ((objc < 2) || (objc > 4)) {\n-@@ -150,7 +150,7 @@\n-     varName = Tcl_GetStringFromObj (objv [1], NULL);\n- \n-     listVarPtr = Tcl_GetVar2Ex(interp, varName, NULL, \n--                               TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG);\n-+                               TCL_LEAVE_ERR_MSG);\n-     if (listVarPtr == NULL) {\n-         return TCL_ERROR;\n-     }\n-@@ -201,7 +201,7 @@\n-      * Update variable.\n-      */\n-     if (Tcl_SetVar2Ex(interp, varName, NULL, listVarPtr,\n--                      TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {\n-+                      TCL_LEAVE_ERR_MSG) == NULL) {\n-         goto errorExit;\n-     }\n- \n-@@ -232,11 +232,11 @@\n- static int\n- TclX_LvarpushObjCmd (ClientData   clientData,\n-                      Tcl_Interp  *interp,\n--                     int          objc,\n-+                     Tcl_Size     objc,\n-                      Tcl_Obj    *const objv[])\n- {\n-     Tcl_Obj *listVarPtr, *newVarObj;\n--    int listIdx, listLen;\n-+    Tcl_Size listIdx, listLen;\n-     char *varName;\n- \n-     if ((objc < 3) || (objc > 4)) {\n-@@ -244,7 +244,7 @@\n-     }\n-     varName = Tcl_GetStringFromObj (objv [1], NULL);\n- \n--    listVarPtr = Tcl_GetVar2Ex(interp, varName, NULL, TCL_PARSE_PART1);\n-+    listVarPtr = Tcl_GetVar2Ex(interp, varName, NULL, 0);\n-     if ((listVarPtr == NULL) || (Tcl_IsShared (listVarPtr))) {\n-         if (listVarPtr == NULL) {\n-             listVarPtr = Tcl_NewListObj (0, NULL);\n-@@ -282,7 +282,7 @@\n-         goto errorExit;\n- \n-     if (Tcl_SetVar2Ex(interp, varName, NULL, listVarPtr,\n--                      TCL_PARSE_PART1| TCL_LEAVE_ERR_MSG) == NULL) {\n-+                       TCL_LEAVE_ERR_MSG) == NULL) {\n-         goto errorExit;\n-     }\n-     return TCL_OK;\n-@@ -303,10 +303,10 @@\n- static int\n- TclX_LemptyObjCmd (ClientData   clientData,\n-                    Tcl_Interp  *interp,\n--                   int          objc,\n-+                   Tcl_Size     objc,\n-                    Tcl_Obj    *const objv[])\n- {\n--    int length;\n-+    Tcl_Size length;\n- \n-     if (objc != 2) {\n-         return TclX_WrongArgs (interp, objv [0], \"list\");\n-@@ -342,10 +342,10 @@\n- static int\n- TclX_LassignObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n-+                    Tcl_Size     objc,\n-                     Tcl_Obj    *const objv[])\n- {\n--    int listObjc, listIdx, idx, remaining;\n-+    Tcl_Size listObjc, listIdx, idx, remaining;\n-     Tcl_Obj **listObjv, *elemPtr, *remainingObjPtr;\n-     Tcl_Obj *nullObjPtr = NULL;\n- \n-@@ -372,7 +372,7 @@\n-             elemPtr = nullObjPtr;\n-         }\n-         if (Tcl_SetVar2Ex(interp, Tcl_GetStringFromObj(objv [idx], NULL), NULL,\n--                          elemPtr, TCL_PARSE_PART1 | TCL_LEAVE_ERR_MSG) == NULL)\n-+                          elemPtr, TCL_LEAVE_ERR_MSG) == NULL)\n-             goto error_exit;\n-     }\n- \n-@@ -404,13 +404,14 @@\n- static int\n- TclX_LmatchObjCmd (ClientData   clientData,\n-                    Tcl_Interp  *interp,\n--                   int          objc,\n-+                   Tcl_Size     objc,\n-                    Tcl_Obj    *const objv[])\n- {\n- #define EXACT   0\n- #define GLOB    1\n- #define REGEXP  2\n--    int listObjc, idx, match, mode, patternLen, valueLen;\n-+    Tcl_Size listObjc, idx, patternLen, valueLen;\n-+    int match, mode;\n-     char *modeStr, *patternStr, *valueStr;\n-     Tcl_Obj **listObjv, *matchedListPtr = NULL;\n- \n-@@ -501,13 +502,13 @@\n- static int\n- TclX_LcontainObjCmd (ClientData   clientData,\n-                      Tcl_Interp  *interp,\n--                     int          objc,\n-+                     Tcl_Size     objc,\n-                      Tcl_Obj    *const objv[])\n- {\n--    int listObjc, idx;\n-+    Tcl_Size listObjc, idx;\n-     Tcl_Obj **listObjv;\n-     char *elementStr, *checkStr;\n--    int elementLen, checkLen;\n-+    Tcl_Size elementLen, checkLen;\n- \n-     if (objc != 3) {\n-         return TclX_WrongArgs (interp, objv [0], \"list element\");\n-@@ -540,43 +541,43 @@\n- void\n- TclX_ListInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n- \t\t\t \"lvarcat\", \n- \t\t\t TclX_LvarcatObjCmd, \n-                          (ClientData) NULL, \n- \t\t\t (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n- \t\t\t \"lvarpop\", \n- \t\t\t TclX_LvarpopObjCmd, \n-                          (ClientData) NULL,\n- \t\t\t (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n- \t\t\t \"lvarpush\",\n- \t\t\t TclX_LvarpushObjCmd, \n-                          (ClientData) NULL,\n- \t\t\t (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp,\n-+    Tcl_CreateObjCommand2(interp,\n-                          \"lempty\",\n- \t\t\t TclX_LemptyObjCmd, \n-                          (ClientData) NULL,\n- \t\t\t (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n- \t\t\t \"lassign\",\n- \t\t\t TclX_LassignObjCmd, \n-                          (ClientData) NULL,\n- \t\t\t (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp,\n-+    Tcl_CreateObjCommand2(interp,\n- \t\t\t \"lmatch\",\n- \t\t\t TclX_LmatchObjCmd, \n-                          (ClientData) NULL,\n- \t\t\t (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand(interp, \n-+    Tcl_CreateObjCommand2(interp, \n- \t\t\t \"lcontain\",\n- \t\t\t TclX_LcontainObjCmd, \n-                          (ClientData) NULL,\n---- a/generic/tclXmath.c\n-+++ b/generic/tclXmath.c\n-@@ -26,6 +26,8 @@\n- #  define tclx_random random\n- #endif\n- \n-+#if TCL_MAJOR_VERSION <= 8\n-+\n- #ifdef TCL_WIDE_INT_TYPE\n- #define GET_DOUBLE_VALUE(doubleVar, argPtr, type)\t\t\\\n-     if ((type) == TCL_INT) {\t\t\t\t\t\\\n-@@ -67,6 +69,7 @@\n-                              Tcl_Interp  *interp,\n- \t\t\t\t             Tcl_Value *args,\n-                              Tcl_Value *resultPtr);\n-+#endif\n- \n- static int\tTclX_RandomObjCmd (ClientData  clientData,\n-                                Tcl_Interp *interp,\n-@@ -74,6 +77,7 @@\n-                                Tcl_Obj     *const objv[]);\n- \n- \f\n-+#if TCL_MAJOR_VERSION <= 8\n- /*-----------------------------------------------------------------------------\n-  * ConvertIntOrDoubleObj --\n-  *\n-@@ -246,6 +250,7 @@\n-     }\n-     return TCL_OK;\n- }\n-+#endif\n- \f\n- /*-----------------------------------------------------------------------------\n-  * ReallyRandom --\n-@@ -335,6 +340,7 @@\n- void\n- TclX_MathInit (Tcl_Interp *interp)\n- {\n-+#if TCL_MAJOR_VERSION <= 8\n-     int major, minor;\n-     Tcl_ValueType minMaxArgTypes[2];\n- \n-@@ -346,10 +352,12 @@\n- \n-     Tcl_CreateObjCommand (interp, \"min\", TclX_MinObjCmd,\n- \t    (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n--\n-+#endif\n-+    \n-     Tcl_CreateObjCommand (interp, \"random\", TclX_RandomObjCmd,\n- \t    (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n- \n-+#if TCL_MAJOR_VERSION <= 8\n-     /*\n-      * Tcl 8.5 added core min/max expr functions\n-      */\n-@@ -361,6 +369,7 @@\n- \tTcl_CreateMathFunc (interp, \"min\", 2, minMaxArgTypes,\n- \t\tTclX_MinMaxFunc, (ClientData) 0 /* IS_MIN */);\n-     }\n-+#endif\n- }\n- \n- \n---- a/generic/tclXmsgcat.c\n-+++ b/generic/tclXmsgcat.c\n-@@ -41,19 +41,19 @@\n- static int\n- TclX_CatopenObjCmd (ClientData  clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size    objc,\n-                     Tcl_Obj   *const objv[]);\n- \n- static int\n- TclX_CatgetsObjCmd (ClientData  clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size    objc,\n-                     Tcl_Obj   *const objv[]);\n- \n- static int\n- TclX_CatcloseObjCmd (ClientData  clientData,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size    objc,\n-                      Tcl_Obj   *const objv[]);\n- \n- static void\n-@@ -171,7 +171,7 @@\n- static int\n- TclX_CatopenObjCmd (ClientData  clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size    objc,\n-                     Tcl_Obj   *const objv[])\n- {\n-     int      fail;\n-@@ -211,7 +211,7 @@\n- static int\n- TclX_CatgetsObjCmd (ClientData  clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size    objc,\n-                     Tcl_Obj   *const objv[])\n- {\n-     nl_catd   *catDescPtr;\n-@@ -266,7 +266,7 @@\n- static int\n- TclX_CatcloseObjCmd (ClientData  clientData,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size    objc,\n-                      Tcl_Obj   *const objv[])\n- {\n-     int          fail;\n-@@ -368,19 +368,19 @@\n-      * Initialize the commands.\n-      */\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"catopen\",\n- \t\t\t  TclX_CatopenObjCmd, \n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t          \"catgets\", \n- \t\t\t  TclX_CatgetsObjCmd, \n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"catclose\",\n- \t\t\t  TclX_CatcloseObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXoscmds.c\n-+++ b/generic/tclXoscmds.c\n-@@ -22,43 +22,43 @@\n- static int \n- TclX_AlarmObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_LinkObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_NiceObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_SleepObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_SyncObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_SystemObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int objc,\n-+                   Tcl_Size    objc,\n-                    Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_UmaskObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj *const objv[]);\n- \n- \f\n-@@ -75,7 +75,7 @@\n- static int \n- TclX_AlarmObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj *const objv[])\n- {\n-     double seconds;\n-@@ -105,7 +105,7 @@\n- static int \n- TclX_LinkObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj *const objv[])\n- {\n-     char *srcPath, *destPath;\n-@@ -174,7 +174,7 @@\n- static int \n- TclX_NiceObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj *const objv[])\n- {\n-     Tcl_Obj    *resultPtr = Tcl_GetObjResult (interp);\n-@@ -223,7 +223,7 @@\n- static int \n- TclX_SleepObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj *const objv[])\n- {\n-     double time;\n-@@ -251,7 +251,7 @@\n- static int \n- TclX_SyncObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj *const objv[])\n- {\n-     Tcl_Channel  channel;\n-@@ -285,7 +285,7 @@\n- static int \n- TclX_SystemObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int objc,\n-+                   Tcl_Size    objc,\n-                    Tcl_Obj *const objv[])\n- {\n-     Tcl_Obj *cmdObjPtr;\n-@@ -320,7 +320,7 @@\n- static int \n- TclX_UmaskObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj *const objv[])\n- {\n-     int    mask;\n-@@ -361,19 +361,19 @@\n- void\n- TclX_OsCmdsInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"alarm\",\n- \t\t\t  TclX_AlarmObjCmd,\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"link\",\n- \t\t\t  TclX_LinkObjCmd,\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"nice\",\n- \t\t\t  TclX_NiceObjCmd,\n-                           (ClientData) NULL,\n-@@ -385,7 +385,7 @@\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL, 0);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n-                           \"sync\",\n- \t\t\t  TclX_SyncObjCmd,\n-                           (ClientData) NULL,\n-@@ -397,7 +397,7 @@\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc*) NULL, 0);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"umask\",\n- \t\t\t  TclX_UmaskObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXprocess.c\n-+++ b/generic/tclXprocess.c\n-@@ -31,19 +31,19 @@\n- static int \n- TclX_ExeclObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size objc,\n-                   Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_ForkObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj *const objv[]);\n- \n- static int \n- TclX_WaitObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj *const objv[]);\n- \n- \f\n-@@ -56,7 +56,7 @@\n- static int \n- TclX_ForkObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj *const objv[])\n- {\n-     if (objc != 1)\n-@@ -74,7 +74,7 @@\n- static int \n- TclX_ExeclObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int objc,\n-+                  Tcl_Size objc,\n-                   Tcl_Obj *const objv[])\n- {\n- #define STATIC_ARG_SIZE   12\n-@@ -82,7 +82,7 @@\n-     char **argList = staticArgv;\n-     int nextArg = 1;\n-     char *argStr;\n--    int argObjc;\n-+    Tcl_Size argObjc;\n-     Tcl_Obj **argObjv;\n-     char *path, *argv0 = NULL;\n-     int idx, status;\n-@@ -162,7 +162,7 @@\n- static int \n- TclX_WaitObjCmd (ClientData clientData,\n-                  Tcl_Interp *interp,\n--                 int objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj *const objv[])\n- {\n-     int idx, options = 0, pgroup = FALSE;\n-@@ -291,7 +291,7 @@\n- void\n- TclX_ProcessInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n-                           \"execl\",\n-                           TclX_ExeclObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXprofile.c\n-+++ b/generic/tclXprofile.c\n-@@ -122,13 +122,21 @@\n-                     int           argc,\n-                     const char **argv);\n- \n-+#if TCL_MAJOR_VERSION > 8\n- static int\n- ProfObjCommandEval (ClientData    clientData,\n-                     Tcl_Interp   *interp,\n--                    int           objc,\n-+                    Tcl_Size      objc,\n-                     Tcl_Obj      *const objv[]);\n-+#endif\n- \n--static Tcl_CmdObjTraceProc ProfTraceRoutine;\n-+static int\n-+ProfObjCommandEvalCompat (ClientData    clientData,\n-+                          Tcl_Interp   *interp,\n-+                          int           objc,\n-+                          Tcl_Obj      *const objv[]);\n-+\n-+static Tcl_CmdObjTraceProc2 ProfTraceRoutine;\n- \n- static void\n- CleanDataTable (profInfo_t *infoPtr);\n-@@ -153,7 +161,7 @@\n- static int\n- TclX_ProfileObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n-+                    Tcl_Size     objc,\n-                     Tcl_Obj    *const objv[]);\n- \n- static void\n-@@ -392,21 +400,25 @@\n-     Tcl_GetCommandInfoFromToken(infoPtr->currentCmd, &cmdInfo);\n-     /*\n-      * Restore the command table entry.  If the command has modified it, don't\n--     * mess with it.\n-+     * mess with it.  For isNativeObjectProc == 2 commands (created with\n-+     * Tcl_CreateObjCommand2), we intercept via objProc2/objClientData2.\n-+     * For isNativeObjectProc == 1 commands, we intercept via objProc/objClientData.\n-+     * Never touch deleteProc/deleteData — Tcl uses them for CmdWrapper infrastructure.\n-      */\n--    if (cmdInfo.proc == ProfStrCommandEval)\n-+    if (cmdInfo.proc == ProfStrCommandEval) {\n-         cmdInfo.proc = infoPtr->savedCmdInfo.proc;\n--    if (cmdInfo.clientData == (ClientData) infoPtr)\n-         cmdInfo.clientData = infoPtr->savedCmdInfo.clientData;\n--    if (cmdInfo.objProc == ProfObjCommandEval)\n-+    }\n-+#if TCL_MAJOR_VERSION > 8\n-+    if (cmdInfo.objProc2 == ProfObjCommandEval) {\n-+        cmdInfo.objProc2 = infoPtr->savedCmdInfo.objProc2;\n-+        cmdInfo.objClientData2 = infoPtr->savedCmdInfo.objClientData2;\n-+    }\n-+#endif\n-+    if (cmdInfo.objProc == ProfObjCommandEvalCompat) {\n-         cmdInfo.objProc = infoPtr->savedCmdInfo.objProc;\n--    if (cmdInfo.objClientData == (ClientData) infoPtr)\n-         cmdInfo.objClientData = infoPtr->savedCmdInfo.objClientData;\n--    if (cmdInfo.deleteProc == NULL)\n--        cmdInfo.deleteProc = infoPtr->savedCmdInfo.deleteProc;\n--    if (cmdInfo.deleteData == NULL)\n--        cmdInfo.deleteData = infoPtr->savedCmdInfo.deleteData;\n--    cmdInfo.isNativeObjectProc = infoPtr->savedCmdInfo.isNativeObjectProc;\n-+    }\n- \n-     Tcl_SetCommandInfoFromToken(infoPtr->currentCmd, &cmdInfo);\n- \n-@@ -417,7 +429,7 @@\n- \n-     /*\n-      * Use the level value passed in by Tcl_Interp through ProfTraceRoutine.\n--     *   Ref: Tcl_CmdObjTraceProc(ClientData, Tcl_Interp*, int level, ...)\n-+     *   Ref: Tcl_CmdObjTraceProc2(ClientData, Tcl_Interp*, int level, ...)\n-      * The value calcuated from iPtr->framePtr chain may be smaller.\n-      * And will cause issue when checking (infoPtr->stackPtr->procLevel > procLevel).\n-      */\n-@@ -518,13 +530,12 @@\n-     return result;\n- }\n- \f\n-+#if TCL_MAJOR_VERSION > 8\n- /*-----------------------------------------------------------------------------\n-  * ProfObjCommandEval --\n-- *   Function to evaluate a object command.  The procedure trace routine\n-- * substitutes this function for the command executor function in the Tcl\n-- * command table.  We restore the command table, record data about the start\n-- * of the command and then actually execute the command.  When the command\n-- * returns, we record data about the time it took.\n-+ *   Function to evaluate a Tcl 9 object command (created with\n-+ * Tcl_CreateObjCommand2, isNativeObjectProc == 2).  The trace routine\n-+ * substitutes this function for the objProc2 handler in the command table.\n-  *\n-  * FIX:  This all falls apart if another trace is executed between the\n-  * doctoring of the command entry and this function being called.\n-@@ -533,7 +544,7 @@\n- static int\n- ProfObjCommandEval (ClientData    clientData,\n-                     Tcl_Interp   *interp,\n--                    int           objc,\n-+                    Tcl_Size      objc,\n-                     Tcl_Obj      *const objv[])\n- {\n-     profInfo_t *infoPtr = (profInfo_t *) clientData;\n-@@ -541,8 +552,34 @@\n- \n-     ProfCommandEvalSetup (infoPtr, &isProc);\n- \n--    result = (*infoPtr->savedCmdInfo.objProc)(infoPtr->savedCmdInfo.objClientData, interp,\n--                                        objc, objv);\n-+    result = (*infoPtr->savedCmdInfo.objProc2)(\n-+        infoPtr->savedCmdInfo.objClientData2, interp, objc, objv);\n-+\n-+    ProfCommandEvalFinishup (infoPtr, isProc);\n-+    return result;\n-+}\n-+#endif /* TCL_MAJOR_VERSION > 8 */\n-+\n-+/*-----------------------------------------------------------------------------\n-+ * ProfObjCommandEvalCompat --\n-+ *   Function to evaluate an object command created with Tcl_CreateObjCommand\n-+ *   (isNativeObjectProc == 1).  Uses the objProc/objClientData fields which\n-+ *   have the Tcl_ObjCmdProc signature (int objc).\n-+ *-----------------------------------------------------------------------------\n-+ */\n-+static int\n-+ProfObjCommandEvalCompat (ClientData    clientData,\n-+                          Tcl_Interp   *interp,\n-+                          int           objc,\n-+                          Tcl_Obj      *const objv[])\n-+{\n-+    profInfo_t *infoPtr = (profInfo_t *) clientData;\n-+    int isProc, result;\n-+\n-+    ProfCommandEvalSetup (infoPtr, &isProc);\n-+\n-+    result = (*infoPtr->savedCmdInfo.objProc)(\n-+        infoPtr->savedCmdInfo.objClientData, interp, objc, objv);\n- \n-     ProfCommandEvalFinishup (infoPtr, isProc);\n-     return result;\n-@@ -555,13 +592,13 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static int\n--ProfTraceRoutine (ClientData  clientData,\n--                  Tcl_Interp *interp,\n--                  int         evalLevel,\n--                  const char *command,\n--                  Tcl_Command cmd,\n--                  int         objc,\n--                  Tcl_Obj    *const objv[])\n-+ProfTraceRoutine (ClientData   clientData,\n-+                  Tcl_Interp  *interp,\n-+                  Tcl_Size     evalLevel,\n-+                  const char  *command,\n-+                  Tcl_Command  cmd,\n-+                  Tcl_Size     objc,\n-+                  Tcl_Obj     *const objv[])\n- {\n-     /* struct Tcl_Obj * const *objv; */\n-     profInfo_t *infoPtr = (profInfo_t *) clientData;\n-@@ -571,7 +608,7 @@\n-         Tcl_Panic (PROF_PANIC, 4);\n- \n-     //TIP #571: We don' want to profile the tailcall itself. As it can only be called in a procedure/lambda context\n--    if ( ! strcmp((*objv)->bytes, \"tailcall\") ) {\n-+    if ( ! strcmp(Tcl_GetString(objv[0]), \"tailcall\") ) {\n-         return TCL_OK;\n-     }\n-     /*\n-@@ -582,15 +619,31 @@\n-     infoPtr->currentCmd = cmd;\n- \n-     /*\n--     * Force our routines to be called.\n-+     * Force our routines to be called.  We start from the saved cmdInfo to\n-+     * preserve deleteProc/deleteData and the CmdWrapper infrastructure.\n-+     *\n-+     * For isNativeObjectProc == 2 (Tcl_CreateObjCommand2): replace objProc2\n-+     * and objClientData2.  SetCommandInfoFromToken updates the CmdWrapperInfo\n-+     * in-place, so CmdWrapperProc (in objProc) will call our ProfObjCommandEval.\n-+     *\n-+     * For isNativeObjectProc == 1 (Tcl_CreateObjCommand): replace objProc\n-+     * and objClientData directly, since Tcl dispatches through cmdPtr->objProc.\n-      */\n-+    cmdInfo = infoPtr->savedCmdInfo;\n-     cmdInfo.proc = ProfStrCommandEval;\n-     cmdInfo.clientData = (ClientData) infoPtr;\n--    cmdInfo.objProc = ProfObjCommandEval;\n--    cmdInfo.objClientData = (ClientData) infoPtr;\n--    cmdInfo.isNativeObjectProc = infoPtr->savedCmdInfo.isNativeObjectProc;\n--    cmdInfo.deleteProc = NULL;\n--    cmdInfo.deleteData = NULL;\n-+\n-+#if TCL_MAJOR_VERSION > 8\n-+    if (infoPtr->savedCmdInfo.isNativeObjectProc == 2) {\n-+        cmdInfo.objProc2 = ProfObjCommandEval;\n-+        cmdInfo.objClientData2 = (ClientData) infoPtr;\n-+    } else\n-+#endif\n-+    {\n-+        cmdInfo.objProc = ProfObjCommandEvalCompat;\n-+        cmdInfo.objClientData = (ClientData) infoPtr;\n-+    }\n-+\n-     Tcl_SetCommandInfoFromToken(cmd, &cmdInfo);\n- \n-     return TCL_OK;\n-@@ -671,7 +724,7 @@\n-     CleanDataTable (infoPtr);\n- \n-     infoPtr->traceHandle =\n--        Tcl_CreateObjTrace (infoPtr->interp, 0,\n-+        Tcl_CreateObjTrace2 (infoPtr->interp, 0,\n-                          TCL_ALLOW_INLINE_COMPILATION, ProfTraceRoutine,\n-                          (ClientData) infoPtr, NULL);\n-     infoPtr->commandMode = commandMode;\n-@@ -800,11 +853,11 @@\n- static int\n- TclX_ProfileObjCmd (ClientData   clientData,\n-                     Tcl_Interp  *interp,\n--                    int          objc,\n-+                    Tcl_Size     objc,\n-                     Tcl_Obj    *const objv[])\n- {\n-     profInfo_t *infoPtr = (profInfo_t *) clientData;\n--    int argIdx;\n-+    Tcl_Size argIdx;\n-     int commandMode = FALSE, evalMode = FALSE;\n-     char *argStr;\n-         \n-@@ -939,11 +992,11 @@\n- \n-     Tcl_CallWhenDeleted (interp, ProfMonCleanUp, (ClientData) infoPtr);\n- \n--    Tcl_CreateObjCommand (interp, \n--\t\t\t  \"profile\",\n--\t\t\t  TclX_ProfileObjCmd,\n--                          (ClientData) infoPtr,\n--\t\t\t  (Tcl_CmdDeleteProc*) NULL);\n-+    Tcl_CreateObjCommand2 (interp, \n-+\t\t\t   \"profile\",\n-+\t\t\t   TclX_ProfileObjCmd,\n-+                           (ClientData) infoPtr,\n-+\t\t\t   (Tcl_CmdDeleteProc*) NULL);\n- }\n- \n- /* vim: set ts=4 sw=4 sts=4 et : */\n---- a/generic/tclXselect.c\n-+++ b/generic/tclXselect.c\n-@@ -79,7 +79,7 @@\n- static int \n- TclX_SelectObjCmd (ClientData clientData, \n-                    Tcl_Interp *interp,\n--                   int objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj *const objv[]);\n- \n- \f\n-@@ -114,7 +114,7 @@\n-                      channelData_t **channelListPtr,\n-                      int            *maxFileIdPtr)\n- {\n--    int handleCnt, idx;\n-+    Tcl_Size handleCnt, idx;\n-     Tcl_Obj **handleObjv;\n-     channelData_t *channelList;\n- \n-@@ -239,10 +239,10 @@\n-                         int            fileDescCnt,\n-                         channelData_t *channelList)\n- {\n--    int idx, handleCnt;\n-+    int idx; /*, handleCnt;*/\n-     Tcl_Obj *fileHandleList = Tcl_NewListObj (0, NULL);\n- \n--    handleCnt = 0;\n-+    /*handleCnt = 0;*/\n-     for (idx = 0; idx < fileDescCnt; idx++) {\n-         if (((channelList [idx].readFd >= 0) &&\n-              FD_ISSET (channelList [idx].readFd, fileDescSetPtr)) ||\n-@@ -250,7 +250,7 @@\n-              FD_ISSET (channelList [idx].writeFd, fileDescSetPtr))) {\n-             Tcl_ListObjAppendElement (NULL, fileHandleList,\n-                                       channelList [idx].channelIdObj);\n--            handleCnt++;\n-+            /*handleCnt++;*/\n-         }\n-     }\n- \n-@@ -274,7 +274,7 @@\n- static int \n- TclX_SelectObjCmd (ClientData clientData, \n-                    Tcl_Interp *interp,\n--                   int objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj *const objv[])\n- {\n-     static int chanAccess [] = {TCL_READABLE, TCL_WRITABLE, 0};\n-@@ -405,7 +405,7 @@\n- TclX_SelectObjCmd (clientData, interp, objc, objv)\n-     ClientData   clientData;\n-     Tcl_Interp  *interp;\n--    int          objc;\n-+    Tcl_Size objc;\n-     Tcl_Obj     *const objv[]\n- {\n-     Tcl_AppendResult(interp, Tcl_GetString(objv[0]),\n-@@ -423,7 +423,7 @@\n- void\n- TclX_SelectInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n-                           \"select\",\n-                           TclX_SelectObjCmd,\n-                           (ClientData) NULL,\n---- a/generic/tclXsignal.c\n-+++ b/generic/tclXsignal.c\n-@@ -326,13 +326,13 @@\n- static int\n- TclX_SignalObjCmd (ClientData   clientData,\n-                    Tcl_Interp  *interp,\n--                   int          objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj     *const objv[]);\n- \n- static int\n- TclX_KillObjCmd (ClientData   clientData,\n-                  Tcl_Interp  *interp,\n--                 int          objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj     *const objv[]);\n- \n- \f\n-@@ -930,7 +930,7 @@\n- {\n-     Tcl_Obj **signalObjv;\n-     char     *signalStr;\n--    int       signalObjc, signalNum, idx;\n-+    Tcl_Size  signalObjc, signalNum, idx;\n- \n-     if (Tcl_ListObjGetElements (interp, signalListObjPtr,\n-                                 &signalObjc, &signalObjv) != TCL_OK)\n-@@ -1134,7 +1134,7 @@\n-                         Tcl_Obj    *stateObjPtr)\n- {\n-     Tcl_Obj **stateObjv;\n--    int stateObjc;\n-+    Tcl_Size stateObjc;\n-     char *actionStr, *cmdStr;\n-     int signalNum, blocked;\n-     signalProcPtr_t  actionFunc = NULL;\n-@@ -1280,7 +1280,7 @@\n- SetSignalStates (Tcl_Interp *interp, Tcl_Obj *sigStatesObjPtr)\n- {\n-     Tcl_Obj *keysListObj, **keysObjv, *stateObjPtr;\n--    int keysObjc, idx;\n-+    Tcl_Size keysObjc, idx;\n-     char *signalName;\n- \n-     if (TclX_KeyedListGetKeys (interp, sigStatesObjPtr, NULL,\n-@@ -1310,7 +1310,7 @@\n- static int\n- TclX_SignalObjCmd (ClientData   clientData,\n-                    Tcl_Interp  *interp,\n--                   int          objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj     *const objv[])\n- {\n-     unsigned char signals [MAXSIG];\n-@@ -1450,12 +1450,13 @@\n- static int\n- TclX_KillObjCmd (ClientData   clientData,\n-                  Tcl_Interp  *interp,\n--                 int          objc,\n-+                 Tcl_Size objc,\n-                  Tcl_Obj     *const objv[])\n- {\n--    int    signalNum, nextArg, idx, procId, procObjc;\n--    int    pgroup = FALSE;\n--    char  *cmdStr, *argStr;\n-+    int       signalNum, procId;\n-+    Tcl_Size  nextArg, idx, procObjc;\n-+    int       pgroup = FALSE;\n-+    char     *cmdStr, *argStr;\n-     Tcl_Obj **procObjv;\n-     \n- #ifdef SIGTERM\n-@@ -1650,9 +1651,9 @@\n- \n-     Tcl_CallWhenDeleted (interp, SignalCmdCleanUp, (ClientData) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \"signal\", TclX_SignalObjCmd,\n-+    Tcl_CreateObjCommand2 (interp, \"signal\", TclX_SignalObjCmd,\n-                           (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n--    Tcl_CreateObjCommand (interp, \"kill\", TclX_KillObjCmd,\n-+    Tcl_CreateObjCommand2 (interp, \"kill\", TclX_KillObjCmd,\n-                           (ClientData) NULL, (Tcl_CmdDeleteProc*) NULL);\n- }\n- \n---- a/generic/tclXsocket.c\n-+++ b/generic/tclXsocket.c\n-@@ -27,13 +27,13 @@\n- \n- static struct hostent *\n- InfoGetHost (Tcl_Interp *interp,\n--             int         objc,\n-+             Tcl_Size objc,\n-              Tcl_Obj   *const objv[]);\n- \n- static int\n- TclX_HostInfoObjCmd (ClientData  clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj   *const objv[]);\n- \n- \f\n-@@ -150,7 +150,7 @@\n-  *-----------------------------------------------------------------------------\n-  */\n- static struct hostent *\n--InfoGetHost (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])\n-+InfoGetHost (Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])\n- {\n-     struct hostent *hostEntry;\n-     struct in_addr address;\n-@@ -193,7 +193,7 @@\n- static int\n- TclX_HostInfoObjCmd (ClientData  clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj   *const objv[])\n- {\n-     struct hostent *hostEntry;\n-@@ -215,8 +215,8 @@\n-             return TCL_ERROR;\n- \n-         for (idx = 0; hostEntry->h_addr_list [idx] != NULL; idx++) {\n--            bcopy ((VOID *) hostEntry->h_addr_list [idx],\n--                   (VOID *) &inAddr,\n-+            bcopy ((void *) hostEntry->h_addr_list [idx],\n-+                   (void *) &inAddr,\n-                    hostEntry->h_length);\n- \n- \t    listObj = Tcl_NewStringObj (inet_ntoa (inAddr), -1);\n-@@ -231,8 +231,8 @@\n-             return TCL_ERROR;\n- \n-         for (idx = 0; hostEntry->h_addr_list [idx] != NULL; idx++) {\n--            bcopy ((VOID *) hostEntry->h_addr_list [idx],\n--                   (VOID *) &inAddr,\n-+            bcopy ((void *) hostEntry->h_addr_list [idx],\n-+                   (void *) &inAddr,\n-                    hostEntry->h_length);\n- \t    listObj = Tcl_NewStringObj ((char *) hostEntry->h_name, -1);\n- \t    Tcl_ListObjAppendElement (interp, resultPtr, listObj);\n-@@ -276,7 +276,7 @@\n- void\n- TclX_SocketInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"host_info\",\n- \t\t\t  TclX_HostInfoObjCmd,\n-                           (ClientData) NULL, \n---- a/generic/tclXstring.c\n-+++ b/generic/tclXstring.c\n-@@ -39,61 +39,61 @@\n- static int \n- TclX_CindexObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_ClengthObjCmd (ClientData clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj   *const objv[]);\n- \n- static int\n- TclX_CconcatObjCmd (ClientData clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_CrangeObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_CcollateObjCmd (ClientData clientData,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size objc,\n-                      Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_ReplicateObjCmd (ClientData clientData,\n-                       Tcl_Interp *interp,\n--                      int         objc,\n-+                      Tcl_Size objc,\n-                       Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_TranslitObjCmd (ClientData clientData,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size objc,\n-                      Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_CtypeObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int         objc,\n-+                  Tcl_Size objc,\n-                   Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_CtokenObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[]);\n- \n- static int \n- TclX_CequalObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[]);\n- \n- \f\n-@@ -109,10 +109,10 @@\n- static int \n- TclX_CindexObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[])\n- {\n--    int strLen, utfLen, idx, numBytes;\n-+    Tcl_Size strLen, utfLen, idx, numBytes;\n-     char *str, buf [TCL_UTF_MAX];\n- \n-     if (objc != 3)\n-@@ -146,11 +146,11 @@\n- static int \n- TclX_ClengthObjCmd (ClientData clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj   *const objv[])\n- {\n-     char *str;\n--    int strLen;\n-+    Tcl_Size strLen;\n- \n-     if (objc != 2)\n-         return TclX_WrongArgs (interp, objv[0], \"string\");\n-@@ -173,11 +173,11 @@\n- static int\n- TclX_CconcatObjCmd (ClientData clientData,\n-                     Tcl_Interp *interp,\n--                    int         objc,\n-+                    Tcl_Size objc,\n-                     Tcl_Obj   *const objv[])\n- {\n-     Tcl_Obj *resultPtr = Tcl_GetObjResult(interp);\n--    int idx, strLen;\n-+    Tcl_Size idx, strLen;\n-     char *str;\n- \n-     for (idx = 1; idx < objc; idx++) {\n-@@ -202,10 +202,10 @@\n- static int \n- TclX_CrangeObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[])\n- {\n--    int strLen, utfLen, first, subLen;\n-+    Tcl_Size strLen, utfLen, first, subLen;\n-     size_t isRange = (size_t) clientData;\n-     char *str;\n-     const char *start, *end;\n-@@ -261,15 +261,16 @@\n- static int \n- TclX_CcollateObjCmd (ClientData clientData,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size objc,\n-                      Tcl_Obj   *const objv[])\n- {\n--    int argIndex, result, local = FALSE;\n-+    Tcl_Size argIndex;\n-+    int result, local = FALSE;\n-     char *optionString;\n-     char *string1;\n--    int string1Len;\n-+    Tcl_Size string1Len;\n-     char *string2;\n--    int string2Len;\n-+    Tcl_Size string2Len;\n- \n-     /*FIX: Not utf clean (FIXUTF), can it ever be... */\n-     if ((objc < 3) || (objc > 4))\n-@@ -322,14 +323,14 @@\n- static int \n- TclX_ReplicateObjCmd (ClientData clientData,\n-                       Tcl_Interp *interp,\n--                      int         objc,\n-+                      Tcl_Size objc,\n-                       Tcl_Obj   *const objv[])\n- {\n-     Tcl_Obj     *resultPtr = Tcl_GetObjResult (interp);\n-     long         count;\n-     long         repCount;\n-     char        *stringPtr;\n--    int          stringLength;\n-+    Tcl_Size     stringLength;\n- \n-     if (objc != 3)\n-         return TclX_WrongArgs (interp, objv[0], \"string countExpr\");\n-@@ -358,20 +359,20 @@\n- static int \n- TclX_CtokenObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[])\n- {\n-     Tcl_Obj* stringVarObj;\n-     char* string;\n--    int strByteLen;\n--    int strByteIdx;\n-+    Tcl_Size strByteLen;\n-+    Tcl_Size strByteIdx;\n-     char* separators;\n--    int separatorsLen;\n--    int tokenByteIdx;\n--    int tokenByteLen;\n-+    Tcl_Size separatorsLen;\n-+    Tcl_Size tokenByteIdx;\n-+    Tcl_Size tokenByteLen;\n-     Tcl_DString token;\n-     Tcl_UniChar uniChar;\n--    int utfBytes;\n-+    Tcl_Size utfBytes;\n-     Tcl_Obj *newVarValueObj;\n- \n-     if (objc != 3) {\n-@@ -379,7 +380,7 @@\n-     }\n-     \n-     stringVarObj = Tcl_ObjGetVar2(interp, objv[1], NULL,\n--                                  TCL_LEAVE_ERR_MSG|TCL_PARSE_PART1);\n-+                                  TCL_LEAVE_ERR_MSG);\n-     if (stringVarObj == NULL) {\n-         return TCL_ERROR;\n-     }\n-@@ -416,7 +417,7 @@\n-                                       strByteLen-strByteIdx);\n-     if (Tcl_SetVar2Ex(interp, Tcl_GetStringFromObj(objv[1], NULL), NULL,\n-                       newVarValueObj,\n--                      TCL_LEAVE_ERR_MSG|TCL_PARSE_PART1) == NULL) {\n-+                      TCL_LEAVE_ERR_MSG) == NULL) {\n-         Tcl_DStringFree (&token);\n-         Tcl_DecrRefCount (newVarValueObj);\n-         return TCL_ERROR;\n-@@ -438,13 +439,13 @@\n- static int \n- TclX_CequalObjCmd (ClientData clientData,\n-                    Tcl_Interp *interp,\n--                   int         objc,\n-+                   Tcl_Size objc,\n-                    Tcl_Obj   *const objv[])\n- {\n--    char *string1Ptr;\n--    int string1Len;\n--    char *string2Ptr;\n--    int string2Len;\n-+    char     *string1Ptr;\n-+    Tcl_Size  string1Len;\n-+    char     *string2Ptr;\n-+    Tcl_Size  string2Len;\n- \n-     if (objc != 3)\n-         return TclX_WrongArgs (interp, objv[0], \"string1 string2\");\n-@@ -536,7 +537,7 @@\n- static int \n- TclX_TranslitObjCmd (ClientData clientData,\n-                      Tcl_Interp *interp,\n--                     int         objc,\n-+                     Tcl_Size objc,\n-                      Tcl_Obj   *const objv[])\n- {\n-     unsigned char from [MAX_EXPANSION+1];\n-@@ -546,14 +547,14 @@\n-     short         map [MAX_EXPANSION+1];\n-     unsigned char *s;\n-     char          *fromString;\n--    int            fromStringLen;\n-+    Tcl_Size      fromStringLen;\n-     char          *toString;\n--    int            toStringLen;\n-+    Tcl_Size       toStringLen;\n-     Tcl_Obj       *transStringObj;\n-     char          *transString;\n--    int            transStringLen;\n--    int            idx;\n--    int            stringIndex;\n-+    Tcl_Size       transStringLen;\n-+    Tcl_Size       idx;\n-+    Tcl_Size       stringIndex;\n- \n-     /*FIX: Not UTF-safe.(FIXUTF) */\n- \n-@@ -651,12 +652,12 @@\n- static int \n- TclX_CtypeObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int         objc,\n-+                  Tcl_Size objc,\n-                   Tcl_Obj   *const objv[])\n- {\n-     int failIndex = FALSE;\n-     char *optStr, *class, *charStr;\n--    int charStrLen, cnt, idx;\n-+    Tcl_Size charStrLen, cnt, idx;\n-     char *failVar = NULL;\n-     Tcl_Obj *classObj, *stringObj;\n-     int number;\n-@@ -853,7 +854,7 @@\n-             Tcl_Obj *iObj = Tcl_NewIntObj (idx);\n- \n-             if (Tcl_SetVar2Ex(interp, failVar, NULL, \n--                              iObj, TCL_LEAVE_ERR_MSG|TCL_PARSE_PART1) == NULL) {\n-+                              iObj, TCL_LEAVE_ERR_MSG) == NULL) {\n-                 Tcl_DecrRefCount (iObj);\n-                 return TCL_ERROR;\n-             }\n-@@ -887,67 +888,67 @@\n- void\n- TclX_StringInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"cindex\",\n-                           TclX_CindexObjCmd, \n- \t\t\t  (ClientData) 0, \n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"clength\",\n-                           TclX_ClengthObjCmd, \n- \t\t\t  (ClientData) 0,\n-                           (Tcl_CmdDeleteProc *)NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"cconcat\",\n-                           TclX_CconcatObjCmd, \n- \t\t\t  (ClientData) 0,\n-                           (Tcl_CmdDeleteProc *)NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"crange\",\n-                           TclX_CrangeObjCmd, \n- \t\t\t  (ClientData) TRUE, \n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"csubstr\",\n-                           TclX_CrangeObjCmd,\n- \t\t\t  (ClientData) FALSE, \n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"ccollate\",\n-                           TclX_CcollateObjCmd,\n- \t\t\t  (ClientData) 0,\n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"replicate\",\n-                           TclX_ReplicateObjCmd, \n- \t\t\t  (ClientData) 0, \n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"translit\",\n-                           TclX_TranslitObjCmd,\n- \t\t\t  (ClientData) 0, \n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"ctype\",\n-                           TclX_CtypeObjCmd,\n- \t\t\t  (ClientData) 0, \n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"ctoken\",\n-                           TclX_CtokenObjCmd,\n- \t\t\t  (ClientData) 0, \n-                           (Tcl_CmdDeleteProc*) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp, \n- \t\t\t  \"cequal\",\n- \t\t\t  TclX_CequalObjCmd,\n- \t\t\t  (ClientData) 0, \n---- a/generic/tclXutil.c\n-+++ b/generic/tclXutil.c\n-@@ -325,17 +325,26 @@\n- int\n- TclX_RelativeExpr (Tcl_Interp  *interp,\n-                    Tcl_Obj     *exprPtr,\n--                   int          stringLen,\n--                   int         *exprResultPtr)\n-+                   Tcl_Size     stringLen,\n-+                   Tcl_Size    *exprResultPtr)\n- {\n-     char *exprStr, *buf;\n--    int exprLen, exprStrLen, result;\n-+    Tcl_Size exprLen, exprStrLen;\n-+    int  result;\n-+    Tcl_Size wideResult;\n-     long longResult;\n-     char staticBuf [32];\n- \n--    if (exprPtr->typePtr == Tcl_GetObjType (\"int\")) {\n--        if (Tcl_GetIntFromObj (interp, exprPtr, exprResultPtr) != TCL_OK)\n-+    if (0 && exprPtr->typePtr == Tcl_GetObjType (\"int\")) {\n-+        int intResult;\n-+        if (Tcl_GetIntFromObj (interp, exprPtr, &intResult) != TCL_OK)\n-             return TCL_ERROR;\n-+\t*exprResultPtr = intResult;\n-+        return TCL_OK;\n-+    }\n-+    /* \"endValue\" references the last element, not the length, hench -1 below */\n-+    if (Tcl_GetIntForIndex(interp, exprPtr, (stringLen-1), &wideResult) == TCL_OK) {\n-+        *exprResultPtr = wideResult;\n-         return TCL_OK;\n-     }\n- \n-@@ -350,7 +359,7 @@\n-         return TCL_OK;\n-     }\n- \n--    sprintf (staticBuf, \"%d\",\n-+    sprintf (staticBuf, \"%\" TCL_Z_MODIFIER \"d\",\n-              stringLen - ((exprStr [0] == 'e') ? 1 : 0));\n-     exprLen = strlen (staticBuf) + exprStrLen - 2;\n- \n-@@ -762,7 +771,7 @@\n- {\n-     char    *commandName;\n-     Tcl_Obj *resultPtr = Tcl_GetObjResult (interp);\n--    int      commandLength;\n-+    Tcl_Size commandLength;\n- \n-     commandName = Tcl_GetStringFromObj (commandNameObj, &commandLength);\n- \n-@@ -833,7 +842,7 @@\n- {\n-     static const Tcl_ObjType *listType = NULL;\n-     static const Tcl_ObjType *stringType = NULL;\n--    int length;\n-+    Tcl_Size length;\n-     \n-     /*\n-      * Only get types once, as they must be static.\n-@@ -914,8 +923,8 @@\n- TclX_RestoreResultErrorInfo (Tcl_Interp *interp, Tcl_Obj *saveObjPtr)\n- {\n-     Tcl_Obj **saveObjv;\n--    int saveObjc;\n--    long flags = 0;\n-+    Tcl_Size  saveObjc;\n-+    long      flags = 0;\n- \n-     if ((Tcl_ListObjGetElements (NULL, saveObjPtr, &saveObjc,\n-                                  &saveObjv) != TCL_OK) ||\n-@@ -947,7 +956,7 @@\n-  * in conflict with other extensions.\n-  *\n-  * Parameters:\n-- *   o Like Tcl_CreateObjCommand\n-+ *   o Like Tcl_CreateObjCommand2\n-  *   o flags - Additional flags to control the behaviour of the procedure.\n-  *--------------------------------------------------------------------------\n-  */\n-@@ -955,7 +964,7 @@\n- int\n- TclX_CreateObjCommand (Tcl_Interp        *interp,\n-                        char              *cmdName,\n--                       Tcl_ObjCmdProc    *proc,\n-+                       Tcl_ObjCmdProc2   *proc,\n-                        ClientData         clientData,\n-                        Tcl_CmdDeleteProc *deleteProc,\n-                        int                flags)\n-@@ -970,13 +979,13 @@\n-     if ((flags & TCLX_CMD_REDEFINE) ||\n- \t    !(Tcl_FindHashEntry(gTblPtr, cmdName) ||\n- \t\t    Tcl_FindHashEntry(cTblPtr, cmdName))) {\n--\tTcl_CreateObjCommand(interp, cmdName, proc, clientData, deleteProc);\n-+\tTcl_CreateObjCommand2(interp, cmdName, proc, clientData, deleteProc);\n-     }\n-     if (!(cmdName[0] == 't' && cmdName[1] == 'c' && cmdName[2] == 'l' &&\n- \t    cmdName[3] == 'x') && !(flags & TCLX_CMD_NOPREFIX)) {\n- \tchar cmdnamebuf[80];\n- \tsprintf(cmdnamebuf, \"tclx_%s\", cmdName);\n--\tTcl_CreateObjCommand(interp, cmdnamebuf, proc, clientData, deleteProc);\n-+\tTcl_CreateObjCommand2(interp, cmdnamebuf, proc, clientData, deleteProc);\n-     }\n- \n-     return TCL_OK;\n---- a/library/buildidx.tcl\n-+++ b/library/buildidx.tcl\n-@@ -149,7 +149,7 @@\n-         if ![cequal $tcl_platform(platform) \"unix\"] return\n- \n-         file stat $libName statInfo\n--        chmod $statInfo(mode) $idxName\n-+        chmod [format %o $statInfo(mode)] $idxName\n-         catch {\n-            chown [list $statInfo(uid) $statInfo(gid)] $idxName\n-         }\n---- a/library/convlib.tcl\n-+++ b/library/convlib.tcl\n-@@ -44,11 +44,11 @@\n-             if {!([cequal $hdr {# Tcl autoload index file, version 2.0}] ||\n-                 [cequal $hdr == {# Tcl autoload index file, version 2.0 for [incr Tcl]}])} {\n-                     error \"can only convert version 2.0 Tcl auto-load files\"\n--                }\n--            set dir [file dirname $tclIndex]  ;# Expected by the script.\n--            eval [read $tclIndexFH]\n--        }  {} {\n--            close $tclIndexFH\n-+            }\n-+\t    set dir [file dirname $tclIndex]  ;# Expected by the script.\n-+\t    eval [read $tclIndexFH]\n-+\t} {} {\n-+\t    close $tclIndexFH\n-         }\n-         foreach procName [array names auto_index] {\n-             if ![string match \"source *\" $auto_index($procName)] {\n-@@ -57,7 +57,10 @@\n-                 set allOK 0\n-                 continue\n-             }\n--            set filePath [lindex $auto_index($procName) 1]\n-+\t    # If the \"source\" command includes the -encoding options,\n-+\t    # skip over it to find the filePath\n-+\t    set ix [expr {[string match \"-enc*\" [lindex $auto_index($procName) 1]] ? 3 : 1}]\n-+            set filePath [lindex $auto_index($procName) $ix]\n-             set fileName [file tail $filePath] \n-             if {[lsearch $ignore $fileName] >= 0} continue\n-             \n-@@ -76,6 +79,7 @@\n- # list\n- \n- proc convert_lib {tclIndex packageLib {ignore {}}} {\n-+    puts [list convert_lib $tclIndex $packageLib $ignore]\n-     if {[file tail $tclIndex] != \"tclIndex\"} {\n-         error \"Tail file name must be `tclIndex': $tclIndex\"}\n-     if ![file readable $tclIndex] {\n---- a/library/fmath.tcl\n-+++ b/library/fmath.tcl\n-@@ -20,33 +20,44 @@\n- #@package: TclX-fmath acos asin atan ceil cos cosh exp fabs floor log log10 \\\n-            sin sinh sqrt tan tanh fmod pow atan2 abs double int round\n- \n--proc acos  x {uplevel 1 [list expr acos($x)]}\n--proc asin  x {uplevel 1 [list expr asin($x)]}\n--proc atan  x {uplevel 1 [list expr atan($x)]}\n--proc ceil  x {uplevel 1 [list expr ceil($x)]}\n--proc cos   x {uplevel 1 [list expr cos($x)]}\n--proc cosh  x {uplevel 1 [list expr cosh($x)]}\n--proc exp   x {uplevel 1 [list expr exp($x)]}\n--proc fabs  x {uplevel 1 [list expr abs($x)]}\n--proc floor x {uplevel 1 [list expr floor($x)]}\n--proc log   x {uplevel 1 [list expr log($x)]}\n--proc log10 x {uplevel 1 [list expr log10($x)]}\n--proc sin   x {uplevel 1 [list expr sin($x)]}\n--proc sinh  x {uplevel 1 [list expr sinh($x)]}\n--proc sqrt  x {uplevel 1 [list expr sqrt($x)]}\n--proc tan   x {uplevel 1 [list expr tan($x)]}\n--proc tanh  x {uplevel 1 [list expr tanh($x)]}\n--\n--proc fmod {x n} {uplevel 1 [list expr fmod($x,$n)]}\n--proc pow {x n} {uplevel 1 [list expr pow($x,$n)]}\n--\n--# New functions that TclX did not provide in eariler versions.\n--\n--proc atan2  x {uplevel 1 [list expr atan2($x)]}\n--proc abs    x {uplevel 1 [list expr abs($x)]}\n--proc double x {uplevel 1 [list expr double($x)]}\n--proc int    x {uplevel 1 [list expr int($x)]}\n--proc round  x {uplevel 1 [list expr round($x)]}\n-+if {[package vcompare $::tcl_version 9.0] >= 0} {\n-+    foreach mfunc [info commands ::tcl::mathfunc::*] {\n-+\tset mname [namespace tail $mfunc]\n-+\tif {[info commands $mname] ne \"\"} continue\n-+\tif {$mname in {coalesce}} continue\n-+\n-+\tproc $mname args [format {uplevel 1 [list expr %s([join $args ,])]} $mname]\n-+    }\n-+    proc fabs args {uplevel 1 [list expr abs([join $args ,])]}\n-+} else {\n-+    proc acos  x {uplevel 1 [list expr acos($x)]}\n-+    proc asin  x {uplevel 1 [list expr asin($x)]}\n-+    proc atan  x {uplevel 1 [list expr atan($x)]}\n-+    proc ceil  x {uplevel 1 [list expr ceil($x)]}\n-+    proc cos   x {uplevel 1 [list expr cos($x)]}\n-+    proc cosh  x {uplevel 1 [list expr cosh($x)]}\n-+    proc exp   x {uplevel 1 [list expr exp($x)]}\n-+    proc fabs  x {uplevel 1 [list expr abs($x)]}\n-+    proc floor x {uplevel 1 [list expr floor($x)]}\n-+    proc log   x {uplevel 1 [list expr log($x)]}\n-+    proc log10 x {uplevel 1 [list expr log10($x)]}\n-+    proc sin   x {uplevel 1 [list expr sin($x)]}\n-+    proc sinh  x {uplevel 1 [list expr sinh($x)]}\n-+    proc sqrt  x {uplevel 1 [list expr sqrt($x)]}\n-+    proc tan   x {uplevel 1 [list expr tan($x)]}\n-+    proc tanh  x {uplevel 1 [list expr tanh($x)]}\n-+\n-+    proc fmod {x n} {uplevel 1 [list expr fmod($x,$n)]}\n-+    proc pow {x n} {uplevel 1 [list expr pow($x,$n)]}\n-+\n-+    # New functions that TclX did not provide in eariler versions.\n-+\n-+    proc atan2  x {uplevel 1 [list expr atan2($x)]}\n-+    proc abs    x {uplevel 1 [list expr abs($x)]}\n-+    proc double x {uplevel 1 [list expr double($x)]}\n-+    proc int    x {uplevel 1 [list expr int($x)]}\n-+    proc round  x {uplevel 1 [list expr round($x)]}\n-+}\n- \n- \n- \n---- a/library/profrep.tcl\n-+++ b/library/profrep.tcl\n-@@ -70,10 +70,10 @@\n-     proc sort {profDataVar sortKey} {\n-         upvar $profDataVar profData\n- \n--        case $sortKey {\n--            {calls} {set keyIndex 0}\n--            {real}  {set keyIndex 1}\n--            {cpu}   {set keyIndex 2}\n-+        switch -- $sortKey {\n-+            calls {set keyIndex 0}\n-+            real  {set keyIndex 1}\n-+            cpu   {set keyIndex 2}\n-             default {\n-                 error \"Expected a sort type of: `calls', `cpu' or ` real'\"\n-             }\n---- a/library/stringfile.tcl\n-+++ b/library/stringfile.tcl\n-@@ -19,15 +19,28 @@\n- #@package: TclX-stringfile_functions read_file write_file\n- \n- proc read_file {fileName args} {\n--    if {$fileName == \"-nonewline\"} {\n-+    set flag {}\n-+    set otherargs {}\n-+    if {$fileName in {-nonewline nonewline}} {\n-         set flag $fileName\n-         set fileName [lvarpop args]\n-     } else {\n--        set flag {}\n-+\tforeach arg $args {\n-+\t    switch -- $arg {\n-+\t\tnonewline -\n-+\t\t-nonewline {\n-+\t\t    set flag -nonewline\n-+\t\t}\n-+\t\tdefault {\n-+\t\t    lappend otherargs $arg\n-+\t\t}\n-+\t    }\n-+\t}\n-+\tset args $otherargs\n-     }\n-     set fp [open $fileName]\n-     try_eval {\n--        set result [eval read $flag $fp $args]\n-+        set result [read {*}$flag $fp {*}$args]\n-     } {} {\n-         close $fp\n-     }\n---- a/library/tcllib.tcl\n-+++ b/library/tcllib.tcl\n-@@ -36,7 +36,7 @@\n- #------------------------------------------------------------------------------\n- #\n- \n--#@package: TclX-libraries searchpath auto_load_file\n-+@package: TclX-libraries searchpath auto_load_file\n- \n- #------------------------------------------------------------------------------\n- # searchpath:\n---- a/library/tclx.tcl\n-+++ b/library/tclx.tcl\n-@@ -6,13 +6,15 @@\n- \n- namespace eval ::tclx {\n-     global auto_path auto_index tclx_library\n--    if {[info exists tclx_library] && [string length $tclx_library]} {\n--\tset auto_index(buildpackageindex) \\\n--\t\t{source [file join $tclx_library buildidx.tcl]}\n--\tif {![info exists auto_path] ||\n--\t    [lsearch -exact $auto_path $tclx_library] == -1} {\n--\t    lappend auto_path $tclx_library\n-+    if {[info exists ::tclx_library] && [string length $::tclx_library]} {\n-+\tset ::auto_index(buildpackageindex) \\\n-+\t\t{source [file join $::tclx_library buildidx.tcl]}\n-+\tif {![info exists ::auto_path] ||\n-+\t    [lsearch -exact $::auto_path $::tclx_library] == -1} {\n-+\t    lappend ::auto_path $::tclx_library\n- \t}\n-+    } else {\n-+\tputs \"tclx_library not defined\"\n-     }\n- \n-     variable file \"\"\n---- a/tests/all.tcl\n-+++ b/tests/all.tcl\n-@@ -46,7 +46,7 @@\n- set timeCmd {clock format [clock seconds]}\n- puts stdout \"Tests began at [eval $timeCmd]\"\n- \n--package require Tclx 8.6\n-+package require Tclx 8.6-\n- \n- \n- # Hook to determine if any of the tests failed. Then we can exit with\n---- a/tests/arrayproc.test\n-+++ b/tests/arrayproc.test\n-@@ -21,7 +21,7 @@\n-     namespace import ::tcltest::*\n- }\n- \n--package require Tclx 8.4\n-+package require Tclx 8.4-\n- \n- set testArray(foo) bar\n- set testArray(snap) frammistan\n---- a/tests/chmod.test\n-+++ b/tests/chmod.test\n-@@ -30,12 +30,23 @@\n-     return\n- }\n- \n-+# Tcl 9 treats leading-0 as decimal, so chmod must parse octal manually.\n-+# permissiveOctal: tests using 0d prefix (Tcl 9 only)\n-+# strictOctal: tests where bare integers are NOT octal (Tcl 9 only)\n-+if {[package vcompare [package provide Tcl] 9.0] >= 0} {\n-+    testConstraint permissiveOctal 1\n-+    testConstraint strictOctal 1\n-+} else {\n-+    testConstraint permissiveOctal 0\n-+    testConstraint strictOctal 0\n-+}\n-+\n- #-----------------------------------------------------------------------------\n- # This routine to the the mode of a file.  It is returned formated in octal.\n-  \n- proc GetMode {filename} {\n-     file stat $filename stat\n--    return [format \"%o\" [expr {$stat(mode) & 07777}]]\n-+    return [format \"%o\" [expr {$stat(mode) & 0o7777}]]\n- }\n- \n- #-----------------------------------------------------------------------------\n-@@ -210,102 +221,114 @@\n-     GetMode CHMOD.TMP\n- } {4111}\n- \n--test chmod-2.1 {chmod absolute integer mode tests} {\n-+test chmod-2.1.0 {chmod absolute integer mode tests} permissiveOctal {\n-+    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod  0d65 {CHMOD.TMP CHMOD2.TMP}\n-+    list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n-+} {101 101}\n-+\n-+test chmod-2.1.1 {chmod absolute integer mode tests} strictOctal {\n-     chmod   0 {CHMOD.TMP CHMOD2.TMP}\n-     chmod  65 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n--} {101 101}\n-+} {65 65}\n- \n--test chmod-2.2 {chmod absolute integer mode tests} {\n--    chmod 0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 8 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-2.2 {chmod absolute integer mode tests} permissiveOctal {\n-+    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 0d8 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {10 10}\n- \n--test chmod-2.3 {chmod absolute integer mode tests} {\n--    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 511 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-2.3.0 {chmod absolute integer mode tests} permissiveOctal {\n-+    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 0d511 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {777 777}\n- \n--test chmod-2.4 {chmod absolute integer mode tests} {\n--    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 438 {CHMOD.TMP CHMOD2.TMP}\n-+test chmod-2.3.1 {chmod absolute integer mode tests} strictOctal {\n-+    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 0d511 {CHMOD.TMP CHMOD2.TMP}\n-+    list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n-+} {777 777}\n-+\n-+test chmod-2.4 {chmod absolute integer mode tests} permissiveOctal {\n-+    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 0d438 {CHMOD.TMP CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {666 666}\n- \n--test chmod-2.5 {chmod absolute integer mode tests} {\n--    chmod   0 {CHMOD.TMP CHMOD2.TMP}\n--    chmod 453 {CHMOD.TMP  CHMOD2.TMP}\n-+test chmod-2.5 {chmod absolute integer mode tests} permissiveOctal {\n-+    chmod     0 {CHMOD.TMP CHMOD2.TMP}\n-+    chmod 0d453 {CHMOD.TMP  CHMOD2.TMP}\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {705 705}\n- \n--test chmod-2.6 {chmod absolute integer mode tests} {\n--    chmod 0    CHMOD.TMP\n--    chmod 2121 CHMOD.TMP\n-+test chmod-2.6 {chmod absolute integer mode tests} permissiveOctal {\n-+    chmod      0 CHMOD.TMP\n-+    chmod 0d2121 CHMOD.TMP\n-     GetMode    CHMOD.TMP\n- } {4111}\n- \n--test chmod-2.7 {chmod absolute integer mode tests} {need_fchmod} {\n-+test chmod-2.7 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid   0 [list $fh1 $fh2]\n--    chmod -fileid  65 [list $fh1 $fh2]\n-+    chmod -fileid     0 [list $fh1 $fh2]\n-+    chmod -fileid  0d65 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {101 101}\n- \n--test chmod-2.8 {chmod absolute integer mode tests} {need_fchmod} {\n-+test chmod-2.8 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid 0 [list $fh1 $fh2]\n--    chmod -fileid 8 [list $fh1 $fh2]\n-+    chmod -fileid  0 [list $fh1 $fh2]\n-+    chmod -fileid 10 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {10 10}\n- \n--test chmod-2.9 {chmod absolute integer mode tests} {need_fchmod} {\n-+test chmod-2.9 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n-     chmod -fileid   0 [list $fh1 $fh2]\n--    chmod -fileid 511 [list $fh1 $fh2]\n-+    chmod -fileid 777 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {777 777}\n- \n--test chmod-2.10 {chmod absolute integer mode tests} {need_fchmod} {\n-+test chmod-2.10 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid   0 [list $fh1 $fh2]\n--    chmod -fileid 438 [list $fh1 $fh2]\n-+    chmod -fileid     0 [list $fh1 $fh2]\n-+    chmod -fileid 0d438 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {666 666}\n- \n--test chmod-2.11 {chmod absolute integer mode tests} {need_fchmod} {\n-+test chmod-2.11 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh1 [open CHMOD.TMP w]\n-     set fh2 [open CHMOD2.TMP w]\n--    chmod -fileid   0 [list $fh1 $fh2]\n--    chmod -fileid 453 [list $fh1 $fh2]\n-+    chmod -fileid     0 [list $fh1 $fh2]\n-+    chmod -fileid 0d453 [list $fh1 $fh2]\n-     close $fh1\n-     close $fh2\n-     list [GetMode CHMOD.TMP] [GetMode CHMOD2.TMP]\n- } {705 705}\n- \n--test chmod-2.12 {chmod absolute integer mode tests} {need_fchmod} {\n-+test chmod-2.12 {chmod absolute integer mode tests} {need_fchmod permissiveOctal} {\n-     chmod 0600 {CHMOD.TMP CHMOD2.TMP}\n-     set fh [open CHMOD.TMP w]\n--    chmod -fileid 0    $fh\n--    chmod -fileid 2121 $fh\n-+    chmod -fileid   0    $fh\n-+    chmod -fileid 0d2121 $fh\n-     close $fh\n-     GetMode CHMOD.TMP\n- } {4111}\n---- a/tests/dup.test\n-+++ b/tests/dup.test\n-@@ -266,6 +266,16 @@\n-        set stat [catch {dup 100}]\n-        list $stat [lrange $errorCode 0 1]\n-     } {1 {POSIX EBADF}}\n-+\n-+    test dup-5.10 {dup tests} {\n-+\tset stat [catch {dup 9Jack} foo]\n-+\tlist $stat $foo\n-+    } {1 {invalid integer file number \"9Jack\", expected unsigned integer or Tcl file id}}\n-+\n-+    test dup-5.11 {dup tests} {\n-+\tset stat [catch {dup 18 offcourse} foo]\n-+\tlist $stat $foo\n-+    } {1 {the second argument, targetChannelId, is not allow when binding a file number to a Tcl channel}}\n- }\n- \n- TestRemove DUP.TMP DUP2.TMP INCMDS.TMP OUTPUT.TMP\n---- a/tests/filescan.test\n-+++ b/tests/filescan.test\n-@@ -31,7 +31,7 @@\n-     set Begin [csubstr $Name 0 $Last]\n-     set Digit [cindex $Name $Last]\n-     set Recurse 0\n--    case $Digit in {\n-+    switch -- $Digit {\n-         {9}     {set Digit A}\n-         {Z}     {if {$Upper} {set Recurse 1} else {set Digit a}}\n-         {z}     {set Recurse 1}\n-@@ -146,7 +146,7 @@\n-     set key [keylget scanInfo key]\n-     set matchType [keylget scanInfo matchType]\n-     set cmd \"global matchInfo; ValMatch [list $scanInfo] 1.1\" \n--    case $matchType in {\n-+    switch -- $matchType {\n-       {0} {scanmatch -nocase $testCH [string toupper $key] $cmd}\n-       {1} {scanmatch $testCH ^$key  $cmd}\n-       {2} {scanmatch $testCH $key\\$ $cmd}\n-@@ -401,9 +401,15 @@\n- \n- set testCH [scancontext create]\n- \n--Test filescan-7.1 {filescan tests} {\n--    scanmatch $testCH {a[} {}\n--} 1 {couldn't compile regular expression pattern: brackets [] not balanced}\n-+if {[package vcompare [package provide Tcl] 9.0] >= 0} {\n-+    Test filescan-7.1 {filescan tests} {\n-+        scanmatch $testCH {a[} {}\n-+    } 1 {cannot compile regular expression pattern: brackets [] not balanced}\n-+} else {\n-+    Test filescan-7.1 {filescan tests} {\n-+        scanmatch $testCH {a[} {}\n-+    } 1 {couldn't compile regular expression pattern: brackets [] not balanced}\n-+}\n- \n- #\n- # Test the copy file manipulation by sorting a file of numbered lines into two\n---- a/tests/fstat.test\n-+++ b/tests/fstat.test\n-@@ -25,7 +25,7 @@\n- puts $gorpFH \"Test string\"\n- close $gorpFH\n- if ![cequal $tcl_platform(platform) windows] { ;# WIN32???\n--    chmod 0765 gorp.file\n-+    chmod 0o765 gorp.file\n- }\n- \n- set gorpFH [open gorp.file r+]\n-@@ -44,7 +44,7 @@\n- test fstat-1.2 {array return} {\n-     catch {unset stat}\n-     fstat $gorpFH stat stat\n--    list $stat(nlink) $stat(size) [expr $stat(mode)&0777] $stat(type) \\\n-+    list $stat(nlink) $stat(size) [expr $stat(mode)&0o777] $stat(type) \\\n- \t    $stat(tty)\n- } $expect\n- \n-@@ -74,7 +74,7 @@\n- test fstat-2.2 {keyed list returns} {\n-     set stat [fstat $gorpFH]\n-     list [keylget stat nlink] [keylget stat size] \\\n--         [expr [keylget stat mode ]&0777] [keylget stat type]\n-+         [expr [keylget stat mode ]&0o777] [keylget stat type]\n- } $expect\n- \n- if [cequal $tcl_platform(platform) windows] {\n---- a/tests/lgets.test\n-+++ b/tests/lgets.test\n-@@ -60,7 +60,7 @@\n- \n- test lgets-1.7 {lgets command with EOF in list element} {\n-     set f [open test2.tmp w]\n--    puts $f \"Test1  \\{Test2 \" nonewline\n-+    puts -nonewline $f \"Test1  \\{Test2 \"\n-     close $f\n-     set f [open test2.tmp]\n-     list [catch {lgets $f} msg] $msg\n-@@ -70,7 +70,7 @@\n- \n- test lgets-1.8 {lgets command with EOF in list} {\n-     set f [open test2.tmp w]\n--    puts $f \"Test1\\nTest2\" nonewline\n-+    puts -nonewline $f \"Test1\\nTest2\" \n-     close $f\n-     set f [open test2.tmp]\n-     set x {}\n---- a/tests/lmatch.test\n-+++ b/tests/lmatch.test\n-@@ -41,9 +41,15 @@\n-     lmatch -exact [list a\\0A a b\\0a a\\0A] a\\0A\n- } 0 [list a\\0A  a\\0A]\n- \n--Test lmatch-2.3 {search modes} {\n--    lmatch -regexp {xyz bbcc *bc*} *bc*\n--} 1 {couldn't compile regular expression pattern: quantifier operand invalid}\n-+if {[package vcompare [package provide Tcl] 9.0] >= 0} {\n-+    Test lmatch-2.3 {search modes} {\n-+        lmatch -regexp {xyz bbcc *bc*} *bc*\n-+    } 1 {cannot compile regular expression pattern: invalid quantifier operand}\n-+} else {\n-+    Test lmatch-2.3 {search modes} {\n-+        lmatch -regexp {xyz bbcc *bc*} *bc*\n-+    } 1 {couldn't compile regular expression pattern: quantifier operand invalid}\n-+}\n- \n- Test lmatch-2.4 {search modes} {\n-     lmatch -regexp {b.x ^bc xy bcx bca} ^bc\n---- a/tests/math.test\n-+++ b/tests/math.test\n-@@ -20,6 +20,8 @@\n-     source [file join [file dirname [info script]] testlib.tcl]\n- }\n- \n-+set isTcl9 [expr {[package vcompare [package provide Tcl] 9.0] >= 0}]\n-+\n- random seed 100\n- \n- for {set i 0} {$i < 100} {set i [expr $i+1]} {\n-@@ -63,21 +65,47 @@\n-     max -68.7\n- } 0 -68.7\n- \n--Test math-2.4.2 {max tests} {\n--    max -68.7 0x200 010\n--} 0 0x200\n--\n--Test math-2.4.3 {max tests} {\n--    max 668e7 0x200 010\n--} 0 668e7\n--\n--Test math-2.5 {max tests} {\n--    max\n--} 1 {wrong # args: max num1 ?..numN?}\n--\n--Test math-2.6 {max tests} {\n--    max 1 2 3 foo\n--} 1 {expected floating-point number but got \"foo\"}\n-+if {$isTcl9} {\n-+    Test math-2.4.2 {max tests} {\n-+        max -68.7 0x200 0o10\n-+    } 0 512\n-+} else {\n-+    Test math-2.4.2 {max tests} {\n-+        max -68.7 0x200 010\n-+    } 0 0x200\n-+}\n-+\n-+if {$isTcl9} {\n-+    Test math-2.4.3 {max tests} {\n-+        max 668e7 0x200 0o10\n-+    } 0 6680000000.0\n-+} else {\n-+    Test math-2.4.3 {max tests} {\n-+        max 668e7 0x200 010\n-+    } 0 668e7\n-+}\n-+\n-+if {$isTcl9} {\n-+    Test math-2.5 {max tests} {\n-+        max\n-+    } 1 {not enough arguments for math function \"max\"}\n-+} else {\n-+    Test math-2.5 {max tests} {\n-+        max\n-+    } 1 {wrong # args: max num1 ?..numN?}\n-+}\n-+\n-+if {$isTcl9} {\n-+    Test math-2.6 {max tests} {\n-+        max 1 2 3 foo\n-+    } 1 {invalid bareword \"foo\"\n-+in expression \"max(1,2,3,foo)\";\n-+should be \"$foo\" or \"{foo}\" or \"foo(...)\" or ...}\n-+} else {\n-+    Test math-2.6 {max tests} {\n-+        max 1 2 3 foo\n-+    } 1 {expected floating-point number but got \"foo\"}\n-+}\n- \n- Test math-3.1 {min tests} {\n-     min 1 2 4 3\n-@@ -99,17 +127,37 @@\n-     min 5 0x200 010\n- } 0 5\n- \n--Test math-3.3.2 {min tests} {\n--    min 5e10 0x200 010\n--} 0 010\n--\n--Test math-3.4 {min tests} {\n--    min\n--} 1 {wrong # args: min num1 ?..numN?}\n--\n--Test math-3.5 {min tests} {\n--    min 1 2 3 foo\n--} 1 {expected floating-point number but got \"foo\"}\n-+if {$isTcl9} {\n-+    Test math-3.3.2 {min tests} {\n-+        min 5e10 0x200 0o10\n-+    } 0 8\n-+} else {\n-+    Test math-3.3.2 {min tests} {\n-+        min 5e10 0x200 010\n-+    } 0 010\n-+}\n-+\n-+if {$isTcl9} {\n-+    Test math-3.4 {min tests} {\n-+        min\n-+    } 1 {not enough arguments for math function \"min\"}\n-+} else {\n-+    Test math-3.4 {min tests} {\n-+        min\n-+    } 1 {wrong # args: min num1 ?..numN?}\n-+}\n-+\n-+if {$isTcl9} {\n-+    Test math-3.5 {min tests} {\n-+        min 1 2 3 foo\n-+    } 1 {invalid bareword \"foo\"\n-+in expression \"min(1,2,3,foo)\";\n-+should be \"$foo\" or \"{foo}\" or \"foo(...)\" or ...}\n-+} else {\n-+    Test math-3.5 {min tests} {\n-+        min 1 2 3 foo\n-+    } 1 {expected floating-point number but got \"foo\"}\n-+}\n- \n- \n- Test math-4.1 {max function tests} {\n---- a/tests/stringfil.test\n-+++ b/tests/stringfil.test\n-@@ -47,7 +47,7 @@\n- } 0 [crange $stringfileTestVar 0 2]\n- \n- Test stringfile-2.4 {read_file command} {\n--    read_file STRINGFIL.DAT nonewline\n-+    read_file STRINGFIL.DAT -nonewline\n- } 0 $stringfileTestVar\n- \n- TestRemove STRINGFIL.DAT\n---- a/tests/tcllib.test\n-+++ b/tests/tcllib.test\n-@@ -21,7 +21,15 @@\n-     source [file join [file dirname [info script]] testlib.tcl]\n- }\n- \n--auto_load auto_reset  ;# Make sure we have this before changing path.\n-+# Tcl's auto_reset (from auto.tcl) is auto-loaded, so it appears in\n-+# auto_index and deletes itself when called.  After that it can't be\n-+# re-loaded if auto_path doesn't include [info library].  Override with\n-+# a directly-defined proc that won't appear in auto_index and thus\n-+# won't delete itself.\n-+proc auto_reset {} {\n-+    global auto_execs auto_index auto_oldpath\n-+    unset -nocomplain auto_execs auto_index auto_oldpath ::tcl::auto_oldpath\n-+}\n- \n- global save_auto_path auto_path\n- set save_auto_path $auto_path\n-@@ -45,6 +53,10 @@\n- proc TclLibReset {} {\n-     auto_reset\n-     catch {unset auto_pkg_index}\n-+    # Re-register buildpackageindex since TclX sets it manually in tclx.tcl\n-+    # (there is no tclIndex in the tclx_library directory).\n-+    set ::auto_index(buildpackageindex) \\\n-+        {source [file join $::tclx_library buildidx.tcl]}\n- }\n- \n- #\n-@@ -249,6 +261,9 @@\n- TclLibReset\n- \n- test tcllib-7.2 {Duplicate package handling} {\n-+    # Our auto_reset doesn't delete procs (see comment at top of file),\n-+    # so DupPkgTest from 7.1 persists.  Delete it to force re-autoload.\n-+    catch {rename DupPkgTest {}}\n-     lrmdups {a b c}  ;# Force load of indices.\n-     loadlibindex tcllib2.dir/test2.tlib\n-     DupPkgTest\n-@@ -273,6 +288,9 @@\n- }\n- \n- test tcllib-7.3 {Duplicate package handling} {\n-+    # Our auto_reset doesn't delete procs (see comment at top of file),\n-+    # so DupPkgTest from 7.2 persists.  Delete it to force re-autoload.\n-+    catch {rename DupPkgTest {}}\n-     DupPkgTest\n- } {Version-1}\n- \n---- a/tests/testlib.tcl\n-+++ b/tests/testlib.tcl\n-@@ -25,7 +25,7 @@\n-     package require tcltest\n-     namespace import ::tcltest::*\n- }\n--package require Tclx 8.4\n-+package require Tclx 8.4-\n- \n- foreach need {\n-     fchown fchmod flock fsync ftruncate msgcats posix_signals symlink\n---- a/unix/tclXchannelfd.c\n-+++ b/unix/tclXchannelfd.c\n-@@ -60,7 +60,7 @@\n- }\n- \f\n- static int\n--TclX_ChannelFdObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj*const objv[])\n-+TclX_ChannelFdObjCmd (ClientData clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj*const objv[])\n- {\n- \tconst char          *channelName;\n- \tTcl_Channel\t     channel;\n-@@ -95,7 +95,7 @@\n- void\n- TclX_ChannelFdInit (Tcl_Interp *interp)\n- {\n--\tTcl_CreateObjCommand (interp,\n-+\tTcl_CreateObjCommand2 (interp,\n- \t\t\t\"channelfd\",\n- \t\t\tTclX_ChannelFdObjCmd,\n- \t\t\t(ClientData) NULL,\n---- a/unix/tclXunixCmds.c\n-+++ b/unix/tclXunixCmds.c\n-@@ -22,13 +22,13 @@\n- static int\n- TclX_ChrootObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int         objc,\n-+                  Tcl_Size    objc,\n- \t\t\t      Tcl_Obj     *const objv[]);\n- \n- static int\n- TclX_TimesObjCmd (ClientData   clientData,\n-                  Tcl_Interp  *interp,\n--                 int          objc,\n-+                 Tcl_Size     objc,\n-                  Tcl_Obj      *const objv[]);\n- \n- \f\n-@@ -45,11 +45,11 @@\n- static int\n- TclX_ChrootObjCmd (ClientData clientData,\n-                   Tcl_Interp *interp,\n--                  int         objc,\n--\t\t\t      Tcl_Obj     *const objv[])\n-+                  Tcl_Size    objc,\n-+                  Tcl_Obj    *const objv[])\n- {\n--    char   *chrootString;\n--    int     chrootStrLen;\n-+    char    *chrootString;\n-+    Tcl_Size chrootStrLen;\n- \n-     if (objc != 2)\n- \treturn TclX_WrongArgs (interp, objv [0], \"path\");\n-@@ -78,7 +78,7 @@\n- static int\n- TclX_TimesObjCmd (ClientData   clientData,\n-                  Tcl_Interp  *interp,\n--                 int          objc,\n-+                 Tcl_Size     objc,\n-                  Tcl_Obj      *const objv[])\n- {\n-     struct tms tm;\n-@@ -108,13 +108,13 @@\n- void\n- TclX_PlatformCmdsInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"chroot\",\n- \t\t\t  TclX_ChrootObjCmd,\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc *) NULL);\n- \n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"times\",\n- \t\t\t  TclX_TimesObjCmd,\n-                           (ClientData) NULL,\n---- a/unix/tclXunixOS.c\n-+++ b/unix/tclXunixOS.c\n-@@ -1156,7 +1156,7 @@\n-     Tcl_DString  pathBuf;\n-     char        *fileNameString;\n-     Tcl_Obj    **filesObjv;\n--    int          fileCount;\n-+    Tcl_Size     fileCount;\n- \n-     if (ConvertOwnerGroup (interp, options, ownerStr, groupStr,\n-                            &ownerId, &groupId) != TCL_OK)\n-@@ -1237,7 +1237,7 @@\n-     gid_t        groupId;\n-     Tcl_Channel  channel;\n-     Tcl_Obj    **channelIdsListObj;\n--    int          channelCount;\n-+    Tcl_Size     channelCount;\n- \n-     if (ConvertOwnerGroup (interp, options, ownerStr, groupStr,\n-                            &ownerId, &groupId) != TCL_OK)\n---- a/unix/tclXunixSock.c\n-+++ b/unix/tclXunixSock.c\n-@@ -136,13 +136,13 @@\n-     struct sockaddr_in  local;\n-     int myPort, value;\n-     int backlog = 5;\n--    int getReserved = FALSE;\n-+    /*int getReserved = FALSE; deprecated */\n-     Tcl_Channel channel = NULL;\n- \n-     /*\n-      * Parse arguments.\n-      */\n--    bzero ((VOID *) &local, sizeof (local));\n-+    bzero ((void *) &local, sizeof (local));\n-     local.sin_family = AF_INET;\n-     local.sin_addr.s_addr = INADDR_ANY;\n-     nextArg = 1;\n-@@ -160,7 +160,8 @@\n-                 goto missingArg;\n-             nextArg++;\n-             if (STREQU (argv [nextArg], \"reserved\")) {\n--                getReserved = TRUE;\n-+\t      /* deprecated \n-+\t      **getReserved = TRUE; */\n-             } else {\n-                 if (Tcl_GetInt (interp, argv [nextArg], &myPort) != TCL_OK)\n-                     return TCL_ERROR;\n-@@ -193,15 +194,16 @@\n-     /*\n-      * Allocate a reserved port if requested.\n-      */\n--#ifdef HAVE_RRESVPORT\n--    if (getReserved) {\n--        int port;\n--        if (rresvport (&port) < 0)\n--            goto unixError;\n--        local.sin_port = port;\n--    }\n--#endif\n--\n-+/* Depricated\n-+**#ifdef HAVE_RRESVPORT\n-+**    if (getReserved) {\n-+**        int port;\n-+**        if (rresvport (&port) < 0)\n-+**            goto unixError;\n-+**        local.sin_port = port;\n-+**    }\n-+**#endif\n-+*/\n-     /*\n-      * Open a socket and bind an address and port to it.\n-      */\n-@@ -300,7 +302,7 @@\n-     /*\n-      * Accept a socket connection on the socket created by server_create.\n-      */\n--    bzero ((VOID *) &connectSocket, sizeof (connectSocket));\n-+    bzero ((void *) &connectSocket, sizeof (connectSocket));\n- \n-     channel = TclX_GetOpenChannel (interp, argv [nextArg], 0);\n-     if (channel == NULL)\n---- a/win/tclXwinCmds.c\n-+++ b/win/tclXwinCmds.c\n-@@ -22,13 +22,13 @@\n- static int \n- TclX_ChrootObjCmd (ClientData clientData,\n- \t\t\t\t  Tcl_Interp *interp, \n--\t\t\t      int         objc,\n-+\t\t\t      Tcl_Size        objc,\n- \t\t\t      Tcl_Obj     *const objv[]);\n- \n- static int \n- TclX_TimesObjCmd (ClientData   clientData,\n- \t\t\t\t Tcl_Interp  *interp,\n--\t\t\t\t int          objc,\n-+\t\t\t\t Tcl_Size     objc,\n- \t\t\t\t Tcl_Obj      *const objv[]);\n- \n- \f\n-@@ -40,7 +40,7 @@\n- static int\n- TclX_ChrootObjCmd (ClientData  clientData,\n-                   Tcl_Interp *interp,\n--                  int         objc,\n-+                  Tcl_Size    objc,\n-                   Tcl_Obj   *const objv[])\n- {\n-     return TclXNotAvailableObjError (interp, objv [0]);\n-@@ -54,7 +54,7 @@\n- static int\n- TclX_TimesObjCmd (ClientData  clientData,\n-                  Tcl_Interp *interp,\n--                 int         objc,\n-+                 Tcl_Size    objc,\n-                  Tcl_Obj   *const objv[])\n- {\n-     return TclXNotAvailableObjError (interp, objv [0]);\n-@@ -68,13 +68,13 @@\n- void\n- TclX_PlatformCmdsInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"chroot\",\n- \t\t\t  TclX_ChrootObjCmd,\n-                           (ClientData) NULL,\n- \t\t\t  (Tcl_CmdDeleteProc *) NULL);\n- \n--    Tcl_CreateObjCommand (interp, \n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"times\",\n- \t\t\t  TclX_TimesObjCmd,\n-                           (ClientData) NULL,\n---- a/win/tclXwinId.c\n-+++ b/win/tclXwinId.c\n-@@ -23,18 +23,18 @@\n-  */\n- static int\n- IdProcess  (Tcl_Interp *interp,\n--\t\t\tint objc,\n-+\t\t\tTcl_Size objc,\n- \t\t\tTcl_Obj *const objv[]);\n- \n- static int\n- IdHost (Tcl_Interp *interp,\n--\t\tint objc,\n-+\t\tTcl_Size objc,\n- \t\tTcl_Obj *const objv[]);\n- \n- static int \n- TclX_IdObjCmd (ClientData clientData,\n- \t\t\t   Tcl_Interp *interp,\n--\t\t\t   int objc,\n-+\t\t\t   Tcl_Size objc,\n- \t\t\t   Tcl_Obj *const objv[]);\n- \f\n- /*-----------------------------------------------------------------------------\n-@@ -55,7 +55,7 @@\n-  */\n- static int\n- IdProcess (Tcl_Interp *interp,\n--           int         objc,\n-+           Tcl_Size    objc,\n-            Tcl_Obj    *const objv[])\n- {\n-     Tcl_Obj *resultPtr = Tcl_GetObjResult (interp);\n-@@ -74,7 +74,7 @@\n-  */\n- static int\n- IdHost (Tcl_Interp *interp,\n--        int         objc,\n-+        Tcl_Size    objc,\n-         Tcl_Obj    *const objv[])\n- {\n-     char hostName [TCL_RESULT_SIZE];\n-@@ -96,7 +96,7 @@\n- static int\n- TclX_IdObjCmd (ClientData  clientData,\n-                Tcl_Interp *interp,\n--               int         objc,\n-+               Tcl_Size    objc,\n-                Tcl_Obj    *const objv[])\n- {\n-     char *optionPtr;\n-@@ -138,7 +138,7 @@\n- void\n- TclX_IdInit (Tcl_Interp *interp)\n- {\n--    Tcl_CreateObjCommand (interp,\n-+    Tcl_CreateObjCommand2 (interp,\n- \t\t\t  \"id\",\n- \t\t\t  TclX_IdObjCmd,\n-                           (ClientData) NULL,\n---- a/win/tclXwinOS.c\n-+++ b/win/tclXwinOS.c\n-@@ -489,6 +489,7 @@\n-     PROCESS_INFORMATION pi;\n-     STARTUPINFO si;\n-     BOOL bSuccess;\n-+    DWORD dwExitCode;\n- \n-     memset (&si, 0, sizeof (si));\n- \n-@@ -505,7 +506,8 @@\n-     }\n-     CloseHandle (pi.hThread);\n-     WaitForSingleObject (pi.hProcess, INFINITE);\n--    GetExitCodeProcess (pi.hProcess, exitCode);\n-+    GetExitCodeProcess (pi.hProcess, &dwExitCode);\n-+    *exitCode = (int) dwExitCode;\n-     CloseHandle (pi.hProcess);\n-     return TCL_OK;\n- }\ndiff --git a/debian/patches/tests.patch b/debian/patches/tests.patch\ndeleted file mode 100644\nindex 8f91f9d..0000000\n--- a/debian/patches/tests.patch\n+++ /dev/null\n@@ -1,30 +0,0 @@\n-Author: Sergei Golovan\n-Description: Patch defines ::tclx_library, which allows to run\n- tests for Tclx installed as a system-wide package. Otherwise,\n- the test suite cannot find buildidx.tcl.\n- Also, it replaces insufficiently slow command by a slower one\n- in profile.test.\n-Last-Update: Sun, 16 Aug 2026 12:14:35 +0300\n-\n---- a/tests/all.tcl\n-+++ b/tests/all.tcl\n-@@ -8,6 +8,8 @@\n- \n- package require Tclx\n- \n-+set ::tclx_library ./library\n-+\n- if {[lsearch [namespace children] ::tcltest] == -1} {\n-     package require tcltest\n-     namespace import ::tcltest::*\n---- a/tests/profile.test\n-+++ b/tests/profile.test\n-@@ -544,7 +544,7 @@\n-     set end   [expr $start+$amount]\n-     set cnt 0\n-     while {[lindex [times] 0] < $end} {\n--        format %d 100  ;# kind of slow command.\n-+        format %lld [expr {2**10000}]  ;# kind of slow command.\n-         incr cnt\n-         if {($cnt > 10000) && ([lindex [times] 0] == $start)} {\n-             error \"User CPU time does not appear to be accumulating\"\ndiff --git a/debian/patches/typos.patch b/debian/patches/typos.patch\nindex 3b0b920..ba8716c 100644\n--- a/debian/patches/typos.patch\n+++ b/debian/patches/typos.patch\n@@ -1,6 +1,6 @@\n Author: Paul Gevers <elbrus@debian.org>, Sergei Golovan <sgolovan@debian.org>\n Description: Fixes for a few grammar errors.\n-Last-Update: Fri, 10 Apr 2026 11:34:26 +0300\n+Last-Modified: Fri, 10 Apr 2026 11:34:26 +0300\n \n --- a/doc/Keylist.3\n +++ b/doc/Keylist.3\ndiff --git a/debian/rules b/debian/rules\nindex c067775..9ab9214 100755\n--- a/debian/rules\n+++ b/debian/rules\n@@ -1,6 +1,6 @@\n #!/usr/bin/make -f\n \n-TCLVERSIONS = 8.6 9.1\n+TCLVERSIONS = 8.6\n \n # Uncomment this to turn on verbose mode.\n #export DH_VERBOSE=1\n@@ -31,11 +31,7 @@ override_dh_auto_install:\n \tfor v in $(TCLVERSIONS) ; do \\\n \t\t$(MAKE) -C$(CURDIR)/debian/$$v install DESTDIR=$(CURDIR)/debian/tmp ; \\\n \t\tdir=$$(echo $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/tclx*) ; \\\n-\t\tif [ \"$$v\" = \"8.6\" ] ; then \\\n-\t\t    ln -s $$(basename $$dir/libtclx*.so) $$dir/libtclx.so ; \\\n-\t\telse \\\n-\t\t    ln -s $$(basename $$dir/libtcl9tclx*.so) $$dir/libtcl9tclx.so ; \\\n-\t\tfi ; \\\n+\t\tln -s $$(basename $$dir/libtclx*.so) $$dir/libtclx.so ; \\\n \tdone\n \t#\n \t# Fix up manpages\n@@ -43,7 +39,7 @@ override_dh_auto_install:\n \tln -nfs TclX.3tcl.gz $(CURDIR)/debian/tmp/usr/share/man/man3/tclx.3tcl.gz\n \t#\n \t# Load only on Tcl 8.6\n-\tsed -i '1i if {![package vsatisfies [package provide Tcl] 8.6-]} return' \\\n+\tsed -i '1i if {![package vsatisfies [package provide Tcl] 8.6]} return' \\\n \t    $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/tclx*/pkgIndex.tcl\n \n override_dh_gencontrol:\ndiff --git a/debian/tests/control b/debian/tests/control\ndeleted file mode 100644\nindex d54ab17..0000000\n--- a/debian/tests/control\n+++ /dev/null\n@@ -1,7 +0,0 @@\n-Test-Command: tclsh8.6 tests/all.tcl\n-Depends: @, tcl8.6\n-Restrictions: allow-stderr, isolation-container\n-\n-Test-Command: tclsh9.1 tests/all.tcl\n-Depends: @, tcl9.1\n-Restrictions: allow-stderr, isolation-container\n","content_type":"text/plain","diff_type":"vcs","new_revision":"git-v1:c81add0151dbc8f7f2134f8ed56065e632a1b0ae"}