From f090fee89b41ac4813b896edbdb20a31bdd9c703 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 10 Mar 2017 15:22:08 +0000 Subject: Start RC branch for Tcl 8.6.7 --- README | 2 +- generic/tcl.h | 4 ++-- library/init.tcl | 2 +- unix/configure | 2 +- unix/configure.in | 2 +- unix/tcl.spec | 2 +- win/configure | 2 +- win/configure.in | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README b/README index 401b6e6..57985d3 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ README: Tcl - This is the Tcl 8.6.6 source distribution. + This is the Tcl 8.6.7 source distribution. http://sourceforge.net/projects/tcl/files/Tcl/ You can get any source release of Tcl from the URL above. diff --git a/generic/tcl.h b/generic/tcl.h index 64c7d14..3790b58 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -55,10 +55,10 @@ extern "C" { #define TCL_MAJOR_VERSION 8 #define TCL_MINOR_VERSION 6 #define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TCL_RELEASE_SERIAL 6 +#define TCL_RELEASE_SERIAL 7 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6.6" +#define TCL_PATCH_LEVEL "8.6.7" /* *---------------------------------------------------------------------------- diff --git a/library/init.tcl b/library/init.tcl index 9ca4514..0437412 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -16,7 +16,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6.6 +package require -exact Tcl 8.6.7 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/unix/configure b/unix/configure index 38c3f9a..a333fc1 100755 --- a/unix/configure +++ b/unix/configure @@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".6" +TCL_PATCH_LEVEL=".7" VERSION=${TCL_VERSION} EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"} diff --git a/unix/configure.in b/unix/configure.in index 1d86213..220a4aa 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -25,7 +25,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".6" +TCL_PATCH_LEVEL=".7" VERSION=${TCL_VERSION} EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"} diff --git a/unix/tcl.spec b/unix/tcl.spec index 8bf77f3..141511d 100644 --- a/unix/tcl.spec +++ b/unix/tcl.spec @@ -4,7 +4,7 @@ Name: tcl Summary: Tcl scripting language development environment -Version: 8.6.6 +Version: 8.6.7 Release: 2 License: BSD Group: Development/Languages diff --git a/win/configure b/win/configure index e8e4b87..835afb8 100755 --- a/win/configure +++ b/win/configure @@ -1311,7 +1311,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".6" +TCL_PATCH_LEVEL=".7" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.4 diff --git a/win/configure.in b/win/configure.in index 8bb9c48..8d712eb 100644 --- a/win/configure.in +++ b/win/configure.in @@ -14,7 +14,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".6" +TCL_PATCH_LEVEL=".7" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.4 -- cgit v0.12 From e9e0f57d92722f8c472764114b517ff3556731a0 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 10 Mar 2017 15:28:46 +0000 Subject: Dup test name --- tests/link.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/link.test b/tests/link.test index dda7d6b..6bff356 100644 --- a/tests/link.test +++ b/tests/link.test @@ -152,7 +152,7 @@ test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup { set uwide "0O" concat [testlink get] | $int $real $bool $string $wide $char $uchar $short $ushort $uint $long $ulong $float $uwide } -result {0 0.0 0 0 0 0 0 0 0 0 0 0 0.0 0 | 0x 0b 0 0 0O 0X 0B 0O 0x 0b 0o 0X 0B 0O} -test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup { +test link-2.9 {writing C variables from Tcl} -constraints {testlink} -setup { testlink delete } -body { testlink set 43 1.21 4 - 56785678 64 250 30000 60000 0xbaadbeef 12321 32123 3.25 1231231234 -- cgit v0.12 From 91d32c45568c29a04d91d4ea742c10c290a05e8b Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 10 Mar 2017 16:41:32 +0000 Subject: Silence valgrind complaints from [representation]. --- generic/tclInt.h | 2 ++ generic/tclObj.c | 1 + 2 files changed, 3 insertions(+) diff --git a/generic/tclInt.h b/generic/tclInt.h index 4d3c0b1..65ef1c6 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4521,6 +4521,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; do { \ TclInvalidateStringRep(objPtr); \ TclFreeIntRep(objPtr); \ + (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \ (objPtr)->internalRep.doubleValue = (double)(d); \ (objPtr)->typePtr = &tclDoubleType; \ } while (0) @@ -4570,6 +4571,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; TclAllocObjStorage(objPtr); \ (objPtr)->refCount = 0; \ (objPtr)->bytes = NULL; \ + (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \ (objPtr)->internalRep.doubleValue = (double)(d); \ (objPtr)->typePtr = &tclDoubleType; \ TCL_DTRACE_OBJ_CREATE(objPtr); \ diff --git a/generic/tclObj.c b/generic/tclObj.c index a346987..d549fdc 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -2203,6 +2203,7 @@ Tcl_DbNewDoubleObj( TclDbNewObj(objPtr, file, line); objPtr->bytes = NULL; + objPtr->internalRep.twoPtrValue.ptr2 = NULL; /* valgrind */ objPtr->internalRep.doubleValue = dblValue; objPtr->typePtr = &tclDoubleType; return objPtr; -- cgit v0.12 From daac4e5d3412030256d30b357bd455dbfa09630f Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 13 Mar 2017 17:03:50 +0000 Subject: Different solution to silencing the non-useful valgrind alerts. --- generic/tclInt.h | 2 -- generic/tclObj.c | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 65ef1c6..4d3c0b1 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4521,7 +4521,6 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; do { \ TclInvalidateStringRep(objPtr); \ TclFreeIntRep(objPtr); \ - (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \ (objPtr)->internalRep.doubleValue = (double)(d); \ (objPtr)->typePtr = &tclDoubleType; \ } while (0) @@ -4571,7 +4570,6 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; TclAllocObjStorage(objPtr); \ (objPtr)->refCount = 0; \ (objPtr)->bytes = NULL; \ - (objPtr)->internalRep.twoPtrValue.ptr2 = NULL; \ (objPtr)->internalRep.doubleValue = (double)(d); \ (objPtr)->typePtr = &tclDoubleType; \ TCL_DTRACE_OBJ_CREATE(objPtr); \ diff --git a/generic/tclObj.c b/generic/tclObj.c index d549fdc..3bf5b8e 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -2203,7 +2203,6 @@ Tcl_DbNewDoubleObj( TclDbNewObj(objPtr, file, line); objPtr->bytes = NULL; - objPtr->internalRep.twoPtrValue.ptr2 = NULL; /* valgrind */ objPtr->internalRep.doubleValue = dblValue; objPtr->typePtr = &tclDoubleType; return objPtr; @@ -4489,6 +4488,24 @@ Tcl_RepresentationCmd( objv[1]->typePtr ? objv[1]->typePtr->name : "pure string", objv[1]->refCount, ptrBuffer); + /* + * This is a workaround to silence reports from `make valgrind` + * on 64-bit systems. The problem is that the test suite + * includes calling the [represenation] command on values of + * &tclDoubleType. When these values are created, the "doubleValue" + * is set, but when the "twoPtrValue" is examined, its "ptr2" + * field has never been initialized. Since [representation] + * presents the value of the ptr2 value in its output, valgrind + * alerts about the read of uninitialized memory. + * + * The general problem with [representation], that it can read + * and report uninitialized fields, is still present. This is + * just the minimal workaround to silence one particular test. + */ + + if ((sizeof(void *) > 4) && objv[1]->typePtr == &tclDoubleType) { + objv[1]->internalRep.twoPtrValue.ptr2 = NULL; + } if (objv[1]->typePtr) { sprintf(ptrBuffer, "%p:%p", (void *) objv[1]->internalRep.twoPtrValue.ptr1, -- cgit v0.12 From 1e22d92c69c72995470074b19b377d18ad60b4e6 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 11 Apr 2017 19:11:27 +0000 Subject: More changes work --- changes | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/changes b/changes index 68b2fb5..c3a4be3 100644 --- a/changes +++ b/changes @@ -8704,6 +8704,15 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich) 2016-09-07 (bug)[4dbdd9] Memleak in test var-8.3 (mr_calvin,porter) 2016-10-03 (bug)[2bf561] Allow empty command as alias target (yorick,nijtmans) + *** POTENTIAL INCOMPATIBILITY *** + +2016-10-04 (bug)[4d5ae7] Crash in async connects host no address (gahr,fellows) + +2016-10-08 (bug)[838e99] treat application/xml as text (gahr,fellows) +=> http 2.8.10 + +2016-10-11 (bug)[3cc1d9] Thread finalization crash in zippy (neumann) + -- cgit v0.12 From 5b059dfd6b3afbaed367204e6b690a4dafb54908 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 12 Apr 2017 20:23:56 +0000 Subject: Bump msgcat and tcl tests and continue updates to changes. --- changes | 12 ++++++++++++ library/msgcat/msgcat.tcl | 2 +- library/msgcat/pkgIndex.tcl | 2 +- library/tcltest/pkgIndex.tcl | 2 +- library/tcltest/tcltest.tcl | 2 +- unix/Makefile.in | 8 ++++---- win/Makefile.in | 8 ++++---- 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/changes b/changes index c3a4be3..bf25784 100644 --- a/changes +++ b/changes @@ -8713,6 +8713,18 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich) 2016-10-11 (bug)[3cc1d9] Thread finalization crash in zippy (neumann) +2016-10-12 (bug)[be003d] Fix [scan 0x1 %b], [scan 0x1 %o] (porter) + +2016-10-14 (bug)[eb6b68] Fix stringComp-14.5 (porter) + +2016-10-30 (bug)[b26e38] Fix zlib-7.8 (fellows) + +2016-10-30 (bug)[1ae129] Fix memleak in [history] destruction (fellows) + +2016-11-04 (feature) Provision Tcl 9 support in msgcat and tcltest (nijtmans) +=> msgcat 1.6.1 +=> tcltest 2.4.1 + diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index 928474d..646bc17 100644 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -14,7 +14,7 @@ package require Tcl 8.5- # When the version number changes, be sure to update the pkgIndex.tcl file, # and the installation directory in the Makefiles. -package provide msgcat 1.6.0 +package provide msgcat 1.6.1 namespace eval msgcat { namespace export mc mcexists mcload mclocale mcmax mcmset mcpreferences mcset\ diff --git a/library/msgcat/pkgIndex.tcl b/library/msgcat/pkgIndex.tcl index 7399c92..7cdb703 100644 --- a/library/msgcat/pkgIndex.tcl +++ b/library/msgcat/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded msgcat 1.6.0 [list source [file join $dir msgcat.tcl]] +package ifneeded msgcat 1.6.1 [list source [file join $dir msgcat.tcl]] diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl index 5ac8823..c9d3759 100644 --- a/library/tcltest/pkgIndex.tcl +++ b/library/tcltest/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded tcltest 2.4.0 [list source [file join $dir tcltest.tcl]] +package ifneeded tcltest 2.4.1 [list source [file join $dir tcltest.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 75975d2..f1b6082 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -22,7 +22,7 @@ namespace eval tcltest { # When the version number changes, be sure to update the pkgIndex.tcl file, # and the install directory in the Makefiles. When the minor version # changes (new feature) be sure to update the man page as well. - variable Version 2.4.0 + variable Version 2.4.1 # Compatibility support for dumb variables defined in tcltest 1 # Do not use these. Call [package provide Tcl] and [info patchlevel] diff --git a/unix/Makefile.in b/unix/Makefile.in index 9ad106c..e03e874 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -847,10 +847,10 @@ install-libraries: libraries do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \ done; - @echo "Installing package msgcat 1.6.0 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.6.0.tm; - @echo "Installing package tcltest 2.4.0 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.4.0.tm; + @echo "Installing package msgcat 1.6.1 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.6.1.tm; + @echo "Installing package tcltest 2.4.1 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.4.1.tm; @echo "Installing package platform 1.0.14 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.14.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 0ab4204..255c9b4 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -658,10 +658,10 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \ done; - @echo "Installing package msgcat 1.6.0 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.6.0.tm; - @echo "Installing package tcltest 2.4.0 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.4.0.tm; + @echo "Installing package msgcat 1.6.1 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.6.1.tm; + @echo "Installing package tcltest 2.4.1 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.4.1.tm; @echo "Installing package platform 1.0.14 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.14.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; -- cgit v0.12 From d2595ccfea5ca3671786fe69396b9ad3130be57a Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 13 Apr 2017 16:39:15 +0000 Subject: Bump TclOO 1.0.6; finish changes. --- changes | 29 +++++++++++++++++++++++++++-- generic/tclOO.h | 2 +- unix/tclooConfig.sh | 2 +- win/tclooConfig.sh | 2 +- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/changes b/changes index bf25784..74ab4ee 100644 --- a/changes +++ b/changes @@ -8721,19 +8721,44 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich) 2016-10-30 (bug)[1ae129] Fix memleak in [history] destruction (fellows) -2016-11-04 (feature) Provision Tcl 9 support in msgcat and tcltest (nijtmans) +2016-11-04 (feature) Provisional Tcl 9 support in msgcat and tcltest (nijtmans) => msgcat 1.6.1 => tcltest 2.4.1 +2016-11-04 (bug)[824752] Crash in Tcl_ListObjReplace() (gahr,porter) +2016-11-11 (bug)[79614f] invalidate VFS mounts on sytem encoding change (yorick) +2016-11-14 OSX: End panic() as legacy support macro; system conflicts (nijtmans) + *** POTENTIAL INCOMPATIBILITY *** + +2016-11-15 (bug) TclOO fix stops crash mixing Itcl and snit (fellows) +2016-11-17 (update) Reconcile libtommath updates; purge unused files (nijtmans) + *** POTENTIAL INCOMPATIBILITY *** +2017-01-09 (bug)[b87ad7] Repair drifts in timer clock (sebres) +2017-01-17 (update) => zlib 1.2.11 (nijtmans) + +2017-01-31 (bug)[39f630] Revise Tcl_LinkVar to tolerate some prefixes (nijtmans) + *** POTENTIAL INCOMPATIBILITY *** + +2017-02-01 (bug)[d0f7ba] Improper NAN optimization. expr-22.1[01] (aspect) + +2017-02-26 (bug)[25842c] zlib stream finalization (aspect) + +2017-03-07 (deprecate) Remove unmaintained makefile.bc file (nijtmans) + *** POTENTIAL INCOMPATIBILITY *** +2017-03-14 (enhancement) [clock] and [encoding] are now ensembles (kenny) +2017-03-15 (enhancement) several [clock] subcommands bytecoded (kenny) +2017-03-23 tzdata updated to Olson's tzdata2017b (jima) +2017-03-29 (bug)[900cb0] Fix OO unexport introspection (napier) +2017-04-12 (bug)[42202b] Nesting imbalance in coro injection (nadkarni,sebres) ---- Released 8.6.7, March 31, 2016 --- http://core.tcl.tk/tcl/ for details +--- Released 8.6.7, April 30, 2016 --- http://core.tcl.tk/tcl/ for details diff --git a/generic/tclOO.h b/generic/tclOO.h index 46f01fb..823d773 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -24,7 +24,7 @@ * win/tclooConfig.sh */ -#define TCLOO_VERSION "1.0.5" +#define TCLOO_VERSION "1.0.6" #define TCLOO_PATCHLEVEL TCLOO_VERSION #include "tcl.h" diff --git a/unix/tclooConfig.sh b/unix/tclooConfig.sh index ee10b81..e5d42bb 100644 --- a/unix/tclooConfig.sh +++ b/unix/tclooConfig.sh @@ -16,4 +16,4 @@ TCLOO_STUB_LIB_SPEC="" TCLOO_INCLUDE_SPEC="" TCLOO_PRIVATE_INCLUDE_SPEC="" TCLOO_CFLAGS="" -TCLOO_VERSION=1.0.4 +TCLOO_VERSION=1.0.6 diff --git a/win/tclooConfig.sh b/win/tclooConfig.sh index ee10b81..e5d42bb 100644 --- a/win/tclooConfig.sh +++ b/win/tclooConfig.sh @@ -16,4 +16,4 @@ TCLOO_STUB_LIB_SPEC="" TCLOO_INCLUDE_SPEC="" TCLOO_PRIVATE_INCLUDE_SPEC="" TCLOO_CFLAGS="" -TCLOO_VERSION=1.0.4 +TCLOO_VERSION=1.0.6 -- cgit v0.12 From 16f3f234e8500f5f71e4d9321689a8bdf9efc809 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 8 Jun 2017 08:26:58 +0000 Subject: Better UTF-8 surrogate handling, only functional when TCL_UTF_MAX>3 --- generic/tclBinary.c | 6 ++--- generic/tclCmdIL.c | 2 +- generic/tclCmdMZ.c | 10 ++++---- generic/tclCompExpr.c | 2 +- generic/tclEncoding.c | 20 +++++++-------- generic/tclLoad.c | 2 +- generic/tclParse.c | 2 +- generic/tclScan.c | 2 +- generic/tclStringObj.c | 4 +-- generic/tclUtf.c | 68 ++++++++++++++++++++++++++++++++++++-------------- generic/tclUtil.c | 2 +- win/tclWinPipe.c | 2 +- 12 files changed, 76 insertions(+), 46 deletions(-) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index d0d9d5e..bb918f2 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -454,7 +454,7 @@ SetByteArrayFromAny( const char *src, *srcEnd; unsigned char *dst; ByteArray *byteArrayPtr; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; if (objPtr->typePtr != &tclByteArrayType) { src = TclGetStringFromObj(objPtr, &length); @@ -1210,7 +1210,7 @@ BinaryFormatCmd( badField: { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; char buf[TCL_UTF_MAX + 1]; TclUtfToUniChar(errorString, &ch); @@ -1580,7 +1580,7 @@ BinaryScanCmd( badField: { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; char buf[TCL_UTF_MAX + 1]; TclUtfToUniChar(errorString, &ch); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index ba9e1cf..e3c5f10 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -4345,7 +4345,7 @@ static int DictionaryCompare( const char *left, const char *right) /* The strings to compare. */ { - Tcl_UniChar uniLeft, uniRight, uniLeftLower, uniRightLower; + Tcl_UniChar uniLeft = 0, uniRight = 0, uniLeftLower, uniRightLower; int diff, zeros; int secondaryDiff = 0; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 3f79ca4..7010495 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -1037,7 +1037,7 @@ Tcl_SplitObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; int len; const char *splitChars; const char *stringPtr; @@ -1122,7 +1122,7 @@ Tcl_SplitObjCmd( } else { const char *element, *p, *splitEnd; int splitLen; - Tcl_UniChar splitChar; + Tcl_UniChar splitChar = 0; /* * Normal case: split on any of a given set of characters. Discard @@ -1451,7 +1451,7 @@ StringIsCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { const char *string1, *end, *stop; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; int (*chcomp)(int) = NULL; /* The UniChar comparison function. */ int i, failat = 0, result = 1, strict = 0, index, length1, length2; Tcl_Obj *objPtr, *failVarObj = NULL; @@ -2436,7 +2436,7 @@ StringStartCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; const char *p, *string; int cur, index, length, numChars; @@ -2497,7 +2497,7 @@ StringEndCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; const char *p, *end, *string; int cur, index, length, numChars; diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 59eecf9..9c7ab8d 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -1885,7 +1885,7 @@ ParseLexeme( { const char *end; int scanned; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; Tcl_Obj *literal = NULL; unsigned char byte; diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index b4acb5f..8450128 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2296,7 +2296,7 @@ UtfToUtfProc( const char *srcStart, *srcEnd, *srcClose; const char *dstStart, *dstEnd; int result, numChars, charLimit = INT_MAX; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; result = TCL_OK; @@ -2345,8 +2345,8 @@ UtfToUtfProc( } else if (!Tcl_UtfCharComplete(src, srcEnd - src)) { /* * Always check before using TclUtfToUniChar. Not doing can so - * cause it run beyond the endof the buffer! If we happen such an - * incomplete char its byts are made to represent themselves. + * cause it run beyond the end of the buffer! If we happen such an + * incomplete char its bytes are made to represent themselves. */ ch = (unsigned char) *src; @@ -2410,7 +2410,7 @@ UnicodeToUtfProc( const char *srcStart, *srcEnd; const char *dstEnd, *dstStart; int result, numChars, charLimit = INT_MAX; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; if (flags & TCL_ENCODING_CHAR_LIMIT) { charLimit = *dstCharsPtr; @@ -2500,7 +2500,7 @@ UtfToUnicodeProc( { const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd; int result, numChars; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; srcStart = src; srcEnd = src + srcLen; @@ -2610,7 +2610,7 @@ TableToUtfProc( const char *srcStart, *srcEnd; const char *dstEnd, *dstStart, *prefixBytes; int result, byte, numChars, charLimit = INT_MAX; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; const unsigned short *const *toUnicode; const unsigned short *pageZero; TableEncodingData *dataPtr = clientData; @@ -2722,7 +2722,7 @@ TableFromUtfProc( { const char *srcStart, *srcEnd, *srcClose; const char *dstStart, *dstEnd, *prefixBytes; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; int result, len, word, numChars; TableEncodingData *dataPtr = clientData; const unsigned short *const *fromUnicode; @@ -2856,7 +2856,7 @@ Iso88591ToUtfProc( result = TCL_OK; for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; if (dst > dstEnd) { result = TCL_CONVERT_NOSPACE; @@ -2942,7 +2942,7 @@ Iso88591FromUtfProc( dstEnd = dst + dstLen - 1; for (numChars = 0; src < srcEnd; numChars++) { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; int len; if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) { @@ -3329,7 +3329,7 @@ EscapeFromUtfProc( for (numChars = 0; src < srcEnd; numChars++) { unsigned len; int word; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) { /* diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 942e6b4..f1bd248 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -130,7 +130,7 @@ Tcl_LoadObjCmd( Tcl_PackageInitProc *initProc; const char *p, *fullFileName, *packageName; Tcl_LoadHandle loadHandle; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; unsigned len; int index, flags = 0; Tcl_Obj *const *savedobjv = objv; diff --git a/generic/tclParse.c b/generic/tclParse.c index 3ecf4a5..f2cf322 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -841,7 +841,7 @@ TclParseBackslash( * written there. */ { register const char *p = src+1; - Tcl_UniChar unichar; + Tcl_UniChar unichar = 0; int result; int count; char buf[TCL_UTF_MAX]; diff --git a/generic/tclScan.c b/generic/tclScan.c index 17069eb..7a6a8a2 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -257,7 +257,7 @@ ValidateFormat( { int gotXpg, gotSequential, value, i, flags; char *end; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; int objIndex, xpgSize, nspace = numVars; int *nassign = TclStackAlloc(interp, nspace * sizeof(int)); char buf[TCL_UTF_MAX+1]; diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 4a3b6f1..0cafffb 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -1709,7 +1709,7 @@ Tcl_AppendFormatToObj( #endif int newXpg, numChars, allocSegment = 0, segmentLimit, segmentNumBytes; Tcl_Obj *segment; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; int step = TclUtfToUniChar(format, &ch); format += step; @@ -2693,7 +2693,7 @@ TclStringObjReverse( Tcl_Obj *objPtr) { String *stringPtr; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; if (TclIsPureByteArray(objPtr)) { int numBytes; diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 52b4291..db941e2 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -134,7 +134,7 @@ UtfCount( *--------------------------------------------------------------------------- */ -INLINE int +int Tcl_UniCharToUtf( int ch, /* The Tcl_UniChar to be stored in the * buffer. */ @@ -259,6 +259,15 @@ Tcl_UniCharToUtfDString( * Tcl_UtfCharComplete() before calling this routine to ensure that * enough bytes remain in the string. * + * If TCL_UTF_MAX == 4, special handling of Surrogate pairs is done: + * For any UTF-8 string containing a character outside of the BMP, the + * first call to this function will fill *chPtr with the high surrogate + * and generate a return value of 0. Calling Tcl_UtfToUniChar again + * will produce the low surrogate and a return value of 4. Because *chPtr + * is used to remember whether the high surrogate is already produced, it + * is recommended to initialize the variable it points to as 0 before + * the first call to Tcl_UtfToUniChar is done. + * * Results: * *chPtr is filled with the Tcl_UniChar, and the return value is the * number of bytes from the UTF-8 string that were consumed. @@ -278,7 +287,7 @@ Tcl_UtfToUniChar( register int byte; /* - * Unroll 1 to 3 byte UTF-8 sequences, use loop to handle longer ones. + * Unroll 1 to 3 (or 4) byte UTF-8 sequences. */ byte = *((unsigned char *) src); @@ -331,12 +340,30 @@ Tcl_UtfToUniChar( /* * Four-byte-character lead byte followed by three trail bytes. */ - +#if TCL_UTF_MAX == 4 + Tcl_UniChar surrogate; + + byte = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12) + | ((src[2] & 0x3F) << 6) | (src[3] & 0x3F)) - 0x10000; + surrogate = (Tcl_UniChar) (0xD800 + (byte >> 10)); + if (byte & 0x100000) { + /* out of range, < 0x10000 or > 0x10ffff */ + } else if (*chPtr != surrogate) { + /* produce high surrogate, but don't advance source pointer */ + *chPtr = surrogate; + return 0; + } else { + /* produce low surrogate, and advance source pointer */ + *chPtr = (Tcl_UniChar) (0xDC00 | (byte & 0x3FF)); + return 4; + } +#else *chPtr = (Tcl_UniChar) (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12) | ((src[2] & 0x3F) << 6) | (src[3] & 0x3F)); if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) { return 4; } +#endif } /* @@ -377,7 +404,7 @@ Tcl_UtfToUniCharDString( * appended to this previously initialized * DString. */ { - Tcl_UniChar *w, *wString; + Tcl_UniChar ch, *w, *wString; const char *p, *end; int oldLength; @@ -399,8 +426,8 @@ Tcl_UtfToUniCharDString( w = wString; end = src + length; for (p = src; p < end; ) { - p += TclUtfToUniChar(p, w); - w++; + p += TclUtfToUniChar(p, &ch); + *w++ = ch; } *w = '\0'; Tcl_DStringSetLength(dsPtr, @@ -434,9 +461,8 @@ Tcl_UtfCharComplete( * a complete UTF-8 character. */ int length) /* Length of above string in bytes. */ { - int ch; + int ch = *((unsigned char *) src); - ch = *((unsigned char *) src); return length >= totalBytes[ch]; } @@ -464,8 +490,7 @@ Tcl_NumUtfChars( int length) /* The length of the string in bytes, or -1 * for strlen(string). */ { - Tcl_UniChar ch; - register Tcl_UniChar *chPtr = &ch; + Tcl_UniChar ch = 0; register int i; /* @@ -478,7 +503,7 @@ Tcl_NumUtfChars( i = 0; if (length < 0) { while (*src != '\0') { - src += TclUtfToUniChar(src, chPtr); + src += TclUtfToUniChar(src, &ch); i++; } } else { @@ -489,7 +514,7 @@ Tcl_NumUtfChars( length--; src++; } else { - n = Tcl_UtfToUniChar(src, chPtr); + n = Tcl_UtfToUniChar(src, &ch); length -= n; src += n; } @@ -524,7 +549,7 @@ Tcl_UtfFindFirst( int ch) /* The Tcl_UniChar to search for. */ { int len; - Tcl_UniChar find; + Tcl_UniChar find = 0; while (1) { len = TclUtfToUniChar(src, &find); @@ -563,7 +588,7 @@ Tcl_UtfFindLast( int ch) /* The Tcl_UniChar to search for. */ { int len; - Tcl_UniChar find; + Tcl_UniChar find = 0; const char *last; last = NULL; @@ -603,9 +628,15 @@ const char * Tcl_UtfNext( const char *src) /* The current location in the string. */ { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; + int len = TclUtfToUniChar(src, &ch); - return src + TclUtfToUniChar(src, &ch); +#if TCL_UTF_MAX == 4 + if (len == 0) { + len = TclUtfToUniChar(src, &ch); + } +#endif + return src + len; } /* @@ -638,8 +669,7 @@ Tcl_UtfPrev( const char *look; int i, byte; - src--; - look = src; + look = --src; for (i = 0; i < TCL_UTF_MAX; i++) { if (look < start) { if (src < start) { @@ -712,7 +742,7 @@ Tcl_UtfAtIndex( register const char *src, /* The UTF-8 string. */ register int index) /* The position of the desired character. */ { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; while (index > 0) { index--; diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 553593c..0eddb00 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1646,7 +1646,7 @@ Tcl_Backslash( * src, unless NULL. */ { char buf[TCL_UTF_MAX]; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; Tcl_UtfBackslash(src, readPtr, buf); TclUtfToUniChar(buf, &ch); diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index fe0ed2d..4b372a5 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1479,7 +1479,7 @@ BuildCommandLine( quote = 1; } else { int count; - Tcl_UniChar ch; + Tcl_UniChar ch = 0; for (start = arg; *start != '\0'; start += count) { count = TclUtfToUniChar(start, &ch); -- cgit v0.12 From 5314bbe0efeebd5113df7a914be41177f1bbebe7 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 26 Jun 2017 19:56:37 +0000 Subject: update changes --- changes | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changes b/changes index 359f8b8..f662059 100644 --- a/changes +++ b/changes @@ -8783,4 +8783,11 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich) 2017-06-08 (bug)[2738427] Tcl_NumUtfChars() corner case utf-4.9 (nijtmans) +2017-06-22 (update) Update Unicode data to 10.0 (nijtmans) + *** POTENTIAL INCOMPATIBILITY *** + +2017-06-22 (TIP 473) Let [oo::copy] specify target namespace (fellows) + +2017-06-26 (bug)[46f801] Repair autoloader fragility (porter) + --- Released 8.6.7, ????, 2017 --- http://core.tcl.tk/tcl/ for details -- cgit v0.12 From 816674cdb7e93ae44e59f525b3bbe9dd377bfb1b Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 1 Aug 2017 16:05:13 +0000 Subject: update changes --- changes | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/changes b/changes index f662059..ba780e8 100644 --- a/changes +++ b/changes @@ -8790,4 +8790,8 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich) 2017-06-26 (bug)[46f801] Repair autoloader fragility (porter) ---- Released 8.6.7, ????, 2017 --- http://core.tcl.tk/tcl/ for details +2017-07-06 (bug)[adb198] Plug memleak in TclJoinPath (sebres,porter) + +2017-07-17 (bug)[fb2208] Repeatable tclIndex generation (wiedemann,nijtmans) + +--- Released 8.6.7, August 4, 2017 --- http://core.tcl.tk/tcl/ for details -- cgit v0.12 From ac8ddf5d4a977a1478ab350831d4f8b69e7e6815 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Aug 2017 16:42:05 +0000 Subject: Cherrypick [527d354828] --- generic/tclIOUtil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index e00b9ac..41e218f 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -1762,7 +1762,7 @@ Tcl_FSEvalFileEx( * this cross-platform to allow for scripted documents. [Bug: 2040] */ - Tcl_SetChannelOption(interp, chan, "-eofchar", "\32"); + Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}"); /* * If the encoding is specified, set it for the channel. Else don't touch @@ -1896,7 +1896,7 @@ TclNREvalFile( * this cross-platform to allow for scripted documents. [Bug: 2040] */ - Tcl_SetChannelOption(interp, chan, "-eofchar", "\32"); + Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}"); /* * If the encoding is specified, set it for the channel. Else don't touch -- cgit v0.12 From df9ea61fbf40259ce8a70adecc6b7fc7f005bccf Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Aug 2017 16:45:47 +0000 Subject: Cherrypick [527d354828] --- generic/tclIOUtil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index e1c5709..6465931 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -1805,7 +1805,7 @@ Tcl_FSEvalFileEx( * this cross-platform to allow for scripted documents. [Bug: 2040] */ - Tcl_SetChannelOption(interp, chan, "-eofchar", "\32"); + Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}"); /* * If the encoding is specified, set it for the channel. Else don't touch -- cgit v0.12 From 3a07a6d26f93710a5646437820805ecf6f31a4a3 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 9 Aug 2017 14:41:19 +0000 Subject: bump release date --- changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes b/changes index ba780e8..f98eafc 100644 --- a/changes +++ b/changes @@ -8794,4 +8794,4 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich) 2017-07-17 (bug)[fb2208] Repeatable tclIndex generation (wiedemann,nijtmans) ---- Released 8.6.7, August 4, 2017 --- http://core.tcl.tk/tcl/ for details +--- Released 8.6.7, August 9, 2017 --- http://core.tcl.tk/tcl/ for details -- cgit v0.12 From c2982f8f62f8b7e7faf9e500f53dca8941299548 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 10 Aug 2017 13:28:48 +0000 Subject: Silence compiler warning in --disable-threads build --- generic/tclIORChan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index f476a1a..e862761 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -41,6 +41,8 @@ static void ReflectWatch(ClientData clientData, int mask); static int ReflectBlock(ClientData clientData, int mode); #ifdef TCL_THREADS static void ReflectThread(ClientData clientData, int action); +static int ReflectEventRun(Tcl_Event *ev, int flags); +static int ReflectEventDelete(Tcl_Event *ev, ClientData cd); #endif static Tcl_WideInt ReflectSeekWide(ClientData clientData, Tcl_WideInt offset, int mode, int *errorCodePtr); @@ -748,6 +750,7 @@ TclChanCreateObjCmd( *---------------------------------------------------------------------- */ +#ifdef TCL_THREADS typedef struct ReflectEvent { Tcl_Event header; ReflectedChannel *rcPtr; @@ -791,6 +794,7 @@ ReflectEventDelete( } return 1; } +#endif int TclChanPostEventObjCmd( -- cgit v0.12 From 8ccd8d10efecf3891466ee0df15700557ee170aa Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 10 Aug 2017 17:03:53 +0000 Subject: Backport [array names -regexp] should support backrefs --- generic/tclRegexp.c | 15 +++++++++++---- tests/set-old.test | 7 +++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index ea25d4b..cfe6388 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -502,10 +502,17 @@ Tcl_RegExpMatchObj( { Tcl_RegExp re; - re = Tcl_GetRegExpFromObj(interp, patternObj, - TCL_REG_ADVANCED | TCL_REG_NOSUB); - if (re == NULL) { - return -1; + /* + * For performance reasons, first try compiling the RE without support for + * subexpressions. On failure, try again without TCL_REG_NOSUB in case the + * RE has backreferences in it. Closely related to [Bug 1366683]. If this + * still fails, an error message will be left in the interpreter. + */ + + if (!(re = Tcl_GetRegExpFromObj(interp, patternObj, + TCL_REG_ADVANCED | TCL_REG_NOSUB)) + && !(re = Tcl_GetRegExpFromObj(interp, patternObj, TCL_REG_ADVANCED))) { + return -1; } return Tcl_RegExpExecObj(interp, re, textObj, 0 /* offset */, 0 /* nmatches */, 0 /* flags */); diff --git a/tests/set-old.test b/tests/set-old.test index 1c68f91..6138ed8 100644 --- a/tests/set-old.test +++ b/tests/set-old.test @@ -652,6 +652,13 @@ test set-old-8.52 {array command, array names -regexp on regexp pattern} { set a(11) 1 list [catch {lsort [array names a -regexp ^1]} msg] $msg } {0 {1*2 11 12}} +test set-old-8.52.1 {array command, array names -regexp, backrefs} { + catch {unset a} + set a(1*2) 1 + set a(12) 1 + set a(11) 1 + list [catch {lsort [array names a -regexp {^(.)\1}]} msg] $msg +} {0 11} test set-old-8.53 {array command, array names -regexp} { catch {unset a} set a(-glob) 1 -- cgit v0.12 From 89fcfadbbf83d652f1b96cc79c64785b55dba97b Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Sun, 13 Aug 2017 22:05:25 +0000 Subject: Support cross-compiling Tcl for 'Win32 on ARM' using Visual Studio. --- generic/tclPanic.c | 2 +- win/makefile.vc | 11 +++++++++-- win/tclWin32Dll.c | 4 ++-- win/tclWinFile.c | 2 +- win/tclWinSock.c | 3 +-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/generic/tclPanic.c b/generic/tclPanic.c index b032449..b03ad41 100644 --- a/generic/tclPanic.c +++ b/generic/tclPanic.c @@ -111,7 +111,7 @@ Tcl_PanicVA( __builtin_trap(); # elif defined(_WIN64) __debugbreak(); -# elif defined(_MSC_VER) +# elif defined(_MSC_VER) && defined (_M_IX86) _asm {int 3} # else DebugBreak(); diff --git a/win/makefile.vc b/win/makefile.vc index ada08cc..40de392 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -121,7 +121,7 @@ the build instructions. # nodep = Turns off compatibility macros to ensure the core # isn't being built with deprecated functions. # -# MACHINE=(ALPHA|AMD64|IA64|IX86) +# MACHINE=(ARM|AMD64|IA64|IX86) # Set the machine type used for the compiler, linker, and # resource compiler. This hook is needed to tell the tools # when alternate platforms are requested. IX86 is the default @@ -484,9 +484,16 @@ cdebug = -Zi -Od $(DEBUGFLAGS) cdebug = -Zi -WX $(DEBUGFLAGS) !endif +### Common compiler options that are architecture specific +!if "$(MACHINE)" == "ARM" +carch = -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +!else +carch = +!endif + ### Declarations common to all compiler options cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE -cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\ +cflags = -nologo -c $(COMPILERFLAGS) $(carch) $(cwarn) -Fp$(TMP_DIR)^\ !if $(MSVCRT) !if $(DEBUG) && !$(UNCHECKED) diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 688fa8d..84c7a97 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -29,7 +29,7 @@ static int platformId; /* Running under NT, or 95/98? */ * VC++ 5.x has no 'cpuid' assembler instruction, so we must emulate it */ -#if defined(_MSC_VER) && (_MSC_VER <= 1100) +#if defined(_MSC_VER) && (_MSC_VER <= 1100) && defined (_M_IX86) #define cpuid __asm __emit 0fh __asm __emit 0a2h #endif @@ -735,7 +735,7 @@ TclWinCPUID( __cpuid(regsPtr, index); status = TCL_OK; -# else +# elif defined (_M_IX86) /* * Define a structure in the stack frame to hold the registers. */ diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 6662327..7586af1 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -828,7 +828,7 @@ tclWinDebugPanic( __builtin_trap(); #elif defined(_WIN64) __debugbreak(); -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined (_M_IX86) _asm {int 3} #else DebugBreak(); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index da2e60a..3799d98 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -1426,8 +1426,7 @@ TcpGetOptionProc( flags |= NI_NUMERICHOST; } } else if (sockname.sa.sa_family == AF_INET6) { - if ((IN6_ARE_ADDR_EQUAL(&sockname.sa6.sin6_addr, - &in6addr_any)) || + if (IN6_IS_ADDR_UNSPECIFIED(&sockname.sa6.sin6_addr) || (IN6_IS_ADDR_V4MAPPED(&sockname.sa6.sin6_addr) && sockname.sa6.sin6_addr.s6_addr[12] == 0 && sockname.sa6.sin6_addr.s6_addr[13] == 0 -- cgit v0.12 From e513ec3916cba76725b5fe3f2e4f5d24f449f853 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Sun, 13 Aug 2017 22:15:30 +0000 Subject: Always define '_USING_V110_SDK71_', in case targeting the pre-Windows 8.x SDKs. --- win/rules.vc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/rules.vc b/win/rules.vc index 4a3ae26..979fb14 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -159,7 +159,7 @@ DEBUGFLAGS = $(DEBUGFLAGS) -RTC1 DEBUGFLAGS = $(DEBUGFLAGS) -GZ !endif -COMPILERFLAGS =-W3 /DUNICODE /D_UNICODE /D_ATL_XP_TARGETING +COMPILERFLAGS =-W3 -DUNICODE -D_UNICODE -D_USING_V110_SDK71_ -D_ATL_XP_TARGETING # In v13 -GL and -YX are incompatible. !if [nmakehlp -c -YX] -- cgit v0.12 From a50a381b04b28ae816afcf275f5ca42c30633604 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Sun, 13 Aug 2017 22:31:19 +0000 Subject: The 'clean' target should delete the generated 'nmhlp-out.txt' file as well. --- win/makefile.vc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/win/makefile.vc b/win/makefile.vc index 40de392..e0d8d9d 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -1229,6 +1229,8 @@ clean: clean-pkgs @if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj @echo Cleaning $(WINDIR)\nmakehlp.exe ... @if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe + @echo Cleaning $(WINDIR)\nmhlp-out.txt ... + @if exist $(WINDIR)\nmhlp-out.txt del $(WINDIR)\nmhlp-out.txt @echo Cleaning $(WINDIR)\_junk.pch ... @if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch @echo Cleaning $(WINDIR)\vercl.x ... -- cgit v0.12 From 277f101d7f3257acf31bc529b97cde31d3179761 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 14 Aug 2017 15:33:03 +0000 Subject: [f2336c116b] Move pragmas to make gcc happy; it is pickier than clang. --- unix/tclUnixSock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index b9b6b53..2f1a78e 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -700,6 +700,8 @@ TcpClose2Proc( */ #ifndef NEED_FAKE_RFC2553 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" static inline int IPv6AddressNeedsNumericRendering( struct in6_addr addr) @@ -713,16 +715,14 @@ IPv6AddressNeedsNumericRendering( * at least some versions of OSX. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstrict-aliasing" if (!IN6_IS_ADDR_V4MAPPED(&addr)) { -#pragma GCC diagnostic pop return 0; } return (addr.s6_addr[12] == 0 && addr.s6_addr[13] == 0 && addr.s6_addr[14] == 0 && addr.s6_addr[15] == 0); } +#pragma GCC diagnostic pop #endif /* NEED_FAKE_RFC2553 */ static void -- cgit v0.12 From 13d9910fd618b60dd7ea07505a0318fe06581469 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 17 Aug 2017 21:52:42 +0000 Subject: '#if' -> '#ifdef' in tclUnixPort.h. Suggested by Gustaf Neumann. Reduces the number of gcc warnings, when compiling Tcl with -Wundef. Harmless. --- unix/tclUnixPort.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 2728957..ba56089 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -125,11 +125,11 @@ typedef off_t Tcl_SeekOffset; # include #endif #include -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME # include # include #else -#if HAVE_SYS_TIME_H +#ifdef HAVE_SYS_TIME_H # include #else # include @@ -138,11 +138,11 @@ typedef off_t Tcl_SeekOffset; #ifndef NO_SYS_WAIT_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif #include -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H -- cgit v0.12 From 5210283d105dd5baf07880dce96c9382c690321f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 22 Aug 2017 12:12:11 +0000 Subject: Fix [d2612a2fa193196787aab33bb57f69b1eef9e30c|d2612a2fa1]: Build breaks because of gcc error. Only use "#pragma GCC diagnostic" if the compiler supports this. Also re-format tclUnixSock.c without further functional changes. --- unix/tclLoadDyld.c | 2 + unix/tclUnixSock.c | 293 +++++++++++++++++++++++++++++++---------------------- 2 files changed, 172 insertions(+), 123 deletions(-) diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 8b7dc58..e998bf9 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -48,7 +48,9 @@ #endif /* TCL_DYLD_USE_DLFCN */ #if TCL_DYLD_USE_NSMODULE || defined(TCL_LOAD_FROM_MEMORY) +#if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif #include #include #include diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 2f1a78e..e418ff0 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -19,6 +19,7 @@ #define SET_BITS(var, bits) ((var) |= (bits)) #define CLEAR_BITS(var, bits) ((var) &= ~(bits)) +#define GOT_BITS(var, bits) (((var) & (bits)) != 0) /* "sock" + a pointer in hex + \0 */ #define SOCK_CHAN_LENGTH (4 + sizeof(void *) * 2 + 1) @@ -117,8 +118,7 @@ struct TcpState { * Static routines for this file: */ -static int TcpConnect(Tcl_Interp *interp, - TcpState *state); +static int TcpConnect(Tcl_Interp *interp, TcpState *state); static void TcpAccept(ClientData data, int mask); static int TcpBlockModeProc(ClientData data, int mode); static int TcpCloseProc(ClientData instanceData, @@ -173,21 +173,24 @@ static ProcessGlobalValue hostName = #if 0 /* printf debugging */ -void printaddrinfo(struct addrinfo *addrlist, char *prefix) +void +printaddrinfo( + struct addrinfo *addrlist, + char *prefix) { char host[NI_MAXHOST], port[NI_MAXSERV]; struct addrinfo *ai; + for (ai = addrlist; ai != NULL; ai = ai->ai_next) { getnameinfo(ai->ai_addr, ai->ai_addrlen, - host, sizeof(host), - port, sizeof(port), - NI_NUMERICHOST|NI_NUMERICSERV); + host, sizeof(host), port, sizeof(port), + NI_NUMERICHOST|NI_NUMERICSERV); fprintf(stderr,"%s: %s:%s\n", prefix, host, port); } } #endif /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * InitializeHostName -- * @@ -197,7 +200,7 @@ void printaddrinfo(struct addrinfo *addrlist, char *prefix) * Results: * None. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ static void @@ -271,12 +274,12 @@ InitializeHostName( *encodingPtr = Tcl_GetEncoding(NULL, NULL); *lengthPtr = strlen(native); - *valuePtr = ckalloc((*lengthPtr) + 1); - memcpy(*valuePtr, native, (size_t)(*lengthPtr)+1); + *valuePtr = ckalloc(*lengthPtr + 1); + memcpy(*valuePtr, native, (size_t)(*lengthPtr) + 1); } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * Tcl_GetHostName -- * @@ -290,7 +293,7 @@ InitializeHostName( * Side effects: * Caches the name to return for future calls. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ const char * @@ -300,7 +303,7 @@ Tcl_GetHostName(void) } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * TclpHasSockets -- * @@ -312,7 +315,7 @@ Tcl_GetHostName(void) * Side effects: * None. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ int @@ -323,7 +326,7 @@ TclpHasSockets( } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * TclpFinalizeSockets -- * @@ -335,7 +338,7 @@ TclpHasSockets( * Side effects: * None. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ void @@ -345,7 +348,7 @@ TclpFinalizeSockets(void) } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * TcpBlockModeProc -- * @@ -358,7 +361,7 @@ TclpFinalizeSockets(void) * Side effects: * Sets the device into blocking or nonblocking mode. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ /* ARGSUSED */ @@ -376,7 +379,7 @@ TcpBlockModeProc( } else { SET_BITS(statePtr->flags, TCP_NONBLOCKING); } - if (statePtr->flags & TCP_ASYNC_CONNECT) { + if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) { statePtr->cachedBlocking = mode; return 0; } @@ -387,33 +390,32 @@ TcpBlockModeProc( } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * WaitForConnect -- * - * Check the state of an async connect process. If a connection - * attempt terminated, process it, which may finalize it or may - * start the next attempt. If a connect error occures, it is saved - * in statePtr->connectError to be reported by 'fconfigure -error'. + * Check the state of an async connect process. If a connection attempt + * terminated, process it, which may finalize it or may start the next + * attempt. If a connect error occures, it is saved in + * statePtr->connectError to be reported by 'fconfigure -error'. * * There are two modes of operation, defined by errorCodePtr: - * * non-NULL: Called by explicite read/write command. block if + * * non-NULL: Called by explicite read/write command. Blocks if the * socket is blocking. * May return two error codes: * * EWOULDBLOCK: if connect is still in progress - * * ENOTCONN: if connect failed. This would be the error - * message of a rect or sendto syscall so this is - * emulated here. - * * NULL: Called by a backround operation. Do not block and - * don't return any error code. + * * ENOTCONN: if connect failed. This would be the error message + * of a rect or sendto syscall so this is emulated here. + * * NULL: Called by a backround operation. Do not block and do not + * return any error code. * * Results: - * 0 if the connection has completed, -1 if still in progress - * or there is an error. + * 0 if the connection has completed, -1 if still in progress or there is + * an error. * * Side effects: - * Processes socket events off the system queue. - * May process asynchroneous connect. + * Processes socket events off the system queue. May process + * asynchroneous connects. * *---------------------------------------------------------------------- */ @@ -426,11 +428,11 @@ WaitForConnect( int timeout; /* - * Check if an async connect failed already and error reporting is demanded, - * return the error ENOTCONN + * Check if an async connect failed already and error reporting is + * demanded, return the error ENOTCONN */ - if (errorCodePtr != NULL && (statePtr->flags & TCP_ASYNC_FAILED)) { + if (errorCodePtr != NULL && GOT_BITS(statePtr->flags, TCP_ASYNC_FAILED)) { *errorCodePtr = ENOTCONN; return -1; } @@ -439,26 +441,29 @@ WaitForConnect( * Check if an async connect is running. If not return ok */ - if (!(statePtr->flags & TCP_ASYNC_PENDING)) { + if (!GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) { return 0; } - if (errorCodePtr == NULL || (statePtr->flags & TCP_NONBLOCKING)) { + if (errorCodePtr == NULL || GOT_BITS(statePtr->flags, TCP_NONBLOCKING)) { timeout = 0; } else { timeout = -1; } do { if (TclUnixWaitForFile(statePtr->fds.fd, - TCL_WRITABLE | TCL_EXCEPTION, timeout) != 0) { + TCL_WRITABLE | TCL_EXCEPTION, timeout) != 0) { TcpConnect(NULL, statePtr); } - /* Do this only once in the nonblocking case and repeat it until the - * socket is final when blocking */ - } while (timeout == -1 && statePtr->flags & TCP_ASYNC_CONNECT); + + /* + * Do this only once in the nonblocking case and repeat it until the + * socket is final when blocking. + */ + } while (timeout == -1 && GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)); if (errorCodePtr != NULL) { - if (statePtr->flags & TCP_ASYNC_PENDING) { + if (GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) { *errorCodePtr = EAGAIN; return -1; } else if (statePtr->connectError != 0) { @@ -615,7 +620,8 @@ TcpCloseProc( fds = statePtr->fds.next; while (fds != NULL) { TcpFdList *next = fds->next; - ckfree(fds); + + ckfree(fds); fds = next; } if (statePtr->addrlist != NULL) { @@ -685,10 +691,9 @@ TcpClose2Proc( * * TcpHostPortList -- * - * This function is called by the -gethostname and -getpeername - * switches of TcpGetOptionProc() to add three list elements - * with the textual representation of the given address to the - * given DString. + * This function is called by the -gethostname and -getpeername switches + * of TcpGetOptionProc() to add three list elements with the textual + * representation of the given address to the given DString. * * Results: * None. @@ -700,8 +705,10 @@ TcpClose2Proc( */ #ifndef NEED_FAKE_RFC2553 +#if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif static inline int IPv6AddressNeedsNumericRendering( struct in6_addr addr) @@ -722,7 +729,9 @@ IPv6AddressNeedsNumericRendering( return (addr.s6_addr[12] == 0 && addr.s6_addr[13] == 0 && addr.s6_addr[14] == 0 && addr.s6_addr[15] == 0); } +#if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) #pragma GCC diagnostic pop +#endif #endif /* NEED_FAKE_RFC2553 */ static void @@ -736,14 +745,15 @@ TcpHostPortList( char host[NI_MAXHOST], nhost[NI_MAXHOST], nport[NI_MAXSERV]; int flags = 0; - getnameinfo(&addr.sa, salen, - nhost, sizeof(nhost), nport, sizeof(nport), - NI_NUMERICHOST | NI_NUMERICSERV); + getnameinfo(&addr.sa, salen, nhost, sizeof(nhost), nport, sizeof(nport), + NI_NUMERICHOST | NI_NUMERICSERV); Tcl_DStringAppendElement(dsPtr, nhost); + /* - * We don't want to resolve INADDR_ANY and sin6addr_any; they - * can sometimes cause problems (and never have a name). + * We don't want to resolve INADDR_ANY and sin6addr_any; they can + * sometimes cause problems (and never have a name). */ + if (addr.sa.sa_family == AF_INET) { if (addr.sa4.sin_addr.s_addr == INADDR_ANY) { flags |= NI_NUMERICHOST; @@ -755,15 +765,27 @@ TcpHostPortList( } #endif /* NEED_FAKE_RFC2553 */ } - /* Check if reverse DNS has been switched off globally */ - if (interp != NULL && Tcl_GetVar(interp, SUPPRESS_RDNS_VAR, 0) != NULL) { + + /* + * Check if reverse DNS has been switched off globally. + */ + + if (interp != NULL && + Tcl_GetVar2(interp, SUPPRESS_RDNS_VAR, NULL, 0) != NULL) { flags |= NI_NUMERICHOST; } - if (getnameinfo(&addr.sa, salen, host, sizeof(host), NULL, 0, flags) == 0) { - /* Reverse mapping worked */ + if (getnameinfo(&addr.sa, salen, host, sizeof(host), NULL, 0, + flags) == 0) { + /* + * Reverse mapping worked. + */ + Tcl_DStringAppendElement(dsPtr, host); } else { - /* Reverse mappong failed - use the numeric rep once more */ + /* + * Reverse mapping failed - use the numeric rep once more. + */ + Tcl_DStringAppendElement(dsPtr, nhost); } Tcl_DStringAppendElement(dsPtr, nport); @@ -813,16 +835,20 @@ TcpGetOptionProc( (strncmp(optionName, "-error", len) == 0)) { socklen_t optlen = sizeof(int); - if (statePtr->flags & TCP_ASYNC_CONNECT) { - /* Suppress errors as long as we are not done */ + if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) { + /* + * Suppress errors as long as we are not done. + */ + errno = 0; } else if (statePtr->connectError != 0) { errno = statePtr->connectError; statePtr->connectError = 0; } else { int err; - getsockopt(statePtr->fds.fd, SOL_SOCKET, SO_ERROR, - (char *) &err, &optlen); + + getsockopt(statePtr->fds.fd, SOL_SOCKET, SO_ERROR, (char *) &err, + &optlen); errno = err; } if (errno != 0) { @@ -833,9 +859,8 @@ TcpGetOptionProc( if ((len > 1) && (optionName[1] == 'c') && (strncmp(optionName, "-connecting", len) == 0)) { - Tcl_DStringAppend(dsPtr, - (statePtr->flags & TCP_ASYNC_CONNECT) ? "1" : "0", -1); + GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT) ? "1" : "0", -1); return TCL_OK; } @@ -844,10 +869,11 @@ TcpGetOptionProc( address peername; socklen_t size = sizeof(peername); - if ( (statePtr->flags & TCP_ASYNC_CONNECT) ) { + if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) { /* * In async connect output an empty string */ + if (len == 0) { Tcl_DStringAppendElement(dsPtr, "-peername"); Tcl_DStringAppendElement(dsPtr, ""); @@ -858,6 +884,7 @@ TcpGetOptionProc( /* * Peername fetch succeeded - output list */ + if (len == 0) { Tcl_DStringAppendElement(dsPtr, "-peername"); Tcl_DStringStartSublist(dsPtr); @@ -897,11 +924,12 @@ TcpGetOptionProc( Tcl_DStringAppendElement(dsPtr, "-sockname"); Tcl_DStringStartSublist(dsPtr); } - if ( (statePtr->flags & TCP_ASYNC_CONNECT) ) { + if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) { /* * In async connect output an empty string */ - found = 1; + + found = 1; } else { for (fds = &statePtr->fds; fds != NULL; fds = fds->next) { size = sizeof(sockname); @@ -926,14 +954,15 @@ TcpGetOptionProc( } if (len > 0) { - return Tcl_BadChannelOption(interp, optionName, "connecting peername sockname"); + return Tcl_BadChannelOption(interp, optionName, + "connecting peername sockname"); } return TCL_OK; } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * TcpWatchProc -- * @@ -946,7 +975,7 @@ TcpGetOptionProc( * Sets up the notifier so that a future event on the channel will be * seen by Tcl. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ static void @@ -959,17 +988,17 @@ WrapNotify( if (newmask == 0) { /* - * There was no overlap between the states the channel is - * interested in notifications for, and the states that are - * reported present on the file descriptor by select(). The - * only way that can happen is when the channel is interested - * in a writable condition, and only a readable state is reported - * present (see TcpWatchProc() below). In that case, signal back - * to the caller the writable state, which is really an error - * condition. As an extra check on that assumption, check for - * a non-zero value of errno before reporting an artificial + * There was no overlap between the states the channel is interested + * in notifications for, and the states that are reported present on + * the file descriptor by select(). The only way that can happen is + * when the channel is interested in a writable condition, and only a + * readable state is reported present (see TcpWatchProc() below). In + * that case, signal back to the caller the writable state, which is + * really an error condition. As an extra check on that assumption, + * check for a non-zero value of errno before reporting an artificial * writable state. */ + if (errno == 0) { return; } @@ -993,33 +1022,36 @@ TcpWatchProc( * be readable or writable at the Tcl level. This keeps Tcl scripts * from interfering with the -accept behavior (bug #3394732). */ + return; } - if (statePtr->flags & TCP_ASYNC_PENDING) { - /* Async sockets use a FileHandler internally while connecting, so we - * need to cache this request until the connection has succeeded. */ + if (GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) { + /* + * Async sockets use a FileHandler internally while connecting, so we + * need to cache this request until the connection has succeeded. + */ + statePtr->filehandlers = mask; } else if (mask) { /* - * Whether it is a bug or feature or otherwise, it is a fact - * of life that on at least some Linux kernels select() fails - * to report that a socket file descriptor is writable when - * the other end of the socket is closed. This is in contrast - * to the guarantees Tcl makes that its channels become - * writable and fire writable events on an error conditon. - * This has caused a leak of file descriptors in a state of + * Whether it is a bug or feature or otherwise, it is a fact of life + * that on at least some Linux kernels select() fails to report that a + * socket file descriptor is writable when the other end of the socket + * is closed. This is in contrast to the guarantees Tcl makes that + * its channels become writable and fire writable events on an error + * conditon. This has caused a leak of file descriptors in a state of * background flushing. See Tcl ticket 1758a0b603. * - * As a workaround, when our caller indicates an interest in - * writable notifications, we must tell the notifier built - * around select() that we are interested in the readable state - * of the file descriptor as well, as that is the only reliable - * means to get notified of error conditions. Then it is the - * task of WrapNotify() above to untangle the meaning of these - * channel states and report the chan events as best it can. - * We save a copy of the mask passed in to assist with that. + * As a workaround, when our caller indicates an interest in writable + * notifications, we must tell the notifier built around select() that + * we are interested in the readable state of the file descriptor as + * well, as that is the only reliable means to get notified of error + * conditions. Then it is the task of WrapNotify() above to untangle + * the meaning of these channel states and report the chan events as + * best it can. We save a copy of the mask passed in to assist with + * that. */ statePtr->interest = mask; @@ -1031,7 +1063,7 @@ TcpWatchProc( } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * TcpGetHandleProc -- * @@ -1045,7 +1077,7 @@ TcpWatchProc( * Side effects: * None. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ /* ARGSUSED */ @@ -1062,16 +1094,17 @@ TcpGetHandleProc( } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * TcpAsyncCallback -- * - * Called by the event handler that TcpConnect sets up - * internally for [socket -async] to get notified when the - * asyncronous connection attempt has succeeded or failed. + * Called by the event handler that TcpConnect sets up internally for + * [socket -async] to get notified when the asyncronous connection + * attempt has succeeded or failed. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ + static void TcpAsyncCallback( ClientData clientData, /* The socket state. */ @@ -1083,7 +1116,7 @@ TcpAsyncCallback( } /* - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- * * TcpConnect -- * @@ -1109,7 +1142,7 @@ TcpAsyncCallback( * return and the loops resume as if they had never been interrupted. * For syncronously connecting sockets, the loops work the usual way. * - *---------------------------------------------------------------------- + * ---------------------------------------------------------------------- */ static int @@ -1118,9 +1151,9 @@ TcpConnect( TcpState *statePtr) { socklen_t optlen; - int async_callback = statePtr->flags & TCP_ASYNC_PENDING; + int async_callback = GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING); int ret = -1, error = EHOSTUNREACH; - int async = statePtr->flags & TCP_ASYNC_CONNECT; + int async = GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT); if (async_callback) { goto reenter; @@ -1128,8 +1161,8 @@ TcpConnect( for (statePtr->addr = statePtr->addrlist; statePtr->addr != NULL; statePtr->addr = statePtr->addr->ai_next) { - - for (statePtr->myaddr = statePtr->myaddrlist; statePtr->myaddr != NULL; + for (statePtr->myaddr = statePtr->myaddrlist; + statePtr->myaddr != NULL; statePtr->myaddr = statePtr->myaddr->ai_next) { int reuseaddr = 1; @@ -1153,7 +1186,8 @@ TcpConnect( errno = 0; } - statePtr->fds.fd = socket(statePtr->addr->ai_family, SOCK_STREAM, 0); + statePtr->fds.fd = socket(statePtr->addr->ai_family, SOCK_STREAM, + 0); if (statePtr->fds.fd < 0) { continue; } @@ -1172,14 +1206,18 @@ TcpConnect( TclSockMinimumBuffers(INT2PTR(statePtr->fds.fd), SOCKET_BUFSIZE); if (async) { - ret = TclUnixSetBlockingMode(statePtr->fds.fd,TCL_MODE_NONBLOCKING); + ret = TclUnixSetBlockingMode(statePtr->fds.fd, + TCL_MODE_NONBLOCKING); if (ret < 0) { continue; } } - /* Gotta reset the error variable here, before we use it for the - * first time in this iteration. */ + /* + * Must reset the error variable here, before we use it for the + * first time in this iteration. + */ + error = 0; (void) setsockopt(statePtr->fds.fd, SOL_SOCKET, SO_REUSEADDR, @@ -1200,10 +1238,13 @@ TcpConnect( ret = connect(statePtr->fds.fd, statePtr->addr->ai_addr, statePtr->addr->ai_addrlen); - if (ret < 0) error = errno; + if (ret < 0) { + error = errno; + } if (ret < 0 && errno == EINPROGRESS) { Tcl_CreateFileHandler(statePtr->fds.fd, - TCL_WRITABLE|TCL_EXCEPTION, TcpAsyncCallback, statePtr); + TCL_WRITABLE | TCL_EXCEPTION, TcpAsyncCallback, + statePtr); errno = EWOULDBLOCK; SET_BITS(statePtr->flags, TCP_ASYNC_PENDING); return TCL_OK; @@ -1231,7 +1272,7 @@ TcpConnect( } } -out: + out: statePtr->connectError = error; CLEAR_BITS(statePtr->flags, TCP_ASYNC_CONNECT); if (async_callback) { @@ -1329,6 +1370,7 @@ Tcl_OpenTcpClient( /* * Allocate a new TcpState for this socket. */ + statePtr = ckalloc(sizeof(TcpState)); memset(statePtr, 0, sizeof(TcpState)); statePtr->flags = async ? TCP_ASYNC_CONNECT : 0; @@ -1340,6 +1382,7 @@ Tcl_OpenTcpClient( /* * Create a new client socket and wrap it in a channel. */ + if (TcpConnect(interp, statePtr) != TCL_OK) { TcpCloseProc(statePtr, NULL); return NULL; @@ -1347,8 +1390,8 @@ Tcl_OpenTcpClient( sprintf(channelName, SOCK_TEMPLATE, (long) statePtr); - statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, statePtr, - (TCL_READABLE | TCL_WRITABLE)); + statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, + statePtr, TCL_READABLE | TCL_WRITABLE); if (Tcl_SetChannelOption(interp, statePtr->channel, "-translation", "auto crlf") == TCL_ERROR) { Tcl_Close(NULL, statePtr->channel); @@ -1377,7 +1420,8 @@ Tcl_Channel Tcl_MakeTcpClientChannel( ClientData sock) /* The socket to wrap up into a channel. */ { - return (Tcl_Channel) TclpMakeTcpClientChannelMode(sock, (TCL_READABLE | TCL_WRITABLE)); + return (Tcl_Channel) TclpMakeTcpClientChannelMode(sock, + TCL_READABLE | TCL_WRITABLE); } /* @@ -1516,7 +1560,10 @@ Tcl_OpenTcpServer( } #ifdef IPV6_V6ONLY - /* Missing on: Solaris 2.8 */ + /* + * Missing on: Solaris 2.8 + */ + if (addrPtr->ai_family == AF_INET6) { int v6only = 1; @@ -1662,7 +1709,7 @@ TcpAccept( sprintf(channelName, SOCK_TEMPLATE, (long) newSockState); newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - newSockState, (TCL_READABLE | TCL_WRITABLE)); + newSockState, TCL_READABLE | TCL_WRITABLE); Tcl_SetChannelOption(NULL, newSockState->channel, "-translation", "auto crlf"); -- cgit v0.12 From a95a7dd26567d637348ca4f69331f10e549f7ff8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 29 Aug 2017 09:24:29 +0000 Subject: (cherry-pick): Fix [b50fb21410dababca95baa122964b2e312cb9d8a|b50fb214] : exec redirection to append stdout and stderr to the same file --- generic/tclPipe.c | 8 +++++++- tests/exec.test | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/generic/tclPipe.c b/generic/tclPipe.c index 83fb818..2ecc5a6 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -668,7 +668,13 @@ TclCreatePipeline( if (*p == '>') { p++; atOK = 0; - flags = O_WRONLY | O_CREAT; + + /* + * Note that the O_APPEND flag only has an effect on POSIX + * platforms. On Windows, we just have to carry on regardless. + */ + + flags = O_WRONLY | O_CREAT | O_APPEND; } if (errorClose != 0) { errorClose = 0; diff --git a/tests/exec.test b/tests/exec.test index 38927d3..5f3a0cb 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -671,8 +671,12 @@ test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup { exec /bin/sh -c \ {for a in 1 2 3; do sleep 1; echo $a; done} >>$tmpfile & exec /bin/sh -c \ + {for a in 4 5 6; do sleep 1; echo $a >&2; done} 2>>$tmpfile & + exec /bin/sh -c \ {for a in a b c; do sleep 1; echo $a; done} >>$tmpfile & - # The above two shell invokations take about 3 seconds to finish, so allow + exec /bin/sh -c \ + {for a in d e f; do sleep 1; echo $a >&2; done} 2>>$tmpfile & + # The above four shell invokations take about 3 seconds to finish, so allow # 5s (in case the machine is busy) after 5000 # Check that no bytes have got lost through mixups with overlapping @@ -681,7 +685,7 @@ test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup { file size $tmpfile } -cleanup { removeFile $tmpfile -} -result 14 +} -result 26 # Tests to ensure batch files and .CMD (Bug 9ece99d58b) # can be executed on Windows -- cgit v0.12 From 7c7a396fc559a5365a644fa4088af9ff482e6a7f Mon Sep 17 00:00:00 2001 From: oehhar Date: Thu, 31 Aug 2017 06:31:05 +0000 Subject: http state 100 continue handling broken [2a94652ee1] --- changes | 3 +++ library/http/http.tcl | 3 ++- library/http/pkgIndex.tcl | 2 +- unix/Makefile.in | 4 ++-- win/Makefile.in | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) mode change 100644 => 100755 changes mode change 100644 => 100755 library/http/http.tcl mode change 100644 => 100755 library/http/pkgIndex.tcl mode change 100644 => 100755 unix/Makefile.in mode change 100644 => 100755 win/Makefile.in diff --git a/changes b/changes old mode 100644 new mode 100755 index f98eafc..d4be350 --- a/changes +++ b/changes @@ -8795,3 +8795,6 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich) 2017-07-17 (bug)[fb2208] Repeatable tclIndex generation (wiedemann,nijtmans) --- Released 8.6.7, August 9, 2017 --- http://core.tcl.tk/tcl/ for details + +2017-08-31 (bug)[2a9465] http state 100 continue handling broken (oehlmann) +=> http 2.8.12 diff --git a/library/http/http.tcl b/library/http/http.tcl old mode 100644 new mode 100755 index 0350808..9f5310b --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -11,7 +11,7 @@ package require Tcl 8.6- # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles -package provide http 2.8.11 +package provide http 2.8.12 namespace eval http { # Allow resourcing to not clobber existing data @@ -1027,6 +1027,7 @@ proc http::Event {sock token} { # We have now read all headers # We ignore HTTP/1.1 100 Continue returns. RFC2616 sec 8.2.3 if {$state(http) == "" || ([regexp {^\S+\s(\d+)} $state(http) {} x] && $x == 100)} { + set state(state) "connecting" return } diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl old mode 100644 new mode 100755 index a0d28f1..d3fc7af --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.6-]} {return} -package ifneeded http 2.8.11 [list tclPkgSetup $dir http 2.8.11 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.8.12 [list tclPkgSetup $dir http 2.8.12 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in old mode 100644 new mode 100755 index 7f45414..4814ee0 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -840,8 +840,8 @@ install-libraries: libraries do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.8.11 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.11.tm; + @echo "Installing package http 2.8.12 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.12.tm; @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in old mode 100644 new mode 100755 index c62a3c7..633a9f5 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -651,8 +651,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.8.11 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.11.tm; + @echo "Installing package http 2.8.12 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.12.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ -- cgit v0.12 From 25b97a7df947a49be144f13ba4c392d3fda00e7d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 31 Aug 2017 13:43:17 +0000 Subject: Adapt .fossil-settings/crlf-glob, for 5 libtommath-related files which have crlf ending --- .fossil-settings/crlf-glob | 3 +++ .fossil-settings/crnl-glob | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.fossil-settings/crlf-glob b/.fossil-settings/crlf-glob index f219a75..2041cb6 100644 --- a/.fossil-settings/crlf-glob +++ b/.fossil-settings/crlf-glob @@ -3,6 +3,9 @@ compat/zlib/contrib/vstudio/readme.txt compat/zlib/contrib/vstudio/*/zlib.rc compat/zlib/win32/*.txt compat/zlib/win64/*.txt +libtommath/*.dsp +libtommath/*.sln +libtommath/*.vcproj tools/tcl.hpj.in tools/tcl.wse.in win/buildall.vc.bat diff --git a/.fossil-settings/crnl-glob b/.fossil-settings/crnl-glob index f219a75..2041cb6 100644 --- a/.fossil-settings/crnl-glob +++ b/.fossil-settings/crnl-glob @@ -3,6 +3,9 @@ compat/zlib/contrib/vstudio/readme.txt compat/zlib/contrib/vstudio/*/zlib.rc compat/zlib/win32/*.txt compat/zlib/win64/*.txt +libtommath/*.dsp +libtommath/*.sln +libtommath/*.vcproj tools/tcl.hpj.in tools/tcl.wse.in win/buildall.vc.bat -- cgit v0.12 From e28f1eece4af6a2415de923fb4c3cfae7c055c8e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 1 Sep 2017 13:48:56 +0000 Subject: Handle Unicode surrogates correctly in Tcl_AppendFormatToObj() and BuildCharSet(). Only makes a difference for TCL_UTF_MAX=4, when surrogates are used in the format string ... highly unlikely corner-case. --- generic/tclScan.c | 4 ++-- generic/tclStringObj.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclScan.c b/generic/tclScan.c index 7a6a8a2..e1fcad4 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -72,7 +72,7 @@ BuildCharSet( CharSet *cset, const char *format) /* Points to first char of set. */ { - Tcl_UniChar ch, start; + Tcl_UniChar ch = 0, start; int offset, nranges; const char *end; @@ -582,7 +582,7 @@ Tcl_ScanObjCmd( char op = 0; int width, underflow = 0; Tcl_WideInt wideValue; - Tcl_UniChar ch, sch; + Tcl_UniChar ch = 0, sch = 0; Tcl_Obj **objs = NULL, *objPtr = NULL; int flags; char buf[513]; /* Temporary buffer to hold scanned number diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 6d97881..01b044e 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -1682,6 +1682,7 @@ Tcl_AppendFormatToObj( const char *span = format, *msg, *errCode; int numBytes = 0, objIndex = 0, gotXpg = 0, gotSequential = 0; int originalLength, limit; + Tcl_UniChar ch = 0; static const char *mixedXPG = "cannot mix \"%\" and \"%n$\" conversion specifiers"; static const char *const badIndex[2] = { @@ -1709,7 +1710,6 @@ Tcl_AppendFormatToObj( #endif int newXpg, numChars, allocSegment = 0, segmentLimit, segmentNumBytes; Tcl_Obj *segment; - Tcl_UniChar ch = 0; int step = TclUtfToUniChar(format, &ch); format += step; -- cgit v0.12 From ce58cdff9f1d04dfc684cd7f68b920ef6f2164eb Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 2 Sep 2017 19:35:22 +0000 Subject: [Bug 0e4d88b650] First draft fix. Re-resolve namespace after cmd deletion. --- generic/tclBasic.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 44cf543..fddce1a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -2017,7 +2017,7 @@ Tcl_CreateObjCommand( Command *cmdPtr, *refCmdPtr; Tcl_HashEntry *hPtr; const char *tail; - int isNew; + int isNew = 0, deleted = 0; ImportedCmdData *dataPtr; if (iPtr->flags & DELETED) { @@ -2030,6 +2030,14 @@ Tcl_CreateObjCommand( } /* + * If the command name we seek to create already exists, we need to + * delete that first. That can be tricky in the presence of traces. + * Loop until we no longer find an existing command in the way. + */ + + while (1) { + + /* * Determine where the command should reside. If its name contains * namespace qualifiers, we put it in the specified namespace; otherwise, * we always put it in the global namespace. @@ -2047,11 +2055,13 @@ Tcl_CreateObjCommand( } hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew); - TclInvalidateNsPath(nsPtr); - if (!isNew) { - cmdPtr = Tcl_GetHashValue(hPtr); + + if (isNew || deleted) { + break; + } /* Command already exists. */ + cmdPtr = Tcl_GetHashValue(hPtr); /* * [***] This is wrong. See Tcl Bug a16752c252. @@ -2089,8 +2099,8 @@ Tcl_CreateObjCommand( cmdPtr->importRefPtr = NULL; } TclCleanupCommandMacro(cmdPtr); - - hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew); + deleted = 1; + } if (!isNew) { /* * If the deletion callback recreated the command, just throw away @@ -2100,7 +2110,8 @@ Tcl_CreateObjCommand( ckfree(Tcl_GetHashValue(hPtr)); } - } else { + + if (!deleted) { /* * The list of command exported from the namespace might have changed. * However, we do not need to recompute this just yet; next time we @@ -2108,7 +2119,8 @@ Tcl_CreateObjCommand( */ TclInvalidateNsCmdLookup(nsPtr); - } + TclInvalidateNsPath(nsPtr); + } cmdPtr = (Command *) ckalloc(sizeof(Command)); Tcl_SetHashValue(hPtr, cmdPtr); cmdPtr->hPtr = hPtr; -- cgit v0.12 From 7afc6b1c1764a4b1305c9e716eec3949e655e626 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 2 Sep 2017 20:17:26 +0000 Subject: Tidy up. --- generic/tclBasic.c | 73 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index fddce1a..7c223e9 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -2013,8 +2013,8 @@ Tcl_CreateObjCommand( { Interp *iPtr = (Interp *) interp; ImportRef *oldRefPtr = NULL; - Namespace *nsPtr, *dummy1, *dummy2; - Command *cmdPtr, *refCmdPtr; + Namespace *nsPtr; + Command *cmdPtr; Tcl_HashEntry *hPtr; const char *tail; int isNew = 0, deleted = 0; @@ -2032,35 +2032,41 @@ Tcl_CreateObjCommand( /* * If the command name we seek to create already exists, we need to * delete that first. That can be tricky in the presence of traces. - * Loop until we no longer find an existing command in the way. + * Loop until we no longer find an existing command in the way, or + * until we've deleted one command and that didn't finish the job. */ while (1) { + /* + * Determine where the command should reside. If its name contains + * namespace qualifiers, we put it in the specified namespace; + * otherwise, we always put it in the global namespace. + */ - /* - * Determine where the command should reside. If its name contains - * namespace qualifiers, we put it in the specified namespace; otherwise, - * we always put it in the global namespace. - */ + if (strstr(cmdName, "::") != NULL) { + Namespace *dummy1, *dummy2; - if (strstr(cmdName, "::") != NULL) { - TclGetNamespaceForQualName(interp, cmdName, NULL, + TclGetNamespaceForQualName(interp, cmdName, NULL, TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail); - if ((nsPtr == NULL) || (tail == NULL)) { - return (Tcl_Command) NULL; - } - } else { - nsPtr = iPtr->globalNsPtr; - tail = cmdName; - } + if ((nsPtr == NULL) || (tail == NULL)) { + return (Tcl_Command) NULL; + } + } else { + nsPtr = iPtr->globalNsPtr; + tail = cmdName; + } - hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew); + hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew); - if (isNew || deleted) { - break; - } + if (isNew || deleted) { + /* + * isNew - No conflict with existing command. + * deleted - We've already deleted a conflicting command + */ + break; + } - /* Command already exists. */ + /* An existing command conflicts. Try to delete it.. */ cmdPtr = Tcl_GetHashValue(hPtr); /* @@ -2101,17 +2107,18 @@ Tcl_CreateObjCommand( TclCleanupCommandMacro(cmdPtr); deleted = 1; } - if (!isNew) { - /* - * If the deletion callback recreated the command, just throw away - * the new command (if we try to delete it again, we could get - * stuck in an infinite loop). - */ - ckfree(Tcl_GetHashValue(hPtr)); - } + if (!isNew) { + /* + * If the deletion callback recreated the command, just throw away + * the new command (if we try to delete it again, we could get + * stuck in an infinite loop). + */ - if (!deleted) { + ckfree(Tcl_GetHashValue(hPtr)); + } + + if (!deleted) { /* * The list of command exported from the namespace might have changed. * However, we do not need to recompute this just yet; next time we @@ -2120,7 +2127,7 @@ Tcl_CreateObjCommand( TclInvalidateNsCmdLookup(nsPtr); TclInvalidateNsPath(nsPtr); - } + } cmdPtr = (Command *) ckalloc(sizeof(Command)); Tcl_SetHashValue(hPtr, cmdPtr); cmdPtr->hPtr = hPtr; @@ -2146,7 +2153,7 @@ Tcl_CreateObjCommand( if (oldRefPtr != NULL) { cmdPtr->importRefPtr = oldRefPtr; while (oldRefPtr != NULL) { - refCmdPtr = oldRefPtr->importedCmdPtr; + Command *refCmdPtr = oldRefPtr->importedCmdPtr; dataPtr = refCmdPtr->objClientData; dataPtr->realCmdPtr = cmdPtr; oldRefPtr = oldRefPtr->nextPtr; -- cgit v0.12 From 3ec5b35deb12c04bd8ca140242037d0b802b515c Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 2 Sep 2017 20:40:44 +0000 Subject: Similar fix to Tcl_CreateCommand(). --- generic/tclBasic.c | 85 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 31 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7c223e9..7f75892 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -1851,11 +1851,11 @@ Tcl_CreateCommand( { Interp *iPtr = (Interp *) interp; ImportRef *oldRefPtr = NULL; - Namespace *nsPtr, *dummy1, *dummy2; - Command *cmdPtr, *refCmdPtr; + Namespace *nsPtr; + Command *cmdPtr; Tcl_HashEntry *hPtr; const char *tail; - int isNew; + int isNew = 0, deleted = 0; ImportedCmdData *dataPtr; if (iPtr->flags & DELETED) { @@ -1868,32 +1868,52 @@ Tcl_CreateCommand( } /* - * Determine where the command should reside. If its name contains - * namespace qualifiers, we put it in the specified namespace; otherwise, - * we always put it in the global namespace. + * If the command name we seek to create already exists, we need to + * delete that first. That can be tricky in the presence of traces. + * Loop until we no longer find an existing command in the way, or + * until we've deleted one command and that didn't finish the job. */ - if (strstr(cmdName, "::") != NULL) { - TclGetNamespaceForQualName(interp, cmdName, NULL, - TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail); - if ((nsPtr == NULL) || (tail == NULL)) { - return (Tcl_Command) NULL; - } - } else { - nsPtr = iPtr->globalNsPtr; - tail = cmdName; - } + while (1) { + /* + * Determine where the command should reside. If its name contains + * namespace qualifiers, we put it in the specified namespace; + * otherwise, we always put it in the global namespace. + */ - hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew); - if (!isNew) { + if (strstr(cmdName, "::") != NULL) { + Namespace *dummy1, *dummy2; + + TclGetNamespaceForQualName(interp, cmdName, NULL, + TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail); + if ((nsPtr == NULL) || (tail == NULL)) { + return (Tcl_Command) NULL; + } + } else { + nsPtr = iPtr->globalNsPtr; + tail = cmdName; + } + + hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew); + + if (isNew || deleted) { + /* + * isNew - No conflict with existing command. + * deleted - We've already deleted a conflicting command + */ + break; + } + + /* An existing command conflicts. Try to delete it.. */ + cmdPtr = Tcl_GetHashValue(hPtr); + /* - * Command already exists. Delete the old one. Be careful to preserve + * Be careful to preserve * any existing import links so we can restore them down below. That * way, you can redefine a command and its import status will remain * intact. */ - cmdPtr = Tcl_GetHashValue(hPtr); cmdPtr->refCount++; if (cmdPtr->importRefPtr) { cmdPtr->flags |= CMD_REDEF_IN_PROGRESS; @@ -1906,18 +1926,21 @@ Tcl_CreateCommand( cmdPtr->importRefPtr = NULL; } TclCleanupCommandMacro(cmdPtr); + deleted = 1; + } - hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew); - if (!isNew) { - /* - * If the deletion callback recreated the command, just throw away - * the new command (if we try to delete it again, we could get - * stuck in an infinite loop). - */ + if (!isNew) { + /* + * If the deletion callback recreated the command, just throw away + * the new command (if we try to delete it again, we could get + * stuck in an infinite loop). + */ + + ckfree((char *) Tcl_GetHashValue(hPtr)); + } + + if (!deleted) { - ckfree((char *) Tcl_GetHashValue(hPtr)); - } - } else { /* * The list of command exported from the namespace might have changed. * However, we do not need to recompute this just yet; next time we @@ -1952,7 +1975,7 @@ Tcl_CreateCommand( if (oldRefPtr != NULL) { cmdPtr->importRefPtr = oldRefPtr; while (oldRefPtr != NULL) { - refCmdPtr = oldRefPtr->importedCmdPtr; + Command *refCmdPtr = oldRefPtr->importedCmdPtr; dataPtr = refCmdPtr->objClientData; dataPtr->realCmdPtr = cmdPtr; oldRefPtr = oldRefPtr->nextPtr; -- cgit v0.12 From f42f0060be177134714f2fcfb31485e7e72a1916 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 2 Sep 2017 21:14:55 +0000 Subject: Add test --- tests/basic.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/basic.test b/tests/basic.test index 91e4d6c..e4b46fd 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -221,6 +221,21 @@ test basic-15.1 {Tcl_CreateObjCommand, new cmd goes into a namespace specified i list [test_ns_basic::cmd] \ [namespace delete test_ns_basic] } {::test_ns_basic {}} +test basic-15.2 {Tcl_CreateObjCommand, Bug 0e4d88b650} -setup { + proc deleter {ns args} { + namespace delete $ns + } + namespace eval n { + proc p {} {} + } + trace add command n::p delete [list [namespace which deleter] [namespace current]::n] +} -body { + proc n::p {} {} +} -cleanup { + namespace delete n + rename deleter {} +} + test basic-16.1 {TclInvokeStringCommand} {emptyTest} { } {} -- cgit v0.12 From e08c86934d9b781f246aa5e1b0c6612c17bb4f90 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 4 Sep 2017 12:37:04 +0000 Subject: Typo's (Thanks to Gustaf Neumann), nothing functional. --- generic/tclBasic.c | 2 +- generic/tclEncoding.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 36d2301..acdcf41 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -2097,7 +2097,7 @@ Tcl_CreateCommand( /* An existing command conflicts. Try to delete it.. */ cmdPtr = Tcl_GetHashValue(hPtr); - + /* * Be careful to preserve * any existing import links so we can restore them down below. That diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 8450128..2548b73 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2329,7 +2329,7 @@ UtfToUtfProc( } if (UCHAR(*src) < 0x80 && !(UCHAR(*src) == 0 && pureNullMode == 0)) { /* - * Copy 7bit chatacters, but skip null-bytes when we are in input + * Copy 7bit characters, but skip null-bytes when we are in input * mode, so that they get converted to 0xc080. */ @@ -3374,7 +3374,7 @@ EscapeFromUtfProc( /* * The state variable has the value of oldState when word is 0. - * In this case, the escape sequense should not be copied to dst + * In this case, the escape sequence should not be copied to dst * because the current character set is not changed. */ -- cgit v0.12 From a15279ffd11639e3eee06f618dd684eab635e334 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 4 Sep 2017 13:59:04 +0000 Subject: Make pkgIndex.tcl from msgcat work for Tcl 9.0 (not really necessary, but for consistancy) --- library/msgcat/pkgIndex.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/msgcat/pkgIndex.tcl b/library/msgcat/pkgIndex.tcl index 7cdb703..72c5dc0 100644 --- a/library/msgcat/pkgIndex.tcl +++ b/library/msgcat/pkgIndex.tcl @@ -1,2 +1,2 @@ -if {![package vsatisfies [package provide Tcl] 8.5]} {return} +if {![package vsatisfies [package provide Tcl] 8.5-]} {return} package ifneeded msgcat 1.6.1 [list source [file join $dir msgcat.tcl]] -- cgit v0.12 From db3273f34623ce56fdd5f0a8e6fefa6c2c956619 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 14 Sep 2017 07:41:09 +0000 Subject: Fix [f5da3d30e096a1c3486fbc480a6ece01fcb277a6|f5da3d30e0]: clerical error in comments --- library/init.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/init.tcl b/library/init.tcl index 3684258..c31eea3 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -624,7 +624,7 @@ proc auto_import {pattern} { if {$tcl_platform(platform) eq "windows"} { # Windows version. # -# Note that info executable doesn't work under Windows, so we have to +# Note that file executable doesn't work under Windows, so we have to # look for files with .exe, .com, or .bat extensions. Also, the path # may be in the Path or PATH environment variables, and path # components are separated with semicolons, not colons as under Unix. -- cgit v0.12 From d45863129f9c0e0c509456d9615321b6e7202a5e Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Thu, 21 Sep 2017 18:47:45 +0000 Subject: RFE [566a999189] - better error message for 32/64 bit mismatch on load. --- win/tclWinLoad.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 26512b1..3ad6328 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -66,6 +66,7 @@ TclpDlopen( HINSTANCE hInstance; const TCHAR *nativeName; Tcl_LoadHandle handlePtr; + DWORD firstError; /* * First try the full path the user gave us. This is particularly @@ -84,6 +85,12 @@ TclpDlopen( Tcl_DString ds; + /* + * Remember the first error on load attempt to be used if the + * second load attempt below also fails. + */ + firstError = GetLastError(); + nativeName = Tcl_WinUtfToTChar(Tcl_GetString(pathPtr), -1, &ds); hInstance = LoadLibraryEx(nativeName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); @@ -91,8 +98,21 @@ TclpDlopen( } if (hInstance == NULL) { - DWORD lastError = GetLastError(); - Tcl_Obj *errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ", + DWORD lastError; + Tcl_Obj *errMsg; + + /* + * We choose to only use the error from the second call if the first + * call failed due to the file not being found. Else stick to the + * first error for reporting purposes. + */ + if (firstError == ERROR_MOD_NOT_FOUND || + firstError == ERROR_DLL_NOT_FOUND) + lastError = GetLastError(); + else + lastError = firstError; + + errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ", Tcl_GetString(pathPtr)); /* @@ -129,7 +149,11 @@ TclpDlopen( Tcl_AppendToObj(errMsg, "the library initialization" " routine failed", -1); break; - default: + case ERROR_BAD_EXE_FORMAT: + Tcl_SetErrorCode(interp, "WIN_LOAD", "BAD_EXE_FORMAT", NULL); + Tcl_AppendToObj(errMsg, "Bad exe format. Possibly a 32/64-bit mismatch.", -1); + break; + default: TclWinConvertError(lastError); Tcl_AppendToObj(errMsg, Tcl_PosixError(interp), -1); } -- cgit v0.12 From b8e5e2909ee8607f2351ffc9a72c114dfb571e6b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 9 Oct 2017 12:52:14 +0000 Subject: Add visual-studio related entries to ignore-glob. Taken over from reform-vc branch --- .fossil-settings/ignore-glob | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob index 9ed86b1..c85b488 100644 --- a/.fossil-settings/ignore-glob +++ b/.fossil-settings/ignore-glob @@ -6,6 +6,7 @@ *.lib *.o *.obj +*.pdb *.res *.sl *.so @@ -17,8 +18,31 @@ */tclsh* */tcltest* */versions.vc +*/version.vc +html +libtommath/bn.ilg +libtommath/bn.ind +libtommath/pretty.build +libtommath/tommath.src +libtommath/*.pdf +libtommath/*.pl +libtommath/*.sh +libtommath/tombc/* +libtommath/pre_gen/* +libtommath/pics/* +libtommath/mtest/* +libtommath/logs/* +libtommath/etc/* +libtommath/demo/* +libtommath/*.out +libtommath/*.tex +unix/autoMkindex.tcl unix/dltest.marker unix/tcl.pc +unix/tclIndex unix/pkgs/* +win/Debug* +win/Release* win/pkgs/* win/tcl.hpj +win/nmhlp-out.txt -- cgit v0.12 From 15a7950c9ec165ae183a8455436e57ccf23afb1c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 9 Oct 2017 14:23:39 +0000 Subject: In nmakehlp -v, return non-0 exit code if version is not found. (taken from vc-reform branch) --- win/nmakehlp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 22b7b06..0439d1c 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -74,6 +74,7 @@ main( char msg[300]; DWORD dwWritten; int chars; + char *s; /* * Make sure children (cl.exe and link.exe) are kept quiet. @@ -153,8 +154,13 @@ main( &dwWritten, NULL); return 0; } - printf("%s\n", GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0')); - return 0; + s = GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0'); + if (s && *s) { + printf("%s\n", s); + return 0; + } else + return 1; /* Version not found. Return non-0 exit code */ + case 'Q': if (argc != 3) { chars = snprintf(msg, sizeof(msg) - 1, -- cgit v0.12 From 69030a86c83b4982c53feaaa0e46e5d235abb665 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 18 Oct 2017 18:23:38 +0000 Subject: [1a56550e96] Mixins aren't being searched correctly by [info class methods -all] --- tests/oo.test | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/oo.test b/tests/oo.test index 5eaa8bf..3a6d2d1 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -3799,7 +3799,29 @@ test oo-35.4 {Bug 593baa032c: mixins list teardown} { oo::class create D {mixin B} namespace eval [info object namespace D] [list [namespace which B] destroy] } {} - +test oo-35.5 {Bug } -setup { + oo::class create base { + unexport destroy + } +} -body { + oo::class create C { + superclass base + method c {} {} + } + oo::class create D { + superclass base + mixin C + method d {} {} + } + oo::class create E { + superclass D + method e {} {} + } + E create e1 + list [lsort [info class methods E -all]] [lsort [info object methods e1 -all]] +} -cleanup { + base destroy +} -result {{c d e} {c d e}} cleanupTests return -- cgit v0.12 From 252f75d8c8a95ffa59c91a4ed54881d09a72e137 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Oct 2017 09:22:05 +0000 Subject: Ensure that method list introspection finds methods from mixins in all cases. Use better approach for preventing excessive iteration. --- generic/tclOOCall.c | 75 +++++++++++++++++++++++++++++++++++++++-------------- tests/oo.test | 2 +- 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index ac0b94d..e449893 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -53,7 +53,8 @@ static void AddClassFiltersToCallContext(Object *const oPtr, Class *clsPtr, struct ChainBuilder *const cbPtr, Tcl_HashTable *const doneFilters, int flags); static void AddClassMethodNames(Class *clsPtr, const int flags, - Tcl_HashTable *const namesPtr); + Tcl_HashTable *const namesPtr, + Tcl_HashTable *const examinedClassesPtr); static inline void AddMethodToCallChain(Method *const mPtr, struct ChainBuilder *const cbPtr, Tcl_HashTable *const doneFilters, @@ -367,6 +368,10 @@ TclOOGetSortedMethodList( { Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list" * mapping. */ + Tcl_HashTable examinedClasses; + /* Used to track what classes have been looked + * at. Is set-like in nature and keyed by + * pointer to class. */ FOREACH_HASH_DECLS; int i; Class *mixinPtr; @@ -376,6 +381,7 @@ TclOOGetSortedMethodList( void *isWanted; Tcl_InitObjHashTable(&names); + Tcl_InitHashTable(&examinedClasses, TCL_ONE_WORD_KEYS); /* * Name the bits used in the names table values. @@ -436,11 +442,14 @@ TclOOGetSortedMethodList( * hierarchy. */ - AddClassMethodNames(oPtr->selfCls, flags, &names); + AddClassMethodNames(oPtr->selfCls, flags, &names, &examinedClasses); FOREACH(mixinPtr, oPtr->mixins) { - AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, &names); + AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, &names, + &examinedClasses); } + Tcl_DeleteHashTable(&examinedClasses); + /* * See how many (visible) method names there are. If none, we do not (and * should not) try to sort the list of them. @@ -495,18 +504,24 @@ TclOOGetSortedClassMethodList( { Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list" * mapping. */ + Tcl_HashTable examinedClasses; + /* Used to track what classes have been looked + * at. Is set-like in nature and keyed by + * pointer to class. */ FOREACH_HASH_DECLS; int i; Tcl_Obj *namePtr; void *isWanted; Tcl_InitObjHashTable(&names); + Tcl_InitHashTable(&examinedClasses, TCL_ONE_WORD_KEYS); /* * Process method names from the class hierarchy and the mixin hierarchy. */ - AddClassMethodNames(clsPtr, flags, &names); + AddClassMethodNames(clsPtr, flags, &names, &examinedClasses); + Tcl_DeleteHashTable(&examinedClasses); /* * See how many (visible) method names there are. If none, we do not (and @@ -581,39 +596,48 @@ AddClassMethodNames( Class *clsPtr, /* Class to get method names from. */ const int flags, /* Whether we are interested in just the * public method names. */ - Tcl_HashTable *const namesPtr) + Tcl_HashTable *const namesPtr, /* Reference to the hash table to put the * information in. The hash table maps the * Tcl_Obj * method name to an integral value * describing whether the method is wanted. * This ensures that public/private override - * semantics are handled correctly.*/ + * semantics are handled correctly. */ + Tcl_HashTable *const examinedClassesPtr) + /* Hash table that tracks what classes have + * already been looked at. The keys are the + * pointers to the classes, and the values are + * immaterial. */ { /* + * If we've already started looking at this class, stop working on it now + * to prevent repeated work. + */ + + if (Tcl_FindHashEntry(examinedClassesPtr, (char *) clsPtr)) { + return; + } + + /* * Scope all declarations so that the compiler can stand a good chance of * making the recursive step highly efficient. We also hand-implement the * tail-recursive case using a while loop; C compilers typically cannot do * tail-recursion optimization usefully. */ - if (clsPtr->mixins.num != 0) { - Class *mixinPtr; - int i; - - /* TODO: Beware of infinite loops! */ - FOREACH(mixinPtr, clsPtr->mixins) { - AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, namesPtr); - } - } - while (1) { FOREACH_HASH_DECLS; Tcl_Obj *namePtr; Method *mPtr; + int isNew; - FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) { - int isNew; + (void) Tcl_CreateHashEntry(examinedClassesPtr, (char *) clsPtr, + &isNew); + if (!isNew) { + break; + } + FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) { hPtr = Tcl_CreateHashEntry(namesPtr, (char *) namePtr, &isNew); if (isNew) { int isWanted = (!(flags & PUBLIC_METHOD) @@ -630,6 +654,18 @@ AddClassMethodNames( } } + if (clsPtr->mixins.num != 0) { + Class *mixinPtr; + int i; + + FOREACH(mixinPtr, clsPtr->mixins) { + if (mixinPtr != clsPtr) { + AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, + namesPtr, examinedClassesPtr); + } + } + } + if (clsPtr->superclasses.num != 1) { break; } @@ -640,7 +676,8 @@ AddClassMethodNames( int i; FOREACH(superPtr, clsPtr->superclasses) { - AddClassMethodNames(superPtr, flags, namesPtr); + AddClassMethodNames(superPtr, flags, namesPtr, + examinedClassesPtr); } } } diff --git a/tests/oo.test b/tests/oo.test index 3a6d2d1..1ac6f37 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -3799,7 +3799,7 @@ test oo-35.4 {Bug 593baa032c: mixins list teardown} { oo::class create D {mixin B} namespace eval [info object namespace D] [list [namespace which B] destroy] } {} -test oo-35.5 {Bug } -setup { +test oo-35.5 {Bug 1a56550e96: introspectors must traverse mixin links correctly} -setup { oo::class create base { unexport destroy } -- cgit v0.12 From df974e71f99feff44f12a02e66281948465d32ec Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Oct 2017 09:28:16 +0000 Subject: Oops; put the code in the wrong place. Mixins have priority when deciding method visibility. --- generic/tclOOCall.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index e449893..3e4f561 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -637,6 +637,18 @@ AddClassMethodNames( break; } + if (clsPtr->mixins.num != 0) { + Class *mixinPtr; + int i; + + FOREACH(mixinPtr, clsPtr->mixins) { + if (mixinPtr != clsPtr) { + AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, + namesPtr, examinedClassesPtr); + } + } + } + FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) { hPtr = Tcl_CreateHashEntry(namesPtr, (char *) namePtr, &isNew); if (isNew) { @@ -654,18 +666,6 @@ AddClassMethodNames( } } - if (clsPtr->mixins.num != 0) { - Class *mixinPtr; - int i; - - FOREACH(mixinPtr, clsPtr->mixins) { - if (mixinPtr != clsPtr) { - AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, - namesPtr, examinedClassesPtr); - } - } - } - if (clsPtr->superclasses.num != 1) { break; } -- cgit v0.12 From cdb25d894650feb93162033ae30f0e158b6efb1e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Oct 2017 12:09:48 +0000 Subject: Fix [b58e6897034fc5292c9d36ba8099d9a835c98172|b58e689703]: Return value of 'Tcl_Flush' --- generic/tclIO.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 64501fd..e74624f 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -6660,7 +6660,7 @@ Tcl_Flush( chanPtr = statePtr->topChanPtr; if (CheckChannelErrors(statePtr, TCL_WRITABLE) != 0) { - return -1; + return TCL_ERROR; } result = FlushChannel(NULL, chanPtr, 0); -- cgit v0.12 From 44077043167cd6acfe43132817852e7508b4ff29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ignacio=20Mar=C3=ADn?= Date: Mon, 23 Oct 2017 16:59:20 +0000 Subject: Update TZ info to tzcode2017c. --- library/tzdata/Africa/Juba | 40 ++++++++- library/tzdata/Africa/Khartoum | 1 + library/tzdata/Africa/Windhoek | 169 +------------------------------------- library/tzdata/America/Adak | 4 +- library/tzdata/America/Anchorage | 2 +- library/tzdata/America/Detroit | 2 - library/tzdata/America/Grand_Turk | 164 ++++++++++++++++++++++++++++++++++++ library/tzdata/America/Juneau | 2 +- library/tzdata/America/Metlakatla | 2 +- library/tzdata/America/Nome | 4 +- library/tzdata/America/Sitka | 2 +- library/tzdata/America/Yakutat | 2 +- library/tzdata/Asia/Famagusta | 165 +++++++++++++++++++++++++++++++++++++ library/tzdata/Asia/Kolkata | 6 +- library/tzdata/Asia/Yangon | 6 +- library/tzdata/Asia/Yerevan | 1 + library/tzdata/Europe/Dublin | 6 +- library/tzdata/Pacific/Apia | 2 +- library/tzdata/Pacific/Fiji | 24 +++--- library/tzdata/Pacific/Pago_Pago | 2 +- library/tzdata/Pacific/Tongatapu | 165 ------------------------------------- 21 files changed, 404 insertions(+), 367 deletions(-) diff --git a/library/tzdata/Africa/Juba b/library/tzdata/Africa/Juba index 40551f2..a0dbf5e 100644 --- a/library/tzdata/Africa/Juba +++ b/library/tzdata/Africa/Juba @@ -1,5 +1,39 @@ # created by tools/tclZIC.tcl - do not edit -if {![info exists TZData(Africa/Khartoum)]} { - LoadTimeZoneFile Africa/Khartoum + +set TZData(:Africa/Juba) { + {-9223372036854775808 7588 0 LMT} + {-1230775588 7200 0 CAT} + {10360800 10800 1 CAST} + {24786000 7200 0 CAT} + {41810400 10800 1 CAST} + {56322000 7200 0 CAT} + {73432800 10800 1 CAST} + {87944400 7200 0 CAT} + {104882400 10800 1 CAST} + {119480400 7200 0 CAT} + {136332000 10800 1 CAST} + {151016400 7200 0 CAT} + {167781600 10800 1 CAST} + {182552400 7200 0 CAT} + {199231200 10800 1 CAST} + {214174800 7200 0 CAT} + {230680800 10800 1 CAST} + {245710800 7200 0 CAT} + {262735200 10800 1 CAST} + {277246800 7200 0 CAT} + {294184800 10800 1 CAST} + {308782800 7200 0 CAT} + {325634400 10800 1 CAST} + {340405200 7200 0 CAT} + {357084000 10800 1 CAST} + {371941200 7200 0 CAT} + {388533600 10800 1 CAST} + {403477200 7200 0 CAT} + {419983200 10800 1 CAST} + {435013200 7200 0 CAT} + {452037600 10800 1 CAST} + {466635600 7200 0 CAT} + {483487200 10800 1 CAST} + {498171600 7200 0 CAT} + {947930400 10800 0 EAT} } -set TZData(:Africa/Juba) $TZData(:Africa/Khartoum) diff --git a/library/tzdata/Africa/Khartoum b/library/tzdata/Africa/Khartoum index dfcac82..dc441f6 100644 --- a/library/tzdata/Africa/Khartoum +++ b/library/tzdata/Africa/Khartoum @@ -36,4 +36,5 @@ set TZData(:Africa/Khartoum) { {483487200 10800 1 CAST} {498171600 7200 0 CAT} {947930400 10800 0 EAT} + {1509483600 7200 0 CAT} } diff --git a/library/tzdata/Africa/Windhoek b/library/tzdata/Africa/Windhoek index 1b8f86a..974ebda 100644 --- a/library/tzdata/Africa/Windhoek +++ b/library/tzdata/Africa/Windhoek @@ -7,7 +7,8 @@ set TZData(:Africa/Windhoek) { {-860976000 10800 1 SAST} {-845254800 7200 0 SAST} {637970400 7200 0 CAT} - {765324000 3600 0 WAT} + {764200800 3600 0 WAT} + {764204400 3600 0 WAT} {778640400 7200 1 WAST} {796780800 3600 0 WAT} {810090000 7200 1 WAST} @@ -54,169 +55,5 @@ set TZData(:Africa/Windhoek) { {1459641600 3600 0 WAT} {1472950800 7200 1 WAST} {1491091200 3600 0 WAT} - {1504400400 7200 1 WAST} - {1522540800 3600 0 WAT} - {1535850000 7200 1 WAST} - {1554595200 3600 0 WAT} - {1567299600 7200 1 WAST} - {1586044800 3600 0 WAT} - {1599354000 7200 1 WAST} - {1617494400 3600 0 WAT} - {1630803600 7200 1 WAST} - {1648944000 3600 0 WAT} - {1662253200 7200 1 WAST} - {1680393600 3600 0 WAT} - {1693702800 7200 1 WAST} - {1712448000 3600 0 WAT} - {1725152400 7200 1 WAST} - {1743897600 3600 0 WAT} - {1757206800 7200 1 WAST} - {1775347200 3600 0 WAT} - {1788656400 7200 1 WAST} - {1806796800 3600 0 WAT} - {1820106000 7200 1 WAST} - {1838246400 3600 0 WAT} - {1851555600 7200 1 WAST} - {1869696000 3600 0 WAT} - {1883005200 7200 1 WAST} - {1901750400 3600 0 WAT} - {1914454800 7200 1 WAST} - {1933200000 3600 0 WAT} - {1946509200 7200 1 WAST} - {1964649600 3600 0 WAT} - {1977958800 7200 1 WAST} - {1996099200 3600 0 WAT} - {2009408400 7200 1 WAST} - {2027548800 3600 0 WAT} - {2040858000 7200 1 WAST} - {2058998400 3600 0 WAT} - {2072307600 7200 1 WAST} - {2091052800 3600 0 WAT} - {2104362000 7200 1 WAST} - {2122502400 3600 0 WAT} - {2135811600 7200 1 WAST} - {2153952000 3600 0 WAT} - {2167261200 7200 1 WAST} - {2185401600 3600 0 WAT} - {2198710800 7200 1 WAST} - {2216851200 3600 0 WAT} - {2230160400 7200 1 WAST} - {2248905600 3600 0 WAT} - {2261610000 7200 1 WAST} - {2280355200 3600 0 WAT} - {2293664400 7200 1 WAST} - {2311804800 3600 0 WAT} - {2325114000 7200 1 WAST} - {2343254400 3600 0 WAT} - {2356563600 7200 1 WAST} - {2374704000 3600 0 WAT} - {2388013200 7200 1 WAST} - {2406153600 3600 0 WAT} - {2419462800 7200 1 WAST} - {2438208000 3600 0 WAT} - {2450912400 7200 1 WAST} - {2469657600 3600 0 WAT} - {2482966800 7200 1 WAST} - {2501107200 3600 0 WAT} - {2514416400 7200 1 WAST} - {2532556800 3600 0 WAT} - {2545866000 7200 1 WAST} - {2564006400 3600 0 WAT} - {2577315600 7200 1 WAST} - {2596060800 3600 0 WAT} - {2608765200 7200 1 WAST} - {2627510400 3600 0 WAT} - {2640819600 7200 1 WAST} - {2658960000 3600 0 WAT} - {2672269200 7200 1 WAST} - {2690409600 3600 0 WAT} - {2703718800 7200 1 WAST} - {2721859200 3600 0 WAT} - {2735168400 7200 1 WAST} - {2753308800 3600 0 WAT} - {2766618000 7200 1 WAST} - {2785363200 3600 0 WAT} - {2798067600 7200 1 WAST} - {2816812800 3600 0 WAT} - {2830122000 7200 1 WAST} - {2848262400 3600 0 WAT} - {2861571600 7200 1 WAST} - {2879712000 3600 0 WAT} - {2893021200 7200 1 WAST} - {2911161600 3600 0 WAT} - {2924470800 7200 1 WAST} - {2942611200 3600 0 WAT} - {2955920400 7200 1 WAST} - {2974665600 3600 0 WAT} - {2987974800 7200 1 WAST} - {3006115200 3600 0 WAT} - {3019424400 7200 1 WAST} - {3037564800 3600 0 WAT} - {3050874000 7200 1 WAST} - {3069014400 3600 0 WAT} - {3082323600 7200 1 WAST} - {3100464000 3600 0 WAT} - {3113773200 7200 1 WAST} - {3132518400 3600 0 WAT} - {3145222800 7200 1 WAST} - {3163968000 3600 0 WAT} - {3177277200 7200 1 WAST} - {3195417600 3600 0 WAT} - {3208726800 7200 1 WAST} - {3226867200 3600 0 WAT} - {3240176400 7200 1 WAST} - {3258316800 3600 0 WAT} - {3271626000 7200 1 WAST} - {3289766400 3600 0 WAT} - {3303075600 7200 1 WAST} - {3321820800 3600 0 WAT} - {3334525200 7200 1 WAST} - {3353270400 3600 0 WAT} - {3366579600 7200 1 WAST} - {3384720000 3600 0 WAT} - {3398029200 7200 1 WAST} - {3416169600 3600 0 WAT} - {3429478800 7200 1 WAST} - {3447619200 3600 0 WAT} - {3460928400 7200 1 WAST} - {3479673600 3600 0 WAT} - {3492378000 7200 1 WAST} - {3511123200 3600 0 WAT} - {3524432400 7200 1 WAST} - {3542572800 3600 0 WAT} - {3555882000 7200 1 WAST} - {3574022400 3600 0 WAT} - {3587331600 7200 1 WAST} - {3605472000 3600 0 WAT} - {3618781200 7200 1 WAST} - {3636921600 3600 0 WAT} - {3650230800 7200 1 WAST} - {3668976000 3600 0 WAT} - {3681680400 7200 1 WAST} - {3700425600 3600 0 WAT} - {3713734800 7200 1 WAST} - {3731875200 3600 0 WAT} - {3745184400 7200 1 WAST} - {3763324800 3600 0 WAT} - {3776634000 7200 1 WAST} - {3794774400 3600 0 WAT} - {3808083600 7200 1 WAST} - {3826224000 3600 0 WAT} - {3839533200 7200 1 WAST} - {3858278400 3600 0 WAT} - {3871587600 7200 1 WAST} - {3889728000 3600 0 WAT} - {3903037200 7200 1 WAST} - {3921177600 3600 0 WAT} - {3934486800 7200 1 WAST} - {3952627200 3600 0 WAT} - {3965936400 7200 1 WAST} - {3984076800 3600 0 WAT} - {3997386000 7200 1 WAST} - {4016131200 3600 0 WAT} - {4028835600 7200 1 WAST} - {4047580800 3600 0 WAT} - {4060890000 7200 1 WAST} - {4079030400 3600 0 WAT} - {4092339600 7200 1 WAST} + {1504400400 7200 0 CAT} } diff --git a/library/tzdata/America/Adak b/library/tzdata/America/Adak index bd5d5ab..04c4628 100644 --- a/library/tzdata/America/Adak +++ b/library/tzdata/America/Adak @@ -1,8 +1,8 @@ # created by tools/tclZIC.tcl - do not edit set TZData(:America/Adak) { - {-9223372036854775808 44001 0 LMT} - {-3225356001 -42398 0 LMT} + {-9223372036854775808 44002 0 LMT} + {-3225223727 -42398 0 LMT} {-2188944802 -39600 0 NST} {-883573200 -39600 0 NST} {-880196400 -36000 1 NWT} diff --git a/library/tzdata/America/Anchorage b/library/tzdata/America/Anchorage index 127d365..c0ff8de 100644 --- a/library/tzdata/America/Anchorage +++ b/library/tzdata/America/Anchorage @@ -2,7 +2,7 @@ set TZData(:America/Anchorage) { {-9223372036854775808 50424 0 LMT} - {-3225362424 -35976 0 LMT} + {-3225223727 -35976 0 LMT} {-2188951224 -36000 0 AST} {-883576800 -36000 0 AST} {-880200000 -32400 1 AWT} diff --git a/library/tzdata/America/Detroit b/library/tzdata/America/Detroit index 696a663..f725874 100644 --- a/library/tzdata/America/Detroit +++ b/library/tzdata/America/Detroit @@ -11,8 +11,6 @@ set TZData(:America/Detroit) { {-757364400 -18000 0 EST} {-684349200 -14400 1 EDT} {-671047200 -18000 0 EST} - {-80499600 -14400 1 EDT} - {-68666400 -18000 0 EST} {94712400 -18000 0 EST} {104914800 -14400 1 EDT} {120636000 -18000 0 EST} diff --git a/library/tzdata/America/Grand_Turk b/library/tzdata/America/Grand_Turk index 0edcf0b..c963adc 100644 --- a/library/tzdata/America/Grand_Turk +++ b/library/tzdata/America/Grand_Turk @@ -79,4 +79,168 @@ set TZData(:America/Grand_Turk) { {1414908000 -18000 0 EST} {1425798000 -14400 1 EDT} {1446361200 -14400 0 AST} + {1520751600 -14400 0 EDT} + {1541311200 -18000 0 EST} + {1552201200 -14400 1 EDT} + {1572760800 -18000 0 EST} + {1583650800 -14400 1 EDT} + {1604210400 -18000 0 EST} + {1615705200 -14400 1 EDT} + {1636264800 -18000 0 EST} + {1647154800 -14400 1 EDT} + {1667714400 -18000 0 EST} + {1678604400 -14400 1 EDT} + {1699164000 -18000 0 EST} + {1710054000 -14400 1 EDT} + {1730613600 -18000 0 EST} + {1741503600 -14400 1 EDT} + {1762063200 -18000 0 EST} + {1772953200 -14400 1 EDT} + {1793512800 -18000 0 EST} + {1805007600 -14400 1 EDT} + {1825567200 -18000 0 EST} + {1836457200 -14400 1 EDT} + {1857016800 -18000 0 EST} + {1867906800 -14400 1 EDT} + {1888466400 -18000 0 EST} + {1899356400 -14400 1 EDT} + {1919916000 -18000 0 EST} + {1930806000 -14400 1 EDT} + {1951365600 -18000 0 EST} + {1962860400 -14400 1 EDT} + {1983420000 -18000 0 EST} + {1994310000 -14400 1 EDT} + {2014869600 -18000 0 EST} + {2025759600 -14400 1 EDT} + {2046319200 -18000 0 EST} + {2057209200 -14400 1 EDT} + {2077768800 -18000 0 EST} + {2088658800 -14400 1 EDT} + {2109218400 -18000 0 EST} + {2120108400 -14400 1 EDT} + {2140668000 -18000 0 EST} + {2152162800 -14400 1 EDT} + {2172722400 -18000 0 EST} + {2183612400 -14400 1 EDT} + {2204172000 -18000 0 EST} + {2215062000 -14400 1 EDT} + {2235621600 -18000 0 EST} + {2246511600 -14400 1 EDT} + {2267071200 -18000 0 EST} + {2277961200 -14400 1 EDT} + {2298520800 -18000 0 EST} + {2309410800 -14400 1 EDT} + {2329970400 -18000 0 EST} + {2341465200 -14400 1 EDT} + {2362024800 -18000 0 EST} + {2372914800 -14400 1 EDT} + {2393474400 -18000 0 EST} + {2404364400 -14400 1 EDT} + {2424924000 -18000 0 EST} + {2435814000 -14400 1 EDT} + {2456373600 -18000 0 EST} + {2467263600 -14400 1 EDT} + {2487823200 -18000 0 EST} + {2499318000 -14400 1 EDT} + {2519877600 -18000 0 EST} + {2530767600 -14400 1 EDT} + {2551327200 -18000 0 EST} + {2562217200 -14400 1 EDT} + {2582776800 -18000 0 EST} + {2593666800 -14400 1 EDT} + {2614226400 -18000 0 EST} + {2625116400 -14400 1 EDT} + {2645676000 -18000 0 EST} + {2656566000 -14400 1 EDT} + {2677125600 -18000 0 EST} + {2688620400 -14400 1 EDT} + {2709180000 -18000 0 EST} + {2720070000 -14400 1 EDT} + {2740629600 -18000 0 EST} + {2751519600 -14400 1 EDT} + {2772079200 -18000 0 EST} + {2782969200 -14400 1 EDT} + {2803528800 -18000 0 EST} + {2814418800 -14400 1 EDT} + {2834978400 -18000 0 EST} + {2846473200 -14400 1 EDT} + {2867032800 -18000 0 EST} + {2877922800 -14400 1 EDT} + {2898482400 -18000 0 EST} + {2909372400 -14400 1 EDT} + {2929932000 -18000 0 EST} + {2940822000 -14400 1 EDT} + {2961381600 -18000 0 EST} + {2972271600 -14400 1 EDT} + {2992831200 -18000 0 EST} + {3003721200 -14400 1 EDT} + {3024280800 -18000 0 EST} + {3035775600 -14400 1 EDT} + {3056335200 -18000 0 EST} + {3067225200 -14400 1 EDT} + {3087784800 -18000 0 EST} + {3098674800 -14400 1 EDT} + {3119234400 -18000 0 EST} + {3130124400 -14400 1 EDT} + {3150684000 -18000 0 EST} + {3161574000 -14400 1 EDT} + {3182133600 -18000 0 EST} + {3193023600 -14400 1 EDT} + {3213583200 -18000 0 EST} + {3225078000 -14400 1 EDT} + {3245637600 -18000 0 EST} + {3256527600 -14400 1 EDT} + {3277087200 -18000 0 EST} + {3287977200 -14400 1 EDT} + {3308536800 -18000 0 EST} + {3319426800 -14400 1 EDT} + {3339986400 -18000 0 EST} + {3350876400 -14400 1 EDT} + {3371436000 -18000 0 EST} + {3382930800 -14400 1 EDT} + {3403490400 -18000 0 EST} + {3414380400 -14400 1 EDT} + {3434940000 -18000 0 EST} + {3445830000 -14400 1 EDT} + {3466389600 -18000 0 EST} + {3477279600 -14400 1 EDT} + {3497839200 -18000 0 EST} + {3508729200 -14400 1 EDT} + {3529288800 -18000 0 EST} + {3540178800 -14400 1 EDT} + {3560738400 -18000 0 EST} + {3572233200 -14400 1 EDT} + {3592792800 -18000 0 EST} + {3603682800 -14400 1 EDT} + {3624242400 -18000 0 EST} + {3635132400 -14400 1 EDT} + {3655692000 -18000 0 EST} + {3666582000 -14400 1 EDT} + {3687141600 -18000 0 EST} + {3698031600 -14400 1 EDT} + {3718591200 -18000 0 EST} + {3730086000 -14400 1 EDT} + {3750645600 -18000 0 EST} + {3761535600 -14400 1 EDT} + {3782095200 -18000 0 EST} + {3792985200 -14400 1 EDT} + {3813544800 -18000 0 EST} + {3824434800 -14400 1 EDT} + {3844994400 -18000 0 EST} + {3855884400 -14400 1 EDT} + {3876444000 -18000 0 EST} + {3887334000 -14400 1 EDT} + {3907893600 -18000 0 EST} + {3919388400 -14400 1 EDT} + {3939948000 -18000 0 EST} + {3950838000 -14400 1 EDT} + {3971397600 -18000 0 EST} + {3982287600 -14400 1 EDT} + {4002847200 -18000 0 EST} + {4013737200 -14400 1 EDT} + {4034296800 -18000 0 EST} + {4045186800 -14400 1 EDT} + {4065746400 -18000 0 EST} + {4076636400 -14400 1 EDT} + {4097196000 -18000 0 EST} } diff --git a/library/tzdata/America/Juneau b/library/tzdata/America/Juneau index fead810..070a27a 100644 --- a/library/tzdata/America/Juneau +++ b/library/tzdata/America/Juneau @@ -2,7 +2,7 @@ set TZData(:America/Juneau) { {-9223372036854775808 54139 0 LMT} - {-3225366139 -32261 0 LMT} + {-3225223727 -32261 0 LMT} {-2188954939 -28800 0 PST} {-883584000 -28800 0 PST} {-880207200 -25200 1 PWT} diff --git a/library/tzdata/America/Metlakatla b/library/tzdata/America/Metlakatla index 407948d..371fdcf 100644 --- a/library/tzdata/America/Metlakatla +++ b/library/tzdata/America/Metlakatla @@ -2,7 +2,7 @@ set TZData(:America/Metlakatla) { {-9223372036854775808 54822 0 LMT} - {-3225366822 -31578 0 LMT} + {-3225223727 -31578 0 LMT} {-2188955622 -28800 0 PST} {-883584000 -28800 0 PST} {-880207200 -25200 1 PWT} diff --git a/library/tzdata/America/Nome b/library/tzdata/America/Nome index c095b79..d7a9186 100644 --- a/library/tzdata/America/Nome +++ b/library/tzdata/America/Nome @@ -1,8 +1,8 @@ # created by tools/tclZIC.tcl - do not edit set TZData(:America/Nome) { - {-9223372036854775808 46701 0 LMT} - {-3225358701 -39698 0 LMT} + {-9223372036854775808 46702 0 LMT} + {-3225223727 -39698 0 LMT} {-2188947502 -39600 0 NST} {-883573200 -39600 0 NST} {-880196400 -36000 1 NWT} diff --git a/library/tzdata/America/Sitka b/library/tzdata/America/Sitka index 8c53d93..7cef02a 100644 --- a/library/tzdata/America/Sitka +++ b/library/tzdata/America/Sitka @@ -2,7 +2,7 @@ set TZData(:America/Sitka) { {-9223372036854775808 53927 0 LMT} - {-3225365927 -32473 0 LMT} + {-3225223727 -32473 0 LMT} {-2188954727 -28800 0 PST} {-883584000 -28800 0 PST} {-880207200 -25200 1 PWT} diff --git a/library/tzdata/America/Yakutat b/library/tzdata/America/Yakutat index a0420c5..b1d66ff 100644 --- a/library/tzdata/America/Yakutat +++ b/library/tzdata/America/Yakutat @@ -2,7 +2,7 @@ set TZData(:America/Yakutat) { {-9223372036854775808 52865 0 LMT} - {-3225364865 -33535 0 LMT} + {-3225223727 -33535 0 LMT} {-2188953665 -32400 0 YST} {-883580400 -32400 0 YST} {-880203600 -28800 1 YWT} diff --git a/library/tzdata/Asia/Famagusta b/library/tzdata/Asia/Famagusta index 384c183..55eade6 100644 --- a/library/tzdata/Asia/Famagusta +++ b/library/tzdata/Asia/Famagusta @@ -88,4 +88,169 @@ set TZData(:Asia/Famagusta) { {1445734800 7200 0 EET} {1459040400 10800 1 EEST} {1473285600 10800 0 +03} + {1509238800 7200 0 EET} + {1521939600 10800 1 EEST} + {1540688400 7200 0 EET} + {1553994000 10800 1 EEST} + {1572138000 7200 0 EET} + {1585443600 10800 1 EEST} + {1603587600 7200 0 EET} + {1616893200 10800 1 EEST} + {1635642000 7200 0 EET} + {1648342800 10800 1 EEST} + {1667091600 7200 0 EET} + {1679792400 10800 1 EEST} + {1698541200 7200 0 EET} + {1711846800 10800 1 EEST} + {1729990800 7200 0 EET} + {1743296400 10800 1 EEST} + {1761440400 7200 0 EET} + {1774746000 10800 1 EEST} + {1792890000 7200 0 EET} + {1806195600 10800 1 EEST} + {1824944400 7200 0 EET} + {1837645200 10800 1 EEST} + {1856394000 7200 0 EET} + {1869094800 10800 1 EEST} + {1887843600 7200 0 EET} + {1901149200 10800 1 EEST} + {1919293200 7200 0 EET} + {1932598800 10800 1 EEST} + {1950742800 7200 0 EET} + {1964048400 10800 1 EEST} + {1982797200 7200 0 EET} + {1995498000 10800 1 EEST} + {2014246800 7200 0 EET} + {2026947600 10800 1 EEST} + {2045696400 7200 0 EET} + {2058397200 10800 1 EEST} + {2077146000 7200 0 EET} + {2090451600 10800 1 EEST} + {2108595600 7200 0 EET} + {2121901200 10800 1 EEST} + {2140045200 7200 0 EET} + {2153350800 10800 1 EEST} + {2172099600 7200 0 EET} + {2184800400 10800 1 EEST} + {2203549200 7200 0 EET} + {2216250000 10800 1 EEST} + {2234998800 7200 0 EET} + {2248304400 10800 1 EEST} + {2266448400 7200 0 EET} + {2279754000 10800 1 EEST} + {2297898000 7200 0 EET} + {2311203600 10800 1 EEST} + {2329347600 7200 0 EET} + {2342653200 10800 1 EEST} + {2361402000 7200 0 EET} + {2374102800 10800 1 EEST} + {2392851600 7200 0 EET} + {2405552400 10800 1 EEST} + {2424301200 7200 0 EET} + {2437606800 10800 1 EEST} + {2455750800 7200 0 EET} + {2469056400 10800 1 EEST} + {2487200400 7200 0 EET} + {2500506000 10800 1 EEST} + {2519254800 7200 0 EET} + {2531955600 10800 1 EEST} + {2550704400 7200 0 EET} + {2563405200 10800 1 EEST} + {2582154000 7200 0 EET} + {2595459600 10800 1 EEST} + {2613603600 7200 0 EET} + {2626909200 10800 1 EEST} + {2645053200 7200 0 EET} + {2658358800 10800 1 EEST} + {2676502800 7200 0 EET} + {2689808400 10800 1 EEST} + {2708557200 7200 0 EET} + {2721258000 10800 1 EEST} + {2740006800 7200 0 EET} + {2752707600 10800 1 EEST} + {2771456400 7200 0 EET} + {2784762000 10800 1 EEST} + {2802906000 7200 0 EET} + {2816211600 10800 1 EEST} + {2834355600 7200 0 EET} + {2847661200 10800 1 EEST} + {2866410000 7200 0 EET} + {2879110800 10800 1 EEST} + {2897859600 7200 0 EET} + {2910560400 10800 1 EEST} + {2929309200 7200 0 EET} + {2942010000 10800 1 EEST} + {2960758800 7200 0 EET} + {2974064400 10800 1 EEST} + {2992208400 7200 0 EET} + {3005514000 10800 1 EEST} + {3023658000 7200 0 EET} + {3036963600 10800 1 EEST} + {3055712400 7200 0 EET} + {3068413200 10800 1 EEST} + {3087162000 7200 0 EET} + {3099862800 10800 1 EEST} + {3118611600 7200 0 EET} + {3131917200 10800 1 EEST} + {3150061200 7200 0 EET} + {3163366800 10800 1 EEST} + {3181510800 7200 0 EET} + {3194816400 10800 1 EEST} + {3212960400 7200 0 EET} + {3226266000 10800 1 EEST} + {3245014800 7200 0 EET} + {3257715600 10800 1 EEST} + {3276464400 7200 0 EET} + {3289165200 10800 1 EEST} + {3307914000 7200 0 EET} + {3321219600 10800 1 EEST} + {3339363600 7200 0 EET} + {3352669200 10800 1 EEST} + {3370813200 7200 0 EET} + {3384118800 10800 1 EEST} + {3402867600 7200 0 EET} + {3415568400 10800 1 EEST} + {3434317200 7200 0 EET} + {3447018000 10800 1 EEST} + {3465766800 7200 0 EET} + {3479072400 10800 1 EEST} + {3497216400 7200 0 EET} + {3510522000 10800 1 EEST} + {3528666000 7200 0 EET} + {3541971600 10800 1 EEST} + {3560115600 7200 0 EET} + {3573421200 10800 1 EEST} + {3592170000 7200 0 EET} + {3604870800 10800 1 EEST} + {3623619600 7200 0 EET} + {3636320400 10800 1 EEST} + {3655069200 7200 0 EET} + {3668374800 10800 1 EEST} + {3686518800 7200 0 EET} + {3699824400 10800 1 EEST} + {3717968400 7200 0 EET} + {3731274000 10800 1 EEST} + {3750022800 7200 0 EET} + {3762723600 10800 1 EEST} + {3781472400 7200 0 EET} + {3794173200 10800 1 EEST} + {3812922000 7200 0 EET} + {3825622800 10800 1 EEST} + {3844371600 7200 0 EET} + {3857677200 10800 1 EEST} + {3875821200 7200 0 EET} + {3889126800 10800 1 EEST} + {3907270800 7200 0 EET} + {3920576400 10800 1 EEST} + {3939325200 7200 0 EET} + {3952026000 10800 1 EEST} + {3970774800 7200 0 EET} + {3983475600 10800 1 EEST} + {4002224400 7200 0 EET} + {4015530000 10800 1 EEST} + {4033674000 7200 0 EET} + {4046979600 10800 1 EEST} + {4065123600 7200 0 EET} + {4078429200 10800 1 EEST} + {4096573200 7200 0 EET} } diff --git a/library/tzdata/Asia/Kolkata b/library/tzdata/Asia/Kolkata index 6b3b9fb..b78f8cd 100644 --- a/library/tzdata/Asia/Kolkata +++ b/library/tzdata/Asia/Kolkata @@ -2,8 +2,10 @@ set TZData(:Asia/Kolkata) { {-9223372036854775808 21208 0 LMT} - {-2840162008 21200 0 HMT} - {-891582800 23400 0 +0630} + {-3645237208 21200 0 HMT} + {-3155694800 19270 0 MMT} + {-2019705670 19800 0 IST} + {-891581400 23400 1 +0630} {-872058600 19800 0 IST} {-862637400 23400 1 +0630} {-764145000 19800 0 IST} diff --git a/library/tzdata/Asia/Yangon b/library/tzdata/Asia/Yangon index 8e17d82..82870c6 100644 --- a/library/tzdata/Asia/Yangon +++ b/library/tzdata/Asia/Yangon @@ -1,9 +1,9 @@ # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Yangon) { - {-9223372036854775808 23080 0 LMT} - {-2840163880 23080 0 RMT} - {-1577946280 23400 0 +0630} + {-9223372036854775808 23087 0 LMT} + {-2840163887 23087 0 RMT} + {-1577946287 23400 0 +0630} {-873268200 32400 0 +09} {-778410000 23400 0 +0630} } diff --git a/library/tzdata/Asia/Yerevan b/library/tzdata/Asia/Yerevan index 0ffb69e..25a349a 100644 --- a/library/tzdata/Asia/Yerevan +++ b/library/tzdata/Asia/Yerevan @@ -64,6 +64,7 @@ set TZData(:Asia/Yerevan) { {1256421600 14400 0 +04} {1269727200 18000 1 +05} {1288476000 14400 0 +04} + {1293825600 14400 0 +04} {1301176800 18000 1 +05} {1319925600 14400 0 +04} } diff --git a/library/tzdata/Europe/Dublin b/library/tzdata/Europe/Dublin index 4b43bc0..c3a5c0e 100644 --- a/library/tzdata/Europe/Dublin +++ b/library/tzdata/Europe/Dublin @@ -52,10 +52,10 @@ set TZData(:Europe/Dublin) { {-986162400 0 0 IST} {-969228000 3600 1 IST} {-950479200 0 0 IST} - {-942015600 3600 1 IST} - {-733359600 0 0 GMT} + {-942012000 3600 1 IST} + {-733356000 0 0 GMT} {-719445600 3600 1 IST} - {-699490800 0 0 GMT} + {-699487200 0 0 GMT} {-684972000 3600 0 IST} {-668037600 0 0 IST} {-654732000 3600 1 IST} diff --git a/library/tzdata/Pacific/Apia b/library/tzdata/Pacific/Apia index feef374..4c0d84a 100644 --- a/library/tzdata/Pacific/Apia +++ b/library/tzdata/Pacific/Apia @@ -2,7 +2,7 @@ set TZData(:Pacific/Apia) { {-9223372036854775808 45184 0 LMT} - {-2855737984 -41216 0 LMT} + {-2445424384 -41216 0 LMT} {-1861878784 -41400 0 -1130} {-631110600 -39600 0 -10} {1285498800 -36000 1 -10} diff --git a/library/tzdata/Pacific/Fiji b/library/tzdata/Pacific/Fiji index fa8c99e..f9d393c 100644 --- a/library/tzdata/Pacific/Fiji +++ b/library/tzdata/Pacific/Fiji @@ -24,7 +24,7 @@ set TZData(:Pacific/Fiji) { {1478354400 46800 1 +13} {1484402400 43200 0 +12} {1509804000 46800 1 +13} - {1516456800 43200 0 +12} + {1515852000 43200 0 +12} {1541253600 46800 1 +13} {1547906400 43200 0 +12} {1572703200 46800 1 +13} @@ -36,7 +36,7 @@ set TZData(:Pacific/Fiji) { {1667656800 46800 1 +13} {1673704800 43200 0 +12} {1699106400 46800 1 +13} - {1705759200 43200 0 +12} + {1705154400 43200 0 +12} {1730556000 46800 1 +13} {1737208800 43200 0 +12} {1762005600 46800 1 +13} @@ -46,7 +46,7 @@ set TZData(:Pacific/Fiji) { {1825509600 46800 1 +13} {1831557600 43200 0 +12} {1856959200 46800 1 +13} - {1863612000 43200 0 +12} + {1863007200 43200 0 +12} {1888408800 46800 1 +13} {1895061600 43200 0 +12} {1919858400 46800 1 +13} @@ -58,7 +58,7 @@ set TZData(:Pacific/Fiji) { {2014812000 46800 1 +13} {2020860000 43200 0 +12} {2046261600 46800 1 +13} - {2052914400 43200 0 +12} + {2052309600 43200 0 +12} {2077711200 46800 1 +13} {2084364000 43200 0 +12} {2109160800 46800 1 +13} @@ -80,7 +80,7 @@ set TZData(:Pacific/Fiji) { {2361967200 46800 1 +13} {2368015200 43200 0 +12} {2393416800 46800 1 +13} - {2400069600 43200 0 +12} + {2399464800 43200 0 +12} {2424866400 46800 1 +13} {2431519200 43200 0 +12} {2456316000 46800 1 +13} @@ -92,7 +92,7 @@ set TZData(:Pacific/Fiji) { {2551269600 46800 1 +13} {2557317600 43200 0 +12} {2582719200 46800 1 +13} - {2589372000 43200 0 +12} + {2588767200 43200 0 +12} {2614168800 46800 1 +13} {2620821600 43200 0 +12} {2645618400 46800 1 +13} @@ -102,7 +102,7 @@ set TZData(:Pacific/Fiji) { {2709122400 46800 1 +13} {2715170400 43200 0 +12} {2740572000 46800 1 +13} - {2747224800 43200 0 +12} + {2746620000 43200 0 +12} {2772021600 46800 1 +13} {2778674400 43200 0 +12} {2803471200 46800 1 +13} @@ -114,7 +114,7 @@ set TZData(:Pacific/Fiji) { {2898424800 46800 1 +13} {2904472800 43200 0 +12} {2929874400 46800 1 +13} - {2936527200 43200 0 +12} + {2935922400 43200 0 +12} {2961324000 46800 1 +13} {2967976800 43200 0 +12} {2992773600 46800 1 +13} @@ -136,7 +136,7 @@ set TZData(:Pacific/Fiji) { {3245580000 46800 1 +13} {3251628000 43200 0 +12} {3277029600 46800 1 +13} - {3283682400 43200 0 +12} + {3283077600 43200 0 +12} {3308479200 46800 1 +13} {3315132000 43200 0 +12} {3339928800 46800 1 +13} @@ -148,7 +148,7 @@ set TZData(:Pacific/Fiji) { {3434882400 46800 1 +13} {3440930400 43200 0 +12} {3466332000 46800 1 +13} - {3472984800 43200 0 +12} + {3472380000 43200 0 +12} {3497781600 46800 1 +13} {3504434400 43200 0 +12} {3529231200 46800 1 +13} @@ -158,7 +158,7 @@ set TZData(:Pacific/Fiji) { {3592735200 46800 1 +13} {3598783200 43200 0 +12} {3624184800 46800 1 +13} - {3630837600 43200 0 +12} + {3630232800 43200 0 +12} {3655634400 46800 1 +13} {3662287200 43200 0 +12} {3687084000 46800 1 +13} @@ -170,7 +170,7 @@ set TZData(:Pacific/Fiji) { {3782037600 46800 1 +13} {3788085600 43200 0 +12} {3813487200 46800 1 +13} - {3820140000 43200 0 +12} + {3819535200 43200 0 +12} {3844936800 46800 1 +13} {3851589600 43200 0 +12} {3876386400 46800 1 +13} diff --git a/library/tzdata/Pacific/Pago_Pago b/library/tzdata/Pacific/Pago_Pago index d30c981..9b5607f 100644 --- a/library/tzdata/Pacific/Pago_Pago +++ b/library/tzdata/Pacific/Pago_Pago @@ -2,6 +2,6 @@ set TZData(:Pacific/Pago_Pago) { {-9223372036854775808 45432 0 LMT} - {-2855738232 -40968 0 LMT} + {-2445424632 -40968 0 LMT} {-1861879032 -39600 0 SST} } diff --git a/library/tzdata/Pacific/Tongatapu b/library/tzdata/Pacific/Tongatapu index 731b4f6..3cfaaaa 100644 --- a/library/tzdata/Pacific/Tongatapu +++ b/library/tzdata/Pacific/Tongatapu @@ -13,169 +13,4 @@ set TZData(:Pacific/Tongatapu) { {1012046400 46800 0 +13} {1478350800 50400 1 +14} {1484398800 46800 0 +13} - {1509800400 50400 1 +14} - {1516453200 46800 0 +13} - {1541250000 50400 1 +14} - {1547902800 46800 0 +13} - {1572699600 50400 1 +14} - {1579352400 46800 0 +13} - {1604149200 50400 1 +14} - {1610802000 46800 0 +13} - {1636203600 50400 1 +14} - {1642251600 46800 0 +13} - {1667653200 50400 1 +14} - {1673701200 46800 0 +13} - {1699102800 50400 1 +14} - {1705755600 46800 0 +13} - {1730552400 50400 1 +14} - {1737205200 46800 0 +13} - {1762002000 50400 1 +14} - {1768654800 46800 0 +13} - {1793451600 50400 1 +14} - {1800104400 46800 0 +13} - {1825506000 50400 1 +14} - {1831554000 46800 0 +13} - {1856955600 50400 1 +14} - {1863608400 46800 0 +13} - {1888405200 50400 1 +14} - {1895058000 46800 0 +13} - {1919854800 50400 1 +14} - {1926507600 46800 0 +13} - {1951304400 50400 1 +14} - {1957957200 46800 0 +13} - {1983358800 50400 1 +14} - {1989406800 46800 0 +13} - {2014808400 50400 1 +14} - {2020856400 46800 0 +13} - {2046258000 50400 1 +14} - {2052910800 46800 0 +13} - {2077707600 50400 1 +14} - {2084360400 46800 0 +13} - {2109157200 50400 1 +14} - {2115810000 46800 0 +13} - {2140606800 50400 1 +14} - {2147259600 46800 0 +13} - {2172661200 50400 1 +14} - {2178709200 46800 0 +13} - {2204110800 50400 1 +14} - {2210158800 46800 0 +13} - {2235560400 50400 1 +14} - {2242213200 46800 0 +13} - {2267010000 50400 1 +14} - {2273662800 46800 0 +13} - {2298459600 50400 1 +14} - {2305112400 46800 0 +13} - {2329909200 50400 1 +14} - {2336562000 46800 0 +13} - {2361963600 50400 1 +14} - {2368011600 46800 0 +13} - {2393413200 50400 1 +14} - {2400066000 46800 0 +13} - {2424862800 50400 1 +14} - {2431515600 46800 0 +13} - {2456312400 50400 1 +14} - {2462965200 46800 0 +13} - {2487762000 50400 1 +14} - {2494414800 46800 0 +13} - {2519816400 50400 1 +14} - {2525864400 46800 0 +13} - {2551266000 50400 1 +14} - {2557314000 46800 0 +13} - {2582715600 50400 1 +14} - {2589368400 46800 0 +13} - {2614165200 50400 1 +14} - {2620818000 46800 0 +13} - {2645614800 50400 1 +14} - {2652267600 46800 0 +13} - {2677064400 50400 1 +14} - {2683717200 46800 0 +13} - {2709118800 50400 1 +14} - {2715166800 46800 0 +13} - {2740568400 50400 1 +14} - {2747221200 46800 0 +13} - {2772018000 50400 1 +14} - {2778670800 46800 0 +13} - {2803467600 50400 1 +14} - {2810120400 46800 0 +13} - {2834917200 50400 1 +14} - {2841570000 46800 0 +13} - {2866971600 50400 1 +14} - {2873019600 46800 0 +13} - {2898421200 50400 1 +14} - {2904469200 46800 0 +13} - {2929870800 50400 1 +14} - {2936523600 46800 0 +13} - {2961320400 50400 1 +14} - {2967973200 46800 0 +13} - {2992770000 50400 1 +14} - {2999422800 46800 0 +13} - {3024219600 50400 1 +14} - {3030872400 46800 0 +13} - {3056274000 50400 1 +14} - {3062322000 46800 0 +13} - {3087723600 50400 1 +14} - {3093771600 46800 0 +13} - {3119173200 50400 1 +14} - {3125826000 46800 0 +13} - {3150622800 50400 1 +14} - {3157275600 46800 0 +13} - {3182072400 50400 1 +14} - {3188725200 46800 0 +13} - {3213522000 50400 1 +14} - {3220174800 46800 0 +13} - {3245576400 50400 1 +14} - {3251624400 46800 0 +13} - {3277026000 50400 1 +14} - {3283678800 46800 0 +13} - {3308475600 50400 1 +14} - {3315128400 46800 0 +13} - {3339925200 50400 1 +14} - {3346578000 46800 0 +13} - {3371374800 50400 1 +14} - {3378027600 46800 0 +13} - {3403429200 50400 1 +14} - {3409477200 46800 0 +13} - {3434878800 50400 1 +14} - {3440926800 46800 0 +13} - {3466328400 50400 1 +14} - {3472981200 46800 0 +13} - {3497778000 50400 1 +14} - {3504430800 46800 0 +13} - {3529227600 50400 1 +14} - {3535880400 46800 0 +13} - {3560677200 50400 1 +14} - {3567330000 46800 0 +13} - {3592731600 50400 1 +14} - {3598779600 46800 0 +13} - {3624181200 50400 1 +14} - {3630834000 46800 0 +13} - {3655630800 50400 1 +14} - {3662283600 46800 0 +13} - {3687080400 50400 1 +14} - {3693733200 46800 0 +13} - {3718530000 50400 1 +14} - {3725182800 46800 0 +13} - {3750584400 50400 1 +14} - {3756632400 46800 0 +13} - {3782034000 50400 1 +14} - {3788082000 46800 0 +13} - {3813483600 50400 1 +14} - {3820136400 46800 0 +13} - {3844933200 50400 1 +14} - {3851586000 46800 0 +13} - {3876382800 50400 1 +14} - {3883035600 46800 0 +13} - {3907832400 50400 1 +14} - {3914485200 46800 0 +13} - {3939886800 50400 1 +14} - {3945934800 46800 0 +13} - {3971336400 50400 1 +14} - {3977384400 46800 0 +13} - {4002786000 50400 1 +14} - {4009438800 46800 0 +13} - {4034235600 50400 1 +14} - {4040888400 46800 0 +13} - {4065685200 50400 1 +14} - {4072338000 46800 0 +13} - {4097134800 50400 1 +14} } -- cgit v0.12 From 2332ac45caa86287fe27e939ac352499c10462fe Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 24 Oct 2017 13:18:51 +0000 Subject: Update to tzdata2017c --- library/tzdata/Africa/Juba | 40 ++++++++- library/tzdata/Africa/Khartoum | 1 + library/tzdata/Africa/Windhoek | 169 +------------------------------------- library/tzdata/America/Adak | 4 +- library/tzdata/America/Anchorage | 2 +- library/tzdata/America/Detroit | 2 - library/tzdata/America/Grand_Turk | 164 ++++++++++++++++++++++++++++++++++++ library/tzdata/America/Juneau | 2 +- library/tzdata/America/Metlakatla | 2 +- library/tzdata/America/Nome | 4 +- library/tzdata/America/Sitka | 2 +- library/tzdata/America/Yakutat | 2 +- library/tzdata/Asia/Famagusta | 165 +++++++++++++++++++++++++++++++++++++ library/tzdata/Asia/Kolkata | 6 +- library/tzdata/Asia/Yangon | 6 +- library/tzdata/Asia/Yerevan | 1 + library/tzdata/Europe/Dublin | 6 +- library/tzdata/Pacific/Apia | 2 +- library/tzdata/Pacific/Fiji | 24 +++--- library/tzdata/Pacific/Pago_Pago | 2 +- library/tzdata/Pacific/Tongatapu | 165 ------------------------------------- 21 files changed, 404 insertions(+), 367 deletions(-) diff --git a/library/tzdata/Africa/Juba b/library/tzdata/Africa/Juba index 40551f2..a0dbf5e 100644 --- a/library/tzdata/Africa/Juba +++ b/library/tzdata/Africa/Juba @@ -1,5 +1,39 @@ # created by tools/tclZIC.tcl - do not edit -if {![info exists TZData(Africa/Khartoum)]} { - LoadTimeZoneFile Africa/Khartoum + +set TZData(:Africa/Juba) { + {-9223372036854775808 7588 0 LMT} + {-1230775588 7200 0 CAT} + {10360800 10800 1 CAST} + {24786000 7200 0 CAT} + {41810400 10800 1 CAST} + {56322000 7200 0 CAT} + {73432800 10800 1 CAST} + {87944400 7200 0 CAT} + {104882400 10800 1 CAST} + {119480400 7200 0 CAT} + {136332000 10800 1 CAST} + {151016400 7200 0 CAT} + {167781600 10800 1 CAST} + {182552400 7200 0 CAT} + {199231200 10800 1 CAST} + {214174800 7200 0 CAT} + {230680800 10800 1 CAST} + {245710800 7200 0 CAT} + {262735200 10800 1 CAST} + {277246800 7200 0 CAT} + {294184800 10800 1 CAST} + {308782800 7200 0 CAT} + {325634400 10800 1 CAST} + {340405200 7200 0 CAT} + {357084000 10800 1 CAST} + {371941200 7200 0 CAT} + {388533600 10800 1 CAST} + {403477200 7200 0 CAT} + {419983200 10800 1 CAST} + {435013200 7200 0 CAT} + {452037600 10800 1 CAST} + {466635600 7200 0 CAT} + {483487200 10800 1 CAST} + {498171600 7200 0 CAT} + {947930400 10800 0 EAT} } -set TZData(:Africa/Juba) $TZData(:Africa/Khartoum) diff --git a/library/tzdata/Africa/Khartoum b/library/tzdata/Africa/Khartoum index dfcac82..dc441f6 100644 --- a/library/tzdata/Africa/Khartoum +++ b/library/tzdata/Africa/Khartoum @@ -36,4 +36,5 @@ set TZData(:Africa/Khartoum) { {483487200 10800 1 CAST} {498171600 7200 0 CAT} {947930400 10800 0 EAT} + {1509483600 7200 0 CAT} } diff --git a/library/tzdata/Africa/Windhoek b/library/tzdata/Africa/Windhoek index 1b8f86a..974ebda 100644 --- a/library/tzdata/Africa/Windhoek +++ b/library/tzdata/Africa/Windhoek @@ -7,7 +7,8 @@ set TZData(:Africa/Windhoek) { {-860976000 10800 1 SAST} {-845254800 7200 0 SAST} {637970400 7200 0 CAT} - {765324000 3600 0 WAT} + {764200800 3600 0 WAT} + {764204400 3600 0 WAT} {778640400 7200 1 WAST} {796780800 3600 0 WAT} {810090000 7200 1 WAST} @@ -54,169 +55,5 @@ set TZData(:Africa/Windhoek) { {1459641600 3600 0 WAT} {1472950800 7200 1 WAST} {1491091200 3600 0 WAT} - {1504400400 7200 1 WAST} - {1522540800 3600 0 WAT} - {1535850000 7200 1 WAST} - {1554595200 3600 0 WAT} - {1567299600 7200 1 WAST} - {1586044800 3600 0 WAT} - {1599354000 7200 1 WAST} - {1617494400 3600 0 WAT} - {1630803600 7200 1 WAST} - {1648944000 3600 0 WAT} - {1662253200 7200 1 WAST} - {1680393600 3600 0 WAT} - {1693702800 7200 1 WAST} - {1712448000 3600 0 WAT} - {1725152400 7200 1 WAST} - {1743897600 3600 0 WAT} - {1757206800 7200 1 WAST} - {1775347200 3600 0 WAT} - {1788656400 7200 1 WAST} - {1806796800 3600 0 WAT} - {1820106000 7200 1 WAST} - {1838246400 3600 0 WAT} - {1851555600 7200 1 WAST} - {1869696000 3600 0 WAT} - {1883005200 7200 1 WAST} - {1901750400 3600 0 WAT} - {1914454800 7200 1 WAST} - {1933200000 3600 0 WAT} - {1946509200 7200 1 WAST} - {1964649600 3600 0 WAT} - {1977958800 7200 1 WAST} - {1996099200 3600 0 WAT} - {2009408400 7200 1 WAST} - {2027548800 3600 0 WAT} - {2040858000 7200 1 WAST} - {2058998400 3600 0 WAT} - {2072307600 7200 1 WAST} - {2091052800 3600 0 WAT} - {2104362000 7200 1 WAST} - {2122502400 3600 0 WAT} - {2135811600 7200 1 WAST} - {2153952000 3600 0 WAT} - {2167261200 7200 1 WAST} - {2185401600 3600 0 WAT} - {2198710800 7200 1 WAST} - {2216851200 3600 0 WAT} - {2230160400 7200 1 WAST} - {2248905600 3600 0 WAT} - {2261610000 7200 1 WAST} - {2280355200 3600 0 WAT} - {2293664400 7200 1 WAST} - {2311804800 3600 0 WAT} - {2325114000 7200 1 WAST} - {2343254400 3600 0 WAT} - {2356563600 7200 1 WAST} - {2374704000 3600 0 WAT} - {2388013200 7200 1 WAST} - {2406153600 3600 0 WAT} - {2419462800 7200 1 WAST} - {2438208000 3600 0 WAT} - {2450912400 7200 1 WAST} - {2469657600 3600 0 WAT} - {2482966800 7200 1 WAST} - {2501107200 3600 0 WAT} - {2514416400 7200 1 WAST} - {2532556800 3600 0 WAT} - {2545866000 7200 1 WAST} - {2564006400 3600 0 WAT} - {2577315600 7200 1 WAST} - {2596060800 3600 0 WAT} - {2608765200 7200 1 WAST} - {2627510400 3600 0 WAT} - {2640819600 7200 1 WAST} - {2658960000 3600 0 WAT} - {2672269200 7200 1 WAST} - {2690409600 3600 0 WAT} - {2703718800 7200 1 WAST} - {2721859200 3600 0 WAT} - {2735168400 7200 1 WAST} - {2753308800 3600 0 WAT} - {2766618000 7200 1 WAST} - {2785363200 3600 0 WAT} - {2798067600 7200 1 WAST} - {2816812800 3600 0 WAT} - {2830122000 7200 1 WAST} - {2848262400 3600 0 WAT} - {2861571600 7200 1 WAST} - {2879712000 3600 0 WAT} - {2893021200 7200 1 WAST} - {2911161600 3600 0 WAT} - {2924470800 7200 1 WAST} - {2942611200 3600 0 WAT} - {2955920400 7200 1 WAST} - {2974665600 3600 0 WAT} - {2987974800 7200 1 WAST} - {3006115200 3600 0 WAT} - {3019424400 7200 1 WAST} - {3037564800 3600 0 WAT} - {3050874000 7200 1 WAST} - {3069014400 3600 0 WAT} - {3082323600 7200 1 WAST} - {3100464000 3600 0 WAT} - {3113773200 7200 1 WAST} - {3132518400 3600 0 WAT} - {3145222800 7200 1 WAST} - {3163968000 3600 0 WAT} - {3177277200 7200 1 WAST} - {3195417600 3600 0 WAT} - {3208726800 7200 1 WAST} - {3226867200 3600 0 WAT} - {3240176400 7200 1 WAST} - {3258316800 3600 0 WAT} - {3271626000 7200 1 WAST} - {3289766400 3600 0 WAT} - {3303075600 7200 1 WAST} - {3321820800 3600 0 WAT} - {3334525200 7200 1 WAST} - {3353270400 3600 0 WAT} - {3366579600 7200 1 WAST} - {3384720000 3600 0 WAT} - {3398029200 7200 1 WAST} - {3416169600 3600 0 WAT} - {3429478800 7200 1 WAST} - {3447619200 3600 0 WAT} - {3460928400 7200 1 WAST} - {3479673600 3600 0 WAT} - {3492378000 7200 1 WAST} - {3511123200 3600 0 WAT} - {3524432400 7200 1 WAST} - {3542572800 3600 0 WAT} - {3555882000 7200 1 WAST} - {3574022400 3600 0 WAT} - {3587331600 7200 1 WAST} - {3605472000 3600 0 WAT} - {3618781200 7200 1 WAST} - {3636921600 3600 0 WAT} - {3650230800 7200 1 WAST} - {3668976000 3600 0 WAT} - {3681680400 7200 1 WAST} - {3700425600 3600 0 WAT} - {3713734800 7200 1 WAST} - {3731875200 3600 0 WAT} - {3745184400 7200 1 WAST} - {3763324800 3600 0 WAT} - {3776634000 7200 1 WAST} - {3794774400 3600 0 WAT} - {3808083600 7200 1 WAST} - {3826224000 3600 0 WAT} - {3839533200 7200 1 WAST} - {3858278400 3600 0 WAT} - {3871587600 7200 1 WAST} - {3889728000 3600 0 WAT} - {3903037200 7200 1 WAST} - {3921177600 3600 0 WAT} - {3934486800 7200 1 WAST} - {3952627200 3600 0 WAT} - {3965936400 7200 1 WAST} - {3984076800 3600 0 WAT} - {3997386000 7200 1 WAST} - {4016131200 3600 0 WAT} - {4028835600 7200 1 WAST} - {4047580800 3600 0 WAT} - {4060890000 7200 1 WAST} - {4079030400 3600 0 WAT} - {4092339600 7200 1 WAST} + {1504400400 7200 0 CAT} } diff --git a/library/tzdata/America/Adak b/library/tzdata/America/Adak index bd5d5ab..04c4628 100644 --- a/library/tzdata/America/Adak +++ b/library/tzdata/America/Adak @@ -1,8 +1,8 @@ # created by tools/tclZIC.tcl - do not edit set TZData(:America/Adak) { - {-9223372036854775808 44001 0 LMT} - {-3225356001 -42398 0 LMT} + {-9223372036854775808 44002 0 LMT} + {-3225223727 -42398 0 LMT} {-2188944802 -39600 0 NST} {-883573200 -39600 0 NST} {-880196400 -36000 1 NWT} diff --git a/library/tzdata/America/Anchorage b/library/tzdata/America/Anchorage index 127d365..c0ff8de 100644 --- a/library/tzdata/America/Anchorage +++ b/library/tzdata/America/Anchorage @@ -2,7 +2,7 @@ set TZData(:America/Anchorage) { {-9223372036854775808 50424 0 LMT} - {-3225362424 -35976 0 LMT} + {-3225223727 -35976 0 LMT} {-2188951224 -36000 0 AST} {-883576800 -36000 0 AST} {-880200000 -32400 1 AWT} diff --git a/library/tzdata/America/Detroit b/library/tzdata/America/Detroit index 696a663..f725874 100644 --- a/library/tzdata/America/Detroit +++ b/library/tzdata/America/Detroit @@ -11,8 +11,6 @@ set TZData(:America/Detroit) { {-757364400 -18000 0 EST} {-684349200 -14400 1 EDT} {-671047200 -18000 0 EST} - {-80499600 -14400 1 EDT} - {-68666400 -18000 0 EST} {94712400 -18000 0 EST} {104914800 -14400 1 EDT} {120636000 -18000 0 EST} diff --git a/library/tzdata/America/Grand_Turk b/library/tzdata/America/Grand_Turk index 0edcf0b..c963adc 100644 --- a/library/tzdata/America/Grand_Turk +++ b/library/tzdata/America/Grand_Turk @@ -79,4 +79,168 @@ set TZData(:America/Grand_Turk) { {1414908000 -18000 0 EST} {1425798000 -14400 1 EDT} {1446361200 -14400 0 AST} + {1520751600 -14400 0 EDT} + {1541311200 -18000 0 EST} + {1552201200 -14400 1 EDT} + {1572760800 -18000 0 EST} + {1583650800 -14400 1 EDT} + {1604210400 -18000 0 EST} + {1615705200 -14400 1 EDT} + {1636264800 -18000 0 EST} + {1647154800 -14400 1 EDT} + {1667714400 -18000 0 EST} + {1678604400 -14400 1 EDT} + {1699164000 -18000 0 EST} + {1710054000 -14400 1 EDT} + {1730613600 -18000 0 EST} + {1741503600 -14400 1 EDT} + {1762063200 -18000 0 EST} + {1772953200 -14400 1 EDT} + {1793512800 -18000 0 EST} + {1805007600 -14400 1 EDT} + {1825567200 -18000 0 EST} + {1836457200 -14400 1 EDT} + {1857016800 -18000 0 EST} + {1867906800 -14400 1 EDT} + {1888466400 -18000 0 EST} + {1899356400 -14400 1 EDT} + {1919916000 -18000 0 EST} + {1930806000 -14400 1 EDT} + {1951365600 -18000 0 EST} + {1962860400 -14400 1 EDT} + {1983420000 -18000 0 EST} + {1994310000 -14400 1 EDT} + {2014869600 -18000 0 EST} + {2025759600 -14400 1 EDT} + {2046319200 -18000 0 EST} + {2057209200 -14400 1 EDT} + {2077768800 -18000 0 EST} + {2088658800 -14400 1 EDT} + {2109218400 -18000 0 EST} + {2120108400 -14400 1 EDT} + {2140668000 -18000 0 EST} + {2152162800 -14400 1 EDT} + {2172722400 -18000 0 EST} + {2183612400 -14400 1 EDT} + {2204172000 -18000 0 EST} + {2215062000 -14400 1 EDT} + {2235621600 -18000 0 EST} + {2246511600 -14400 1 EDT} + {2267071200 -18000 0 EST} + {2277961200 -14400 1 EDT} + {2298520800 -18000 0 EST} + {2309410800 -14400 1 EDT} + {2329970400 -18000 0 EST} + {2341465200 -14400 1 EDT} + {2362024800 -18000 0 EST} + {2372914800 -14400 1 EDT} + {2393474400 -18000 0 EST} + {2404364400 -14400 1 EDT} + {2424924000 -18000 0 EST} + {2435814000 -14400 1 EDT} + {2456373600 -18000 0 EST} + {2467263600 -14400 1 EDT} + {2487823200 -18000 0 EST} + {2499318000 -14400 1 EDT} + {2519877600 -18000 0 EST} + {2530767600 -14400 1 EDT} + {2551327200 -18000 0 EST} + {2562217200 -14400 1 EDT} + {2582776800 -18000 0 EST} + {2593666800 -14400 1 EDT} + {2614226400 -18000 0 EST} + {2625116400 -14400 1 EDT} + {2645676000 -18000 0 EST} + {2656566000 -14400 1 EDT} + {2677125600 -18000 0 EST} + {2688620400 -14400 1 EDT} + {2709180000 -18000 0 EST} + {2720070000 -14400 1 EDT} + {2740629600 -18000 0 EST} + {2751519600 -14400 1 EDT} + {2772079200 -18000 0 EST} + {2782969200 -14400 1 EDT} + {2803528800 -18000 0 EST} + {2814418800 -14400 1 EDT} + {2834978400 -18000 0 EST} + {2846473200 -14400 1 EDT} + {2867032800 -18000 0 EST} + {2877922800 -14400 1 EDT} + {2898482400 -18000 0 EST} + {2909372400 -14400 1 EDT} + {2929932000 -18000 0 EST} + {2940822000 -14400 1 EDT} + {2961381600 -18000 0 EST} + {2972271600 -14400 1 EDT} + {2992831200 -18000 0 EST} + {3003721200 -14400 1 EDT} + {3024280800 -18000 0 EST} + {3035775600 -14400 1 EDT} + {3056335200 -18000 0 EST} + {3067225200 -14400 1 EDT} + {3087784800 -18000 0 EST} + {3098674800 -14400 1 EDT} + {3119234400 -18000 0 EST} + {3130124400 -14400 1 EDT} + {3150684000 -18000 0 EST} + {3161574000 -14400 1 EDT} + {3182133600 -18000 0 EST} + {3193023600 -14400 1 EDT} + {3213583200 -18000 0 EST} + {3225078000 -14400 1 EDT} + {3245637600 -18000 0 EST} + {3256527600 -14400 1 EDT} + {3277087200 -18000 0 EST} + {3287977200 -14400 1 EDT} + {3308536800 -18000 0 EST} + {3319426800 -14400 1 EDT} + {3339986400 -18000 0 EST} + {3350876400 -14400 1 EDT} + {3371436000 -18000 0 EST} + {3382930800 -14400 1 EDT} + {3403490400 -18000 0 EST} + {3414380400 -14400 1 EDT} + {3434940000 -18000 0 EST} + {3445830000 -14400 1 EDT} + {3466389600 -18000 0 EST} + {3477279600 -14400 1 EDT} + {3497839200 -18000 0 EST} + {3508729200 -14400 1 EDT} + {3529288800 -18000 0 EST} + {3540178800 -14400 1 EDT} + {3560738400 -18000 0 EST} + {3572233200 -14400 1 EDT} + {3592792800 -18000 0 EST} + {3603682800 -14400 1 EDT} + {3624242400 -18000 0 EST} + {3635132400 -14400 1 EDT} + {3655692000 -18000 0 EST} + {3666582000 -14400 1 EDT} + {3687141600 -18000 0 EST} + {3698031600 -14400 1 EDT} + {3718591200 -18000 0 EST} + {3730086000 -14400 1 EDT} + {3750645600 -18000 0 EST} + {3761535600 -14400 1 EDT} + {3782095200 -18000 0 EST} + {3792985200 -14400 1 EDT} + {3813544800 -18000 0 EST} + {3824434800 -14400 1 EDT} + {3844994400 -18000 0 EST} + {3855884400 -14400 1 EDT} + {3876444000 -18000 0 EST} + {3887334000 -14400 1 EDT} + {3907893600 -18000 0 EST} + {3919388400 -14400 1 EDT} + {3939948000 -18000 0 EST} + {3950838000 -14400 1 EDT} + {3971397600 -18000 0 EST} + {3982287600 -14400 1 EDT} + {4002847200 -18000 0 EST} + {4013737200 -14400 1 EDT} + {4034296800 -18000 0 EST} + {4045186800 -14400 1 EDT} + {4065746400 -18000 0 EST} + {4076636400 -14400 1 EDT} + {4097196000 -18000 0 EST} } diff --git a/library/tzdata/America/Juneau b/library/tzdata/America/Juneau index fead810..070a27a 100644 --- a/library/tzdata/America/Juneau +++ b/library/tzdata/America/Juneau @@ -2,7 +2,7 @@ set TZData(:America/Juneau) { {-9223372036854775808 54139 0 LMT} - {-3225366139 -32261 0 LMT} + {-3225223727 -32261 0 LMT} {-2188954939 -28800 0 PST} {-883584000 -28800 0 PST} {-880207200 -25200 1 PWT} diff --git a/library/tzdata/America/Metlakatla b/library/tzdata/America/Metlakatla index 407948d..371fdcf 100644 --- a/library/tzdata/America/Metlakatla +++ b/library/tzdata/America/Metlakatla @@ -2,7 +2,7 @@ set TZData(:America/Metlakatla) { {-9223372036854775808 54822 0 LMT} - {-3225366822 -31578 0 LMT} + {-3225223727 -31578 0 LMT} {-2188955622 -28800 0 PST} {-883584000 -28800 0 PST} {-880207200 -25200 1 PWT} diff --git a/library/tzdata/America/Nome b/library/tzdata/America/Nome index c095b79..d7a9186 100644 --- a/library/tzdata/America/Nome +++ b/library/tzdata/America/Nome @@ -1,8 +1,8 @@ # created by tools/tclZIC.tcl - do not edit set TZData(:America/Nome) { - {-9223372036854775808 46701 0 LMT} - {-3225358701 -39698 0 LMT} + {-9223372036854775808 46702 0 LMT} + {-3225223727 -39698 0 LMT} {-2188947502 -39600 0 NST} {-883573200 -39600 0 NST} {-880196400 -36000 1 NWT} diff --git a/library/tzdata/America/Sitka b/library/tzdata/America/Sitka index 8c53d93..7cef02a 100644 --- a/library/tzdata/America/Sitka +++ b/library/tzdata/America/Sitka @@ -2,7 +2,7 @@ set TZData(:America/Sitka) { {-9223372036854775808 53927 0 LMT} - {-3225365927 -32473 0 LMT} + {-3225223727 -32473 0 LMT} {-2188954727 -28800 0 PST} {-883584000 -28800 0 PST} {-880207200 -25200 1 PWT} diff --git a/library/tzdata/America/Yakutat b/library/tzdata/America/Yakutat index a0420c5..b1d66ff 100644 --- a/library/tzdata/America/Yakutat +++ b/library/tzdata/America/Yakutat @@ -2,7 +2,7 @@ set TZData(:America/Yakutat) { {-9223372036854775808 52865 0 LMT} - {-3225364865 -33535 0 LMT} + {-3225223727 -33535 0 LMT} {-2188953665 -32400 0 YST} {-883580400 -32400 0 YST} {-880203600 -28800 1 YWT} diff --git a/library/tzdata/Asia/Famagusta b/library/tzdata/Asia/Famagusta index 384c183..55eade6 100644 --- a/library/tzdata/Asia/Famagusta +++ b/library/tzdata/Asia/Famagusta @@ -88,4 +88,169 @@ set TZData(:Asia/Famagusta) { {1445734800 7200 0 EET} {1459040400 10800 1 EEST} {1473285600 10800 0 +03} + {1509238800 7200 0 EET} + {1521939600 10800 1 EEST} + {1540688400 7200 0 EET} + {1553994000 10800 1 EEST} + {1572138000 7200 0 EET} + {1585443600 10800 1 EEST} + {1603587600 7200 0 EET} + {1616893200 10800 1 EEST} + {1635642000 7200 0 EET} + {1648342800 10800 1 EEST} + {1667091600 7200 0 EET} + {1679792400 10800 1 EEST} + {1698541200 7200 0 EET} + {1711846800 10800 1 EEST} + {1729990800 7200 0 EET} + {1743296400 10800 1 EEST} + {1761440400 7200 0 EET} + {1774746000 10800 1 EEST} + {1792890000 7200 0 EET} + {1806195600 10800 1 EEST} + {1824944400 7200 0 EET} + {1837645200 10800 1 EEST} + {1856394000 7200 0 EET} + {1869094800 10800 1 EEST} + {1887843600 7200 0 EET} + {1901149200 10800 1 EEST} + {1919293200 7200 0 EET} + {1932598800 10800 1 EEST} + {1950742800 7200 0 EET} + {1964048400 10800 1 EEST} + {1982797200 7200 0 EET} + {1995498000 10800 1 EEST} + {2014246800 7200 0 EET} + {2026947600 10800 1 EEST} + {2045696400 7200 0 EET} + {2058397200 10800 1 EEST} + {2077146000 7200 0 EET} + {2090451600 10800 1 EEST} + {2108595600 7200 0 EET} + {2121901200 10800 1 EEST} + {2140045200 7200 0 EET} + {2153350800 10800 1 EEST} + {2172099600 7200 0 EET} + {2184800400 10800 1 EEST} + {2203549200 7200 0 EET} + {2216250000 10800 1 EEST} + {2234998800 7200 0 EET} + {2248304400 10800 1 EEST} + {2266448400 7200 0 EET} + {2279754000 10800 1 EEST} + {2297898000 7200 0 EET} + {2311203600 10800 1 EEST} + {2329347600 7200 0 EET} + {2342653200 10800 1 EEST} + {2361402000 7200 0 EET} + {2374102800 10800 1 EEST} + {2392851600 7200 0 EET} + {2405552400 10800 1 EEST} + {2424301200 7200 0 EET} + {2437606800 10800 1 EEST} + {2455750800 7200 0 EET} + {2469056400 10800 1 EEST} + {2487200400 7200 0 EET} + {2500506000 10800 1 EEST} + {2519254800 7200 0 EET} + {2531955600 10800 1 EEST} + {2550704400 7200 0 EET} + {2563405200 10800 1 EEST} + {2582154000 7200 0 EET} + {2595459600 10800 1 EEST} + {2613603600 7200 0 EET} + {2626909200 10800 1 EEST} + {2645053200 7200 0 EET} + {2658358800 10800 1 EEST} + {2676502800 7200 0 EET} + {2689808400 10800 1 EEST} + {2708557200 7200 0 EET} + {2721258000 10800 1 EEST} + {2740006800 7200 0 EET} + {2752707600 10800 1 EEST} + {2771456400 7200 0 EET} + {2784762000 10800 1 EEST} + {2802906000 7200 0 EET} + {2816211600 10800 1 EEST} + {2834355600 7200 0 EET} + {2847661200 10800 1 EEST} + {2866410000 7200 0 EET} + {2879110800 10800 1 EEST} + {2897859600 7200 0 EET} + {2910560400 10800 1 EEST} + {2929309200 7200 0 EET} + {2942010000 10800 1 EEST} + {2960758800 7200 0 EET} + {2974064400 10800 1 EEST} + {2992208400 7200 0 EET} + {3005514000 10800 1 EEST} + {3023658000 7200 0 EET} + {3036963600 10800 1 EEST} + {3055712400 7200 0 EET} + {3068413200 10800 1 EEST} + {3087162000 7200 0 EET} + {3099862800 10800 1 EEST} + {3118611600 7200 0 EET} + {3131917200 10800 1 EEST} + {3150061200 7200 0 EET} + {3163366800 10800 1 EEST} + {3181510800 7200 0 EET} + {3194816400 10800 1 EEST} + {3212960400 7200 0 EET} + {3226266000 10800 1 EEST} + {3245014800 7200 0 EET} + {3257715600 10800 1 EEST} + {3276464400 7200 0 EET} + {3289165200 10800 1 EEST} + {3307914000 7200 0 EET} + {3321219600 10800 1 EEST} + {3339363600 7200 0 EET} + {3352669200 10800 1 EEST} + {3370813200 7200 0 EET} + {3384118800 10800 1 EEST} + {3402867600 7200 0 EET} + {3415568400 10800 1 EEST} + {3434317200 7200 0 EET} + {3447018000 10800 1 EEST} + {3465766800 7200 0 EET} + {3479072400 10800 1 EEST} + {3497216400 7200 0 EET} + {3510522000 10800 1 EEST} + {3528666000 7200 0 EET} + {3541971600 10800 1 EEST} + {3560115600 7200 0 EET} + {3573421200 10800 1 EEST} + {3592170000 7200 0 EET} + {3604870800 10800 1 EEST} + {3623619600 7200 0 EET} + {3636320400 10800 1 EEST} + {3655069200 7200 0 EET} + {3668374800 10800 1 EEST} + {3686518800 7200 0 EET} + {3699824400 10800 1 EEST} + {3717968400 7200 0 EET} + {3731274000 10800 1 EEST} + {3750022800 7200 0 EET} + {3762723600 10800 1 EEST} + {3781472400 7200 0 EET} + {3794173200 10800 1 EEST} + {3812922000 7200 0 EET} + {3825622800 10800 1 EEST} + {3844371600 7200 0 EET} + {3857677200 10800 1 EEST} + {3875821200 7200 0 EET} + {3889126800 10800 1 EEST} + {3907270800 7200 0 EET} + {3920576400 10800 1 EEST} + {3939325200 7200 0 EET} + {3952026000 10800 1 EEST} + {3970774800 7200 0 EET} + {3983475600 10800 1 EEST} + {4002224400 7200 0 EET} + {4015530000 10800 1 EEST} + {4033674000 7200 0 EET} + {4046979600 10800 1 EEST} + {4065123600 7200 0 EET} + {4078429200 10800 1 EEST} + {4096573200 7200 0 EET} } diff --git a/library/tzdata/Asia/Kolkata b/library/tzdata/Asia/Kolkata index 6b3b9fb..b78f8cd 100644 --- a/library/tzdata/Asia/Kolkata +++ b/library/tzdata/Asia/Kolkata @@ -2,8 +2,10 @@ set TZData(:Asia/Kolkata) { {-9223372036854775808 21208 0 LMT} - {-2840162008 21200 0 HMT} - {-891582800 23400 0 +0630} + {-3645237208 21200 0 HMT} + {-3155694800 19270 0 MMT} + {-2019705670 19800 0 IST} + {-891581400 23400 1 +0630} {-872058600 19800 0 IST} {-862637400 23400 1 +0630} {-764145000 19800 0 IST} diff --git a/library/tzdata/Asia/Yangon b/library/tzdata/Asia/Yangon index 8e17d82..82870c6 100644 --- a/library/tzdata/Asia/Yangon +++ b/library/tzdata/Asia/Yangon @@ -1,9 +1,9 @@ # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Yangon) { - {-9223372036854775808 23080 0 LMT} - {-2840163880 23080 0 RMT} - {-1577946280 23400 0 +0630} + {-9223372036854775808 23087 0 LMT} + {-2840163887 23087 0 RMT} + {-1577946287 23400 0 +0630} {-873268200 32400 0 +09} {-778410000 23400 0 +0630} } diff --git a/library/tzdata/Asia/Yerevan b/library/tzdata/Asia/Yerevan index 0ffb69e..25a349a 100644 --- a/library/tzdata/Asia/Yerevan +++ b/library/tzdata/Asia/Yerevan @@ -64,6 +64,7 @@ set TZData(:Asia/Yerevan) { {1256421600 14400 0 +04} {1269727200 18000 1 +05} {1288476000 14400 0 +04} + {1293825600 14400 0 +04} {1301176800 18000 1 +05} {1319925600 14400 0 +04} } diff --git a/library/tzdata/Europe/Dublin b/library/tzdata/Europe/Dublin index 4b43bc0..c3a5c0e 100644 --- a/library/tzdata/Europe/Dublin +++ b/library/tzdata/Europe/Dublin @@ -52,10 +52,10 @@ set TZData(:Europe/Dublin) { {-986162400 0 0 IST} {-969228000 3600 1 IST} {-950479200 0 0 IST} - {-942015600 3600 1 IST} - {-733359600 0 0 GMT} + {-942012000 3600 1 IST} + {-733356000 0 0 GMT} {-719445600 3600 1 IST} - {-699490800 0 0 GMT} + {-699487200 0 0 GMT} {-684972000 3600 0 IST} {-668037600 0 0 IST} {-654732000 3600 1 IST} diff --git a/library/tzdata/Pacific/Apia b/library/tzdata/Pacific/Apia index feef374..4c0d84a 100644 --- a/library/tzdata/Pacific/Apia +++ b/library/tzdata/Pacific/Apia @@ -2,7 +2,7 @@ set TZData(:Pacific/Apia) { {-9223372036854775808 45184 0 LMT} - {-2855737984 -41216 0 LMT} + {-2445424384 -41216 0 LMT} {-1861878784 -41400 0 -1130} {-631110600 -39600 0 -10} {1285498800 -36000 1 -10} diff --git a/library/tzdata/Pacific/Fiji b/library/tzdata/Pacific/Fiji index fa8c99e..f9d393c 100644 --- a/library/tzdata/Pacific/Fiji +++ b/library/tzdata/Pacific/Fiji @@ -24,7 +24,7 @@ set TZData(:Pacific/Fiji) { {1478354400 46800 1 +13} {1484402400 43200 0 +12} {1509804000 46800 1 +13} - {1516456800 43200 0 +12} + {1515852000 43200 0 +12} {1541253600 46800 1 +13} {1547906400 43200 0 +12} {1572703200 46800 1 +13} @@ -36,7 +36,7 @@ set TZData(:Pacific/Fiji) { {1667656800 46800 1 +13} {1673704800 43200 0 +12} {1699106400 46800 1 +13} - {1705759200 43200 0 +12} + {1705154400 43200 0 +12} {1730556000 46800 1 +13} {1737208800 43200 0 +12} {1762005600 46800 1 +13} @@ -46,7 +46,7 @@ set TZData(:Pacific/Fiji) { {1825509600 46800 1 +13} {1831557600 43200 0 +12} {1856959200 46800 1 +13} - {1863612000 43200 0 +12} + {1863007200 43200 0 +12} {1888408800 46800 1 +13} {1895061600 43200 0 +12} {1919858400 46800 1 +13} @@ -58,7 +58,7 @@ set TZData(:Pacific/Fiji) { {2014812000 46800 1 +13} {2020860000 43200 0 +12} {2046261600 46800 1 +13} - {2052914400 43200 0 +12} + {2052309600 43200 0 +12} {2077711200 46800 1 +13} {2084364000 43200 0 +12} {2109160800 46800 1 +13} @@ -80,7 +80,7 @@ set TZData(:Pacific/Fiji) { {2361967200 46800 1 +13} {2368015200 43200 0 +12} {2393416800 46800 1 +13} - {2400069600 43200 0 +12} + {2399464800 43200 0 +12} {2424866400 46800 1 +13} {2431519200 43200 0 +12} {2456316000 46800 1 +13} @@ -92,7 +92,7 @@ set TZData(:Pacific/Fiji) { {2551269600 46800 1 +13} {2557317600 43200 0 +12} {2582719200 46800 1 +13} - {2589372000 43200 0 +12} + {2588767200 43200 0 +12} {2614168800 46800 1 +13} {2620821600 43200 0 +12} {2645618400 46800 1 +13} @@ -102,7 +102,7 @@ set TZData(:Pacific/Fiji) { {2709122400 46800 1 +13} {2715170400 43200 0 +12} {2740572000 46800 1 +13} - {2747224800 43200 0 +12} + {2746620000 43200 0 +12} {2772021600 46800 1 +13} {2778674400 43200 0 +12} {2803471200 46800 1 +13} @@ -114,7 +114,7 @@ set TZData(:Pacific/Fiji) { {2898424800 46800 1 +13} {2904472800 43200 0 +12} {2929874400 46800 1 +13} - {2936527200 43200 0 +12} + {2935922400 43200 0 +12} {2961324000 46800 1 +13} {2967976800 43200 0 +12} {2992773600 46800 1 +13} @@ -136,7 +136,7 @@ set TZData(:Pacific/Fiji) { {3245580000 46800 1 +13} {3251628000 43200 0 +12} {3277029600 46800 1 +13} - {3283682400 43200 0 +12} + {3283077600 43200 0 +12} {3308479200 46800 1 +13} {3315132000 43200 0 +12} {3339928800 46800 1 +13} @@ -148,7 +148,7 @@ set TZData(:Pacific/Fiji) { {3434882400 46800 1 +13} {3440930400 43200 0 +12} {3466332000 46800 1 +13} - {3472984800 43200 0 +12} + {3472380000 43200 0 +12} {3497781600 46800 1 +13} {3504434400 43200 0 +12} {3529231200 46800 1 +13} @@ -158,7 +158,7 @@ set TZData(:Pacific/Fiji) { {3592735200 46800 1 +13} {3598783200 43200 0 +12} {3624184800 46800 1 +13} - {3630837600 43200 0 +12} + {3630232800 43200 0 +12} {3655634400 46800 1 +13} {3662287200 43200 0 +12} {3687084000 46800 1 +13} @@ -170,7 +170,7 @@ set TZData(:Pacific/Fiji) { {3782037600 46800 1 +13} {3788085600 43200 0 +12} {3813487200 46800 1 +13} - {3820140000 43200 0 +12} + {3819535200 43200 0 +12} {3844936800 46800 1 +13} {3851589600 43200 0 +12} {3876386400 46800 1 +13} diff --git a/library/tzdata/Pacific/Pago_Pago b/library/tzdata/Pacific/Pago_Pago index d30c981..9b5607f 100644 --- a/library/tzdata/Pacific/Pago_Pago +++ b/library/tzdata/Pacific/Pago_Pago @@ -2,6 +2,6 @@ set TZData(:Pacific/Pago_Pago) { {-9223372036854775808 45432 0 LMT} - {-2855738232 -40968 0 LMT} + {-2445424632 -40968 0 LMT} {-1861879032 -39600 0 SST} } diff --git a/library/tzdata/Pacific/Tongatapu b/library/tzdata/Pacific/Tongatapu index 731b4f6..3cfaaaa 100644 --- a/library/tzdata/Pacific/Tongatapu +++ b/library/tzdata/Pacific/Tongatapu @@ -13,169 +13,4 @@ set TZData(:Pacific/Tongatapu) { {1012046400 46800 0 +13} {1478350800 50400 1 +14} {1484398800 46800 0 +13} - {1509800400 50400 1 +14} - {1516453200 46800 0 +13} - {1541250000 50400 1 +14} - {1547902800 46800 0 +13} - {1572699600 50400 1 +14} - {1579352400 46800 0 +13} - {1604149200 50400 1 +14} - {1610802000 46800 0 +13} - {1636203600 50400 1 +14} - {1642251600 46800 0 +13} - {1667653200 50400 1 +14} - {1673701200 46800 0 +13} - {1699102800 50400 1 +14} - {1705755600 46800 0 +13} - {1730552400 50400 1 +14} - {1737205200 46800 0 +13} - {1762002000 50400 1 +14} - {1768654800 46800 0 +13} - {1793451600 50400 1 +14} - {1800104400 46800 0 +13} - {1825506000 50400 1 +14} - {1831554000 46800 0 +13} - {1856955600 50400 1 +14} - {1863608400 46800 0 +13} - {1888405200 50400 1 +14} - {1895058000 46800 0 +13} - {1919854800 50400 1 +14} - {1926507600 46800 0 +13} - {1951304400 50400 1 +14} - {1957957200 46800 0 +13} - {1983358800 50400 1 +14} - {1989406800 46800 0 +13} - {2014808400 50400 1 +14} - {2020856400 46800 0 +13} - {2046258000 50400 1 +14} - {2052910800 46800 0 +13} - {2077707600 50400 1 +14} - {2084360400 46800 0 +13} - {2109157200 50400 1 +14} - {2115810000 46800 0 +13} - {2140606800 50400 1 +14} - {2147259600 46800 0 +13} - {2172661200 50400 1 +14} - {2178709200 46800 0 +13} - {2204110800 50400 1 +14} - {2210158800 46800 0 +13} - {2235560400 50400 1 +14} - {2242213200 46800 0 +13} - {2267010000 50400 1 +14} - {2273662800 46800 0 +13} - {2298459600 50400 1 +14} - {2305112400 46800 0 +13} - {2329909200 50400 1 +14} - {2336562000 46800 0 +13} - {2361963600 50400 1 +14} - {2368011600 46800 0 +13} - {2393413200 50400 1 +14} - {2400066000 46800 0 +13} - {2424862800 50400 1 +14} - {2431515600 46800 0 +13} - {2456312400 50400 1 +14} - {2462965200 46800 0 +13} - {2487762000 50400 1 +14} - {2494414800 46800 0 +13} - {2519816400 50400 1 +14} - {2525864400 46800 0 +13} - {2551266000 50400 1 +14} - {2557314000 46800 0 +13} - {2582715600 50400 1 +14} - {2589368400 46800 0 +13} - {2614165200 50400 1 +14} - {2620818000 46800 0 +13} - {2645614800 50400 1 +14} - {2652267600 46800 0 +13} - {2677064400 50400 1 +14} - {2683717200 46800 0 +13} - {2709118800 50400 1 +14} - {2715166800 46800 0 +13} - {2740568400 50400 1 +14} - {2747221200 46800 0 +13} - {2772018000 50400 1 +14} - {2778670800 46800 0 +13} - {2803467600 50400 1 +14} - {2810120400 46800 0 +13} - {2834917200 50400 1 +14} - {2841570000 46800 0 +13} - {2866971600 50400 1 +14} - {2873019600 46800 0 +13} - {2898421200 50400 1 +14} - {2904469200 46800 0 +13} - {2929870800 50400 1 +14} - {2936523600 46800 0 +13} - {2961320400 50400 1 +14} - {2967973200 46800 0 +13} - {2992770000 50400 1 +14} - {2999422800 46800 0 +13} - {3024219600 50400 1 +14} - {3030872400 46800 0 +13} - {3056274000 50400 1 +14} - {3062322000 46800 0 +13} - {3087723600 50400 1 +14} - {3093771600 46800 0 +13} - {3119173200 50400 1 +14} - {3125826000 46800 0 +13} - {3150622800 50400 1 +14} - {3157275600 46800 0 +13} - {3182072400 50400 1 +14} - {3188725200 46800 0 +13} - {3213522000 50400 1 +14} - {3220174800 46800 0 +13} - {3245576400 50400 1 +14} - {3251624400 46800 0 +13} - {3277026000 50400 1 +14} - {3283678800 46800 0 +13} - {3308475600 50400 1 +14} - {3315128400 46800 0 +13} - {3339925200 50400 1 +14} - {3346578000 46800 0 +13} - {3371374800 50400 1 +14} - {3378027600 46800 0 +13} - {3403429200 50400 1 +14} - {3409477200 46800 0 +13} - {3434878800 50400 1 +14} - {3440926800 46800 0 +13} - {3466328400 50400 1 +14} - {3472981200 46800 0 +13} - {3497778000 50400 1 +14} - {3504430800 46800 0 +13} - {3529227600 50400 1 +14} - {3535880400 46800 0 +13} - {3560677200 50400 1 +14} - {3567330000 46800 0 +13} - {3592731600 50400 1 +14} - {3598779600 46800 0 +13} - {3624181200 50400 1 +14} - {3630834000 46800 0 +13} - {3655630800 50400 1 +14} - {3662283600 46800 0 +13} - {3687080400 50400 1 +14} - {3693733200 46800 0 +13} - {3718530000 50400 1 +14} - {3725182800 46800 0 +13} - {3750584400 50400 1 +14} - {3756632400 46800 0 +13} - {3782034000 50400 1 +14} - {3788082000 46800 0 +13} - {3813483600 50400 1 +14} - {3820136400 46800 0 +13} - {3844933200 50400 1 +14} - {3851586000 46800 0 +13} - {3876382800 50400 1 +14} - {3883035600 46800 0 +13} - {3907832400 50400 1 +14} - {3914485200 46800 0 +13} - {3939886800 50400 1 +14} - {3945934800 46800 0 +13} - {3971336400 50400 1 +14} - {3977384400 46800 0 +13} - {4002786000 50400 1 +14} - {4009438800 46800 0 +13} - {4034235600 50400 1 +14} - {4040888400 46800 0 +13} - {4065685200 50400 1 +14} - {4072338000 46800 0 +13} - {4097134800 50400 1 +14} } -- cgit v0.12 From f18d453679d9b42aaca721479cff7d92205796af Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 24 Oct 2017 13:24:25 +0000 Subject: Historical change affecting tests: Detroit did not observe Daylight Saving Time in 1967 --- tests/clock.test | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/tests/clock.test b/tests/clock.test index 7d62a60..a697714 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -15416,30 +15416,9 @@ test clock-5.29 {time zone boundary case 1948-09-26 01:00:01} detroit { clock format -671047199 -format {%H:%M:%S %z %Z} \ -timezone :America/Detroit } {01:00:01 -0500 EST} -test clock-5.30 {time zone boundary case 1967-06-14 01:59:59} detroit { - clock format -80499601 -format {%H:%M:%S %z %Z} \ - -timezone :America/Detroit -} {01:59:59 -0500 EST} -test clock-5.31 {time zone boundary case 1967-06-14 03:00:00} detroit { - clock format -80499600 -format {%H:%M:%S %z %Z} \ - -timezone :America/Detroit -} {03:00:00 -0400 EDT} -test clock-5.32 {time zone boundary case 1967-06-14 03:00:01} detroit { - clock format -80499599 -format {%H:%M:%S %z %Z} \ - -timezone :America/Detroit -} {03:00:01 -0400 EDT} -test clock-5.33 {time zone boundary case 1967-10-29 01:59:59} detroit { - clock format -68666401 -format {%H:%M:%S %z %Z} \ - -timezone :America/Detroit -} {01:59:59 -0400 EDT} -test clock-5.34 {time zone boundary case 1967-10-29 01:00:00} detroit { - clock format -68666400 -format {%H:%M:%S %z %Z} \ - -timezone :America/Detroit -} {01:00:00 -0500 EST} -test clock-5.35 {time zone boundary case 1967-10-29 01:00:01} detroit { - clock format -68666399 -format {%H:%M:%S %z %Z} \ - -timezone :America/Detroit -} {01:00:01 -0500 EST} + +# Detroit did not observe Daylight Saving Time in 1967 + test clock-5.36 {time zone boundary case 1972-12-31 23:59:59} detroit { clock format 94712399 -format {%H:%M:%S %z %Z} \ -timezone :America/Detroit -- cgit v0.12 From 9306fa604ca63f8626f859c1f6cb5154a659e504 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 24 Oct 2017 14:11:16 +0000 Subject: Cherrypick: [fc1409fc91] Method cloning needs to be careful with body representations. --- generic/tclOOMethod.c | 1 + tests/oo.test | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 99a8bfc..8da0fb3 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -1314,6 +1314,7 @@ CloneProcedureMethod( */ bodyObj = Tcl_DuplicateObj(pmPtr->procPtr->bodyPtr); + Tcl_GetString(bodyObj); TclFreeIntRep(bodyObj); /* diff --git a/tests/oo.test b/tests/oo.test index 1ac6f37..61a5e01 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -2048,6 +2048,17 @@ test oo-15.14 {OO: object cloning with target NS} -setup { } -cleanup { Cls destroy } -result {{} ::dupens::test-15.14} +test oo-15.15 {method cloning must ensure that there is a string representation of bodies} -setup { + oo::class create cls +} -body { + cls create foo + oo::objdefine foo { + method m1 {} [string map {a b} {return hello}] + } + [oo::copy foo] m1 +} -cleanup { + cls destroy +} -result hello test oo-16.1 {OO: object introspection} -body { info object -- cgit v0.12 From 4ab9cb54181038d61f85f76f76a7b23e7a7c59ca Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 27 Oct 2017 12:23:28 +0000 Subject: Update tests that were still written on the outdated premise that Tcl's encoding subsystem had to initialize starting in the identity encoding. --- tests/cmdAH.test | 8 ++++---- tests/encoding.test | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 4ca90c6..45a867a 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -145,7 +145,7 @@ test cmdAH-4.5 {Tcl_EncodingObjCmd} { } 8C test cmdAH-4.6 {Tcl_EncodingObjCmd} { set system [encoding system] - encoding system identity + encoding system iso8859-1 set x [encoding convertto jis0208 \u4e4e] encoding system $system set x @@ -165,7 +165,7 @@ test cmdAH-4.9 {Tcl_EncodingObjCmd} { } \u4e4e test cmdAH-4.10 {Tcl_EncodingObjCmd} { set system [encoding system] - encoding system identity + encoding system iso8859-1 set x [encoding convertfrom jis0208 8C] encoding system $system set x @@ -178,11 +178,11 @@ test cmdAH-4.12 {Tcl_EncodingObjCmd} { } {1 {wrong # args: should be "encoding system ?encoding?"}} test cmdAH-4.13 {Tcl_EncodingObjCmd} { set system [encoding system] - encoding system identity + encoding system iso8859-1 set x [encoding system] encoding system $system set x -} identity +} iso8859-1 test cmdAH-5.1 {Tcl_FileObjCmd} { list [catch file msg] $msg diff --git a/tests/encoding.test b/tests/encoding.test index 85deb33..498e176 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -66,10 +66,10 @@ test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} {testencoding} { encoding system shiftjis ;# incr ref count encoding dirs [list [pwd]] set x [encoding convertto shiftjis \u4e4e] ;# old one found - encoding system identity + encoding system iso8859-1 llength shiftjis lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg - encoding system identity + encoding system iso8859-1 encoding dirs $path encoding system $system set x @@ -121,7 +121,7 @@ test encoding-5.1 {Tcl_SetSystemEncoding} { set old [encoding system] encoding system jis0208 set x [encoding convertto \u4e4e] - encoding system identity + encoding system iso8859-1 encoding system $old set x } {8C} @@ -245,7 +245,7 @@ test encoding-11.5.1 {LoadEncodingFile: escape file} { test encoding-11.6 {LoadEncodingFile: invalid file} {testencoding} { set system [encoding system] set path [encoding dirs] - encoding system identity + encoding system iso8859-1 cd [temporaryDirectory] encoding dirs [file join tmp encoding] makeDirectory tmp -- cgit v0.12 From 0a3f9ca6fcac186283561f4f377448ddd6444aa4 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 27 Oct 2017 12:57:15 +0000 Subject: oops --- tests/encoding.test | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/encoding.test b/tests/encoding.test index eb58ea0..ed0e6a4 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -80,7 +80,6 @@ test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} -setup { lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg } -cleanup { encoding system iso8859-1 - encoding system identity encoding dirs $path encoding system $system } -result "\u008c\u00c1 1 {unknown encoding \"shiftjis\"}" -- cgit v0.12 From 1d0751deb7fafb3e276e1ba022ef023e795946fb Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 30 Oct 2017 02:55:30 +0000 Subject: Revise tests that relied on deprecated variable resolution rules. --- tests/assemble.test | 2 +- tests/execute.test | 6 +++--- tests/resolver.test | 9 +++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/assemble.test b/tests/assemble.test index a9c77e3..5231048 100644 --- a/tests/assemble.test +++ b/tests/assemble.test @@ -852,7 +852,7 @@ test assemble-8.5 {bad context} { -body { namespace eval assem { set x 1 - list [catch {assemble {load x}} result] $result $errorCode + list [catch {assemble {load x}} result opts] $result [dict get $opts -errorcode] } } -result {1 {cannot use this instruction to create a variable in a non-proc context} {TCL ASSEM LVT}} diff --git a/tests/execute.test b/tests/execute.test index 9a2ffbd..e1ed68b 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -724,7 +724,7 @@ test execute-6.14 {Tcl_ExprObj: exprcode context validation} -setup { } set result {} lappend result [expr $e] - lappend result [namespace eval foo {expr $e}] + lappend result [namespace eval foo [list expr $e]] } -cleanup { namespace delete foo } -result {1 2} @@ -733,11 +733,11 @@ test execute-6.15 {Tcl_ExprObj: exprcode name resolution epoch validation} -setu } -body { set e { [llength {}]+1 } set result {} - lappend result [namespace eval foo {expr $e}] + lappend result [namespace eval foo [list expr $e]] namespace eval foo { proc llength {args} {return 1} } - lappend result [namespace eval foo {expr $e}] + lappend result [namespace eval foo [list expr $e]] } -cleanup { namespace delete foo } -result {1 2} diff --git a/tests/resolver.test b/tests/resolver.test index 9bb4c08..b0b395d 100644 --- a/tests/resolver.test +++ b/tests/resolver.test @@ -139,13 +139,10 @@ test resolver-1.5 {cmdNameObj sharing vs. cmd resolver: other than global NS} -s variable r2 "" } } -constraints testinterpresolver -body { - set r0 [namespace eval ::ns2 {x}] - set r1 [namespace eval ::ns2 {z}] - namespace eval ::ns2 { + list [namespace eval ::ns2 {x}] [namespace eval ::ns2 {z}] [namespace eval ::ns2 { namespace import ::ns1::z - set r2 [z] - } - list $r0 $r1 $r2 + z + }] } -cleanup { testinterpresolver down namespace delete ::ns2 -- cgit v0.12 From c5865fcd241e9a0eec80a61152b696d9d066944b Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 30 Oct 2017 03:23:28 +0000 Subject: More test rewrites for robust var resolution. --- tests/platform.test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/platform.test b/tests/platform.test index c826444..8ee0ec7 100644 --- a/tests/platform.test +++ b/tests/platform.test @@ -16,7 +16,9 @@ namespace eval ::tcl::test::platform { namespace import ::tcltest::test namespace import ::tcltest::cleanupTests - variable ::tcl_platform + # This is not how [variable] works. See TIP 276. + #variable ::tcl_platform + namespace upvar :: tcl_platform tcl_platform ::tcltest::loadTestedCommands catch [list package require -exact Tcltest [info patchlevel]] -- cgit v0.12 From 274ab123a800239134ffb7e63421a13f55b38b89 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 3 Nov 2017 12:14:01 +0000 Subject: Better versions of TclGetIntFromObj and TclGetIntForIndexM macro's, which give advantage for platforms where longs are not ints (e.g. linux64) --- generic/tclInt.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 2f830cc..1908e32 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2422,8 +2422,8 @@ typedef struct List { #define TCL_EACH_COLLECT 1 /* Collect iteration result like [lmap] */ /* - * Macros providing a faster path to integers: Tcl_GetLongFromObj everywhere, - * Tcl_GetIntFromObj and TclGetIntForIndex on platforms where longs are ints. + * Macros providing a faster path to integers: Tcl_GetLongFromObj, + * Tcl_GetIntFromObj and TclGetIntForIndex. * * WARNING: these macros eval their args more than once. */ @@ -2444,9 +2444,17 @@ typedef struct List { : TclGetIntForIndex((interp), (objPtr), (endValue), (idxPtr))) #else #define TclGetIntFromObj(interp, objPtr, intPtr) \ - Tcl_GetIntFromObj((interp), (objPtr), (intPtr)) -#define TclGetIntForIndexM(interp, objPtr, ignore, idxPtr) \ - TclGetIntForIndex(interp, objPtr, ignore, idxPtr) + (((objPtr)->typePtr == &tclIntType \ + && (objPtr)->internalRep.longValue >= -(Tcl_WideInt)(UINT_MAX) \ + && (objPtr)->internalRep.longValue <= (Tcl_WideInt)(UINT_MAX)) \ + ? ((*(intPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ + : Tcl_GetIntFromObj((interp), (objPtr), (intPtr))) +#define TclGetIntForIndexM(interp, objPtr, endValue, idxPtr) \ + (((objPtr)->typePtr == &tclIntType \ + && (objPtr)->internalRep.longValue >= INT_MIN \ + && (objPtr)->internalRep.longValue <= INT_MAX) \ + ? ((*(idxPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ + : TclGetIntForIndex((interp), (objPtr), (endValue), (idxPtr))) #endif /* -- cgit v0.12 From 5528e1c1a25f45988be72e2e16ff577f0dbb1abd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 3 Nov 2017 12:57:15 +0000 Subject: Fix [6f2f83cc149e9918884faffefebc8dfa695f4ea0|6f2f83cc14]: tclWinload.c robustness. And fix a minor possible memory leak in TclSetupEnv() as well. Thanks to Christian Werner for both suggestions, backported from Androwish. --- generic/tclEnv.c | 1 + win/tclWinLoad.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 66ddb57..8cc4b74 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -130,6 +130,7 @@ TclSetupEnv( * '='; ignore the entry. */ + Tcl_DStringFree(&envString); continue; } p2++; diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 3ad6328..2946ea2 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -63,7 +63,7 @@ TclpDlopen( * file. */ int flags) { - HINSTANCE hInstance; + HINSTANCE hInstance = NULL; const TCHAR *nativeName; Tcl_LoadHandle handlePtr; DWORD firstError; @@ -75,7 +75,10 @@ TclpDlopen( */ nativeName = Tcl_FSGetNativePath(pathPtr); - hInstance = LoadLibraryEx(nativeName,NULL,LOAD_WITH_ALTERED_SEARCH_PATH); + if (nativeName != NULL) { + hInstance = LoadLibraryEx(nativeName, NULL, + LOAD_WITH_ALTERED_SEARCH_PATH); + } if (hInstance == NULL) { /* * Let the OS loader examine the binary search path for whatever @@ -89,7 +92,8 @@ TclpDlopen( * Remember the first error on load attempt to be used if the * second load attempt below also fails. */ - firstError = GetLastError(); + firstError = (nativeName == NULL) ? + ERROR_MOD_NOT_FOUND : GetLastError(); nativeName = Tcl_WinUtfToTChar(Tcl_GetString(pathPtr), -1, &ds); hInstance = LoadLibraryEx(nativeName, NULL, -- cgit v0.12 From 22719c659625a4a57aa00294b5b02c96c51762d4 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 6 Nov 2017 00:10:21 +0000 Subject: Test case for Bug 5d65e65036. --- tests/pkg.test | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/pkg.test b/tests/pkg.test index b935a3f..10b4732 100644 --- a/tests/pkg.test +++ b/tests/pkg.test @@ -518,6 +518,16 @@ test pkg-2.52 {Tcl_PkgRequire procedure, picking best stable version} { set x } {1.3} +test pkg-2.53 {Tcl_PkgRequire procedure, picking best stable version} { + package forget t + foreach i {1.2b1 1.1} { + package ifneeded t $i "set x $i; package provide t $i" + } + set x xxx + package require t + set x +} {1.1} + test pkg-3.1 {Tcl_PackageCmd procedure} { -- cgit v0.12 From ac4fb39a73fb01e2cbb763a086191aa4fcec175f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 7 Nov 2017 13:19:37 +0000 Subject: Don't use Unicode character \udead in test-cases, because it is an invalid Unicode code-point (lower surrogate). This will cause test-failures with TIP #389. Just use \ud0ad in stead. Also fix some other test-cases which fail for TCL_UTF_MAX == 4. --- tests/string.test | 26 +++++++++++++------------- tests/utf.test | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/string.test b/tests/string.test index cc65e67..bbba5eb 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1682,40 +1682,40 @@ test string-24.4 {string reverse command - unshared string} { string reverse $x$y } edcba test string-24.5 {string reverse command - shared unicode string} { - set x abcde\udead + set x abcde\ud0ad string reverse $x -} \udeadedcba +} \ud0adedcba test string-24.6 {string reverse command - unshared string} { set x abc - set y de\udead + set y de\ud0ad string reverse $x$y -} \udeadedcba +} \ud0adedcba test string-24.7 {string reverse command - simple case} { string reverse a } a test string-24.8 {string reverse command - simple case} { - string reverse \udead -} \udead + string reverse \ud0ad +} \ud0ad test string-24.9 {string reverse command - simple case} { string reverse {} } {} test string-24.10 {string reverse command - corner case} { - set x \ubeef\udead + set x \ubeef\ud0ad string reverse $x -} \udead\ubeef +} \ud0ad\ubeef test string-24.11 {string reverse command - corner case} { set x \ubeef - set y \udead + set y \ud0ad string reverse $x$y -} \udead\ubeef +} \ud0ad\ubeef test string-24.12 {string reverse command - corner case} { set x \ubeef - set y \udead + set y \ud0ad string is ascii [string reverse $x$y] } 0 test string-24.13 {string reverse command - pure Unicode string} { - string reverse [string range \ubeef\udead\ubeef\udead\ubeef\udead 1 5] -} \udead\ubeef\udead\ubeef\udead + string reverse [string range \ubeef\ud0ad\ubeef\ud0ad\ubeef\ud0ad 1 5] +} \ud0ad\ubeef\ud0ad\ubeef\ud0ad test string-24.14 {string reverse command - pure bytearray} { binary scan [string reverse [binary format H* 010203]] H* x set x diff --git a/tests/utf.test b/tests/utf.test index 422ab08..45f9c0c 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -68,10 +68,10 @@ test utf-2.7 {Tcl_UtfToUniChar: lead (3-byte) followed by 2 trail} testbytestrin } {1} test utf-2.8 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {fullutf testbytestring} -body { string length [testbytestring "\xF0\x90\x80\x80"] -} -result {1} +} -result {2} test utf-2.9 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {fullutf testbytestring} -body { string length [testbytestring "\xF4\x8F\xBF\xBF"] -} -result {1} +} -result {2} test utf-2.10 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail, underflow} testbytestring { string length [testbytestring "\xF0\x8F\xBF\xBF"] } {4} -- cgit v0.12 From fd61a8e89e832f6814d5deb7fe5a0c171e638167 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 7 Nov 2017 21:32:04 +0000 Subject: Attempted bug fix. --- generic/tclHash.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/generic/tclHash.c b/generic/tclHash.c index 256b073..b553c68 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -1013,12 +1013,18 @@ static void RebuildTable( register Tcl_HashTable *tablePtr) /* Table to enlarge. */ { - int oldSize, count, index; - Tcl_HashEntry **oldBuckets; + int count, index, oldSize = tablePtr->numBuckets; + Tcl_HashEntry **oldBuckets = tablePtr->buckets; register Tcl_HashEntry **oldChainPtr, **newChainPtr; register Tcl_HashEntry *hPtr; const Tcl_HashKeyType *typePtr; + /* Avoid outgrowing capability of the memory allocators */ + if (oldSize > UINT_MAX / (4 * sizeof(Tcl_HashEntry *))) { + tablePtr->rebuildSize = INT_MAX; + return; + } + if (tablePtr->keyType == TCL_STRING_KEYS) { typePtr = &tclStringHashKeyType; } else if (tablePtr->keyType == TCL_ONE_WORD_KEYS) { @@ -1030,9 +1036,6 @@ RebuildTable( typePtr = &tclArrayHashKeyType; } - oldSize = tablePtr->numBuckets; - oldBuckets = tablePtr->buckets; - /* * Allocate and initialize the new bucket array, and set up hashing * constants for new array size. -- cgit v0.12 From 98c6b22c1002fae94f8abf7422758530a9a6fdeb Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 8 Nov 2017 02:21:49 +0000 Subject: TclOO object allocation: Set classPtr to NULL if it wasn't otherwise set. --- generic/tclOO.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generic/tclOO.c b/generic/tclOO.c index ec666ee..f236ac9 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -537,7 +537,8 @@ KillFoundation( * AllocObject -- * * Allocate an object of basic type. Does not splice the object into its - * class's instance list. + * class's instance list. The caller must set the classPtr on the object, + * either to a class or to NULL. * * ---------------------------------------------------------------------- */ @@ -1672,6 +1673,8 @@ Tcl_NewObjectInstance( AllocClass(interp, oPtr); oPtr->selfCls = classPtr; TclOOAddToSubclasses(oPtr->classPtr, fPtr->objectCls); + } else { + oPtr->classPtr = NULL; } /* -- cgit v0.12 From f31af075d052f3285352b8c4c10174baef2eee4a Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 8 Nov 2017 02:50:28 +0000 Subject: compiler warning --- generic/tclHash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclHash.c b/generic/tclHash.c index b553c68..5d6ea86 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -1020,7 +1020,7 @@ RebuildTable( const Tcl_HashKeyType *typePtr; /* Avoid outgrowing capability of the memory allocators */ - if (oldSize > UINT_MAX / (4 * sizeof(Tcl_HashEntry *))) { + if (oldSize > (int)(UINT_MAX / (4 * sizeof(Tcl_HashEntry *)))) { tablePtr->rebuildSize = INT_MAX; return; } -- cgit v0.12 From 729fcd5f0987531367d7572998e8be23743febd1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Nov 2017 12:48:54 +0000 Subject: Make "scan %c" and the internal function ExtendUnicodeRepWithString() work as expected for TCL_UTF_MAX == 4 when handling characters > U+ffff. No effect when TCL_UTF_MAX == 3 or TCL_UTF_MAX == 6 --- generic/tclScan.c | 12 ++++++++++-- generic/tclStringObj.c | 6 +++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/generic/tclScan.c b/generic/tclScan.c index e1fcad4..7f71262 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -885,9 +885,17 @@ Tcl_ScanObjCmd( * Scan a single Unicode character. */ - string += TclUtfToUniChar(string, &sch); + offset = TclUtfToUniChar(string, &sch); + i = (int)sch; +#if TCL_UTF_MAX == 4 + if (!offset) { + offset = Tcl_UtfToUniChar(string, &sch); + i = (((i<<10) & 0x0FFC00) + 0x10000) + (sch & 0x3FF); + } +#endif + string += offset; if (!(flags & SCAN_SUPPRESS)) { - objPtr = Tcl_NewIntObj((int)sch); + objPtr = Tcl_NewIntObj(i); Tcl_IncrRefCount(objPtr); CLANG_ASSERT(objs); objs[objIndex++] = objPtr; diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 01b044e..d43cc45 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2720,7 +2720,6 @@ TclStringObjReverse( * Tcl_SetObjLength into growing the unicode rep buffer. */ - ch = 0; objPtr = Tcl_NewUnicodeObj(&ch, 1); Tcl_SetObjLength(objPtr, stringPtr->numChars); to = Tcl_GetUnicode(objPtr); @@ -2823,7 +2822,7 @@ ExtendUnicodeRepWithString( { String *stringPtr = GET_STRING(objPtr); int needed, numOrigChars = 0; - Tcl_UniChar *dst; + Tcl_UniChar *dst, unichar = 0; if (stringPtr->hasUnicode) { numOrigChars = stringPtr->numChars; @@ -2846,7 +2845,8 @@ ExtendUnicodeRepWithString( numAppendChars = 0; } for (dst=stringPtr->unicode + numOrigChars; numAppendChars-- > 0; dst++) { - bytes += TclUtfToUniChar(bytes, dst); + bytes += TclUtfToUniChar(bytes, &unichar); + *dst = unichar; } *dst = 0; } -- cgit v0.12 From 1ffeaf24efc557cfbfd2120f1871cf015e466cf2 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 10 Nov 2017 08:40:45 +0000 Subject: Make "string split" and "string is (alpha|graph|...)" work as expected with Unicode chars > U+ffff, when Tcl is compiled with TCL_UTF_MAX == 4. No effect when TCL_UTF_MAX == 3 or TCL_UTF_MAX == 6. Test-case added for "string split". --- generic/tclCmdMZ.c | 23 ++++++++++++++++++++--- tests/split.test | 3 +++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 7010495..d63a985 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -309,7 +309,7 @@ Tcl_RegexpObjCmd( eflags = 0; } else if (offset > stringLength) { eflags = TCL_REG_NOTBOL; - } else if (Tcl_GetUniChar(objPtr, offset-1) == (Tcl_UniChar)'\n') { + } else if (Tcl_GetUniChar(objPtr, offset-1) == '\n') { eflags = 0; } else { eflags = TCL_REG_NOTBOL; @@ -1080,13 +1080,22 @@ Tcl_SplitObjCmd( Tcl_InitHashTable(&charReuseTable, TCL_ONE_WORD_KEYS); for ( ; stringPtr < end; stringPtr += len) { + int fullchar; len = TclUtfToUniChar(stringPtr, &ch); + fullchar = ch; + +#if TCL_UTF_MAX == 4 + if (!len) { + len += TclUtfToUniChar(stringPtr, &ch); + fullchar = (((fullchar & 0x3ff) << 10) | (ch & 0x3ff)) + 0x10000; + } +#endif /* * Assume Tcl_UniChar is an integral type... */ - hPtr = Tcl_CreateHashEntry(&charReuseTable, INT2PTR((int) ch), + hPtr = Tcl_CreateHashEntry(&charReuseTable, INT2PTR(fullchar), &isNew); if (isNew) { TclNewStringObj(objPtr, stringPtr, len); @@ -1783,8 +1792,16 @@ StringIsCmd( } end = string1 + length1; for (; string1 < end; string1 += length2, failat++) { + int fullchar; length2 = TclUtfToUniChar(string1, &ch); - if (!chcomp(ch)) { + fullchar = ch; +#if TCL_UTF_MAX == 4 + if (!length2) { + length2 = TclUtfToUniChar(string1, &ch); + fullchar = (((fullchar & 0x3ff) << 10) | (ch & 0x3ff)) + 0x10000; + } +#endif + if (!chcomp(fullchar)) { result = 0; break; } diff --git a/tests/split.test b/tests/split.test index 778131f..18055b3 100644 --- a/tests/split.test +++ b/tests/split.test @@ -70,6 +70,9 @@ test split-1.13 {basic split commands} { test split-1.14 {basic split commands} { split ",12,,,34,56," {,} } {{} 12 {} {} 34 56 {}} +test split-1.15 {basic split commands} -body { + split "a\U01f4a9b" {} +} -result "a \U01f4a9 b" test split-2.1 {split errors} { list [catch split msg] $msg $errorCode -- cgit v0.12 From 0fc6533fcba4c33f7364f789fa22ea0793783995 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 13 Nov 2017 10:49:25 +0000 Subject: No longer mark Tcl_EvalFile() as obsolete, since it will continue to be supported in Tcl 9.0 --- generic/tcl.decls | 1 - generic/tclIOUtil.c | 1 - 2 files changed, 2 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 92ccdcf..6fbf45f 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -468,7 +468,6 @@ declare 128 { declare 129 { int Tcl_Eval(Tcl_Interp *interp, const char *script) } -# This is obsolete, use Tcl_FSEvalFile declare 130 { int Tcl_EvalFile(Tcl_Interp *interp, const char *fileName) } diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 6465931..a124406 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -254,7 +254,6 @@ Tcl_GetCwd( } } -/* Obsolete */ int Tcl_EvalFile( Tcl_Interp *interp, /* Interpreter in which to process file. */ -- cgit v0.12 From a7b6d6094829c332ba8c551876a64b0226148c93 Mon Sep 17 00:00:00 2001 From: aku Date: Mon, 13 Nov 2017 18:58:16 +0000 Subject: Ticket [5d65e65036]. My fix. Do not skip the second check for stable versions even when the main check fails. Avoided radical changes to the structure (kept single search loop, with selection after). --- generic/tclPkg.c | 91 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 33 deletions(-) diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 52f33c3..d3dd584 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -349,7 +349,7 @@ PkgRequireCore( Interp *iPtr = (Interp *) interp; Package *pkgPtr; PkgAvail *availPtr, *bestPtr, *bestStablePtr; - char *availVersion, *bestVersion; + char *availVersion, *bestVersion, *bestStableVersion; /* Internal rep. of versions */ int availStable, code, satisfies, pass; char *script, *pkgVersionI; @@ -395,6 +395,7 @@ PkgRequireCore( bestPtr = NULL; bestStablePtr = NULL; bestVersion = NULL; + bestStableVersion = NULL; for (availPtr = pkgPtr->availPtr; availPtr != NULL; availPtr = availPtr->nextPtr) { @@ -408,58 +409,82 @@ PkgRequireCore( continue; } - + + /* Check satisfaction of requirements before considering the current version further. */ + if (reqc > 0) { + satisfies = SomeRequirementSatisfied(availVersion, reqc, reqv); + if (!satisfies) { + ckfree(availVersion); + availVersion = NULL; + continue; + } + } + if (bestPtr != NULL) { int res = CompareVersions(availVersion, bestVersion, NULL); /* - * Note: Use internal reps! + * Note: Used internal reps in the comparison! */ - if (res <= 0) { + if (res > 0) { /* - * The version of the package sought is not as good as the - * currently selected version. Ignore it. + * The version of the package sought is better than the + * currently selected version. */ - - ckfree(availVersion); - availVersion = NULL; - continue; + goto newbest; } - } - - /* We have found a version which is better than our max. */ - - if (reqc > 0) { - /* Check satisfaction of requirements. */ + } else { + newbest: + /* We have found a version which is better than our max. */ - satisfies = SomeRequirementSatisfied(availVersion, reqc, reqv); - if (!satisfies) { - ckfree(availVersion); - availVersion = NULL; - continue; - } + bestPtr = availPtr; + CheckVersionAndConvert(interp, bestPtr->version, &bestVersion, NULL); } - bestPtr = availPtr; - - if (bestVersion != NULL) { - ckfree(bestVersion); + if (!availStable) { + ckfree(availVersion); + availVersion = NULL; + continue; } - bestVersion = availVersion; - /* - * If this new best version is stable then it also has to be - * better than the max stable version found so far. - */ + if (bestStablePtr != NULL) { + int res = CompareVersions(availVersion, bestStableVersion, NULL); + + /* + * Note: Used internal reps in the comparison! + */ - if (availStable) { + if (res > 0) { + /* + * This stable version of the package sought is better + * than the currently selected stable version. + */ + goto newstable; + } + } else { + newstable: + /* We have found a stable version which is better than our max stable. */ bestStablePtr = availPtr; + CheckVersionAndConvert(interp, bestStablePtr->version, &bestStableVersion, NULL); } - } + ckfree(availVersion); + availVersion = NULL; + } /* end for */ + + /* + * Clean up memorized internal reps, if any. + */ + if (bestVersion != NULL) { ckfree(bestVersion); + bestVersion = NULL; + } + + if (bestStableVersion != NULL) { + ckfree(bestStableVersion); + bestStableVersion = NULL; } /* -- cgit v0.12 From 59ebc49f0f9163be7bcbd33b23e6eae865540ab4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 15 Nov 2017 08:54:13 +0000 Subject: Change signature of (internal) TclScanElement() function. This saves memory allocation and the possibility for panic's in dict and list handling, requiring 1/4 of memory for internal allocation of temporary storage. No change to external API. --- generic/tclDictObj.c | 9 +++------ generic/tclIndexObj.c | 3 ++- generic/tclInt.h | 2 +- generic/tclListObj.c | 6 +++--- generic/tclUtil.c | 27 ++++++--------------------- 5 files changed, 15 insertions(+), 32 deletions(-) diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index d15255f..2eff1ff 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -487,15 +487,14 @@ static void UpdateStringOfDict( Tcl_Obj *dictPtr) { -#define LOCAL_SIZE 20 - int localFlags[LOCAL_SIZE], *flagPtr = NULL; +#define LOCAL_SIZE 64 + char localFlags[LOCAL_SIZE], *flagPtr = NULL; Dict *dict = DICT(dictPtr); ChainEntry *cPtr; Tcl_Obj *keyPtr, *valuePtr; int i, length, bytesNeeded = 0; const char *elem; char *dst; - const int maxFlags = UINT_MAX / sizeof(int); /* * This field is the most useful one in the whole hash structure, and it @@ -517,10 +516,8 @@ UpdateStringOfDict( if (numElems <= LOCAL_SIZE) { flagPtr = localFlags; - } else if (numElems > maxFlags) { - Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } else { - flagPtr = ckalloc(numElems * sizeof(int)); + flagPtr = ckalloc(numElems); } for (i=0,cPtr=dict->entryChainHead; inextPtr) { /* diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 0e0ddc9..30c33f1 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -878,7 +878,8 @@ Tcl_WrongNumArgs( * NULL. */ { Tcl_Obj *objPtr; - int i, len, elemLen, flags; + int i, len, elemLen; + char flags; Interp *iPtr = (Interp *) interp; const char *elementStr; diff --git a/generic/tclInt.h b/generic/tclInt.h index 1908e32..91c8b96 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3106,7 +3106,7 @@ MODULE_SCOPE int TclReToGlob(Tcl_Interp *interp, const char *reStr, int reStrLen, Tcl_DString *dsPtr, int *flagsPtr, int *quantifiersFoundPtr); MODULE_SCOPE int TclScanElement(const char *string, int length, - int *flagPtr); + char *flagPtr); MODULE_SCOPE void TclSetBgErrorHandler(Tcl_Interp *interp, Tcl_Obj *cmdPrefix); MODULE_SCOPE void TclSetBignumIntRep(Tcl_Obj *objPtr, diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 344d0fd..3a1555d 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -1957,8 +1957,8 @@ static void UpdateStringOfList( Tcl_Obj *listPtr) /* List object with string rep to update. */ { -# define LOCAL_SIZE 20 - int localFlags[LOCAL_SIZE], *flagPtr = NULL; +# define LOCAL_SIZE 64 + char localFlags[LOCAL_SIZE], *flagPtr = NULL; List *listRepPtr = ListRepPtr(listPtr); int numElems = listRepPtr->elemCount; int i, length, bytesNeeded = 0; @@ -1995,7 +1995,7 @@ UpdateStringOfList( * We know numElems <= LIST_MAX, so this is safe. */ - flagPtr = ckalloc(numElems * sizeof(int)); + flagPtr = ckalloc(numElems); } elemPtrs = &listRepPtr->elements; for (i = 0; i < numElems; i++) { diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 0eddb00..feee9c5 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -974,7 +974,7 @@ Tcl_ScanCountedElement( int *flagPtr) /* Where to store information to guide * Tcl_ConvertElement. */ { - int flags = CONVERT_ANY; + char flags = CONVERT_ANY; int numBytes = TclScanElement(src, length, &flags); *flagPtr = flags; @@ -1015,7 +1015,7 @@ int TclScanElement( const char *src, /* String to convert to Tcl list element. */ int length, /* Number of bytes in src, or -1. */ - int *flagPtr) /* Where to store information to guide + char *flagPtr) /* Where to store information to guide * Tcl_ConvertElement. */ { const char *p = src; @@ -1547,11 +1547,10 @@ Tcl_Merge( int argc, /* How many strings to merge. */ const char *const *argv) /* Array of string values. */ { -#define LOCAL_SIZE 20 - int localFlags[LOCAL_SIZE], *flagPtr = NULL; +#define LOCAL_SIZE 64 + char localFlags[LOCAL_SIZE], *flagPtr = NULL; int i, bytesNeeded = 0; char *result, *dst; - const int maxFlags = UINT_MAX / sizeof(int); /* * Handle empty list case first, so logic of the general case can be @@ -1570,22 +1569,8 @@ Tcl_Merge( if (argc <= LOCAL_SIZE) { flagPtr = localFlags; - } else if (argc > maxFlags) { - /* - * We cannot allocate a large enough flag array to format this list in - * one pass. We could imagine converting this routine to a multi-pass - * implementation, but for sizeof(int) == 4, the limit is a max of - * 2^30 list elements and since each element is at least one byte - * formatted, and requires one byte space between it and the next one, - * that a minimum space requirement of 2^31 bytes, which is already - * INT_MAX. If we tried to format a list of > maxFlags elements, we're - * just going to overflow the size limits on the formatted string - * anyway, so just issue that same panic early. - */ - - Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } else { - flagPtr = ckalloc(argc * sizeof(int)); + flagPtr = ckalloc(argc); } for (i = 0; i < argc; i++) { flagPtr[i] = ( i ? TCL_DONT_QUOTE_HASH : 0 ); @@ -2717,7 +2702,7 @@ Tcl_DStringAppendElement( { char *dst = dsPtr->string + dsPtr->length; int needSpace = TclNeedSpace(dsPtr->string, dst); - int flags = needSpace ? TCL_DONT_QUOTE_HASH : 0; + char flags = needSpace ? TCL_DONT_QUOTE_HASH : 0; int newSize = dsPtr->length + needSpace + TclScanElement(element, -1, &flags); -- cgit v0.12 From 65007a4d02a35e26d92288bc5a20aa1bfde3696e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2017 08:39:41 +0000 Subject: No longer document (even though it's only in an example) that Tcl_SavedResult is a struct, and that the internal representation of an int is stored in the object's internalRep.longValue member. That might no longer be true in the future. --- doc/Object.3 | 6 +++--- doc/SaveResult.3 | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/Object.3 b/doc/Object.3 index 4df6c1a..a7e06c8 100644 --- a/doc/Object.3 +++ b/doc/Object.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tcl_Obj 3 8.5 Tcl "Tcl Library Procedures" .so man.macros .BS @@ -94,7 +94,7 @@ Also, most Tcl values are only read and never modified. This is especially true for procedure arguments, which can be shared between the caller and the called procedure. Assignment and argument binding is done by -simply assigning a pointer to the value. +simply assigning a pointer to the value. Reference counting is used to determine when it is safe to reclaim an object's storage. .PP @@ -249,7 +249,7 @@ The \fBincr\fR command first gets an integer from \fIx\fR's object by calling \fBTcl_GetIntFromObj\fR. This procedure checks whether the object is already an integer object. Since it is not, it converts the object -by setting the object's \fIinternalRep.longValue\fR member +by setting the object's internal representation to the integer \fB123\fR and setting the object's \fItypePtr\fR to point to the integer Tcl_ObjType structure. diff --git a/doc/SaveResult.3 b/doc/SaveResult.3 index 74da9f4..0a2ee51 100644 --- a/doc/SaveResult.3 +++ b/doc/SaveResult.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tcl_SaveResult 3 8.1 Tcl "Tcl Library Procedures" .so man.macros .BS @@ -56,9 +56,9 @@ is called, Tcl will take care of memory management. .PP The second triplet stores the snapshot of only the interpreter result (not its complete state) in memory allocated by the caller. -These routines are passed a pointer to a \fBTcl_SavedResult\fR structure +These routines are passed a pointer to \fBTcl_SavedResult\fR that is used to store enough information to restore the interpreter result. -This structure can be allocated on the stack of the calling +\fBTcl_SavedResult\fR can be allocated on the stack of the calling procedure. These routines do not save the state of any error information in the interpreter (e.g. the \fB\-errorcode\fR or \fB\-errorinfo\fR return options, when an error is in progress). @@ -69,7 +69,7 @@ a superset of the functions provided by the other routines, any new code should only make use of the more powerful routines. The older, weaker routines \fBTcl_SaveResult\fR, \fBTcl_RestoreResult\fR, and \fBTcl_DiscardResult\fR continue to exist only for the sake -of existing programs that may already be using them. +of existing programs that may already be using them. .PP \fBTcl_SaveInterpState\fR takes a snapshot of those portions of interpreter state that make up the full result of script evaluation. @@ -118,7 +118,6 @@ uninitialized state and cannot be used until another call to Once \fBTcl_SaveResult\fR is called to save the interpreter result, either \fBTcl_RestoreResult\fR or \fBTcl_DiscardResult\fR must be called to properly clean up the -memory associated with the saved state. - +memory associated with the saved state. .SH KEYWORDS result, state, interp -- cgit v0.12