summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-11-17 11:27:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-11-17 11:27:13 (GMT)
commita27501598a341435dbc5b32bbbfb3635aebff956 (patch)
tree3ce1d60f74e3c947e5a6aac865eb48d9dde0f6d4
parent5560b9198b6cdd785cf9d82301a7fff87c0c8c1f (diff)
parent24d7fa64015b310278717d5f2462d84b7f7cd124 (diff)
downloadtcl-a27501598a341435dbc5b32bbbfb3635aebff956.zip
tcl-a27501598a341435dbc5b32bbbfb3635aebff956.tar.gz
tcl-a27501598a341435dbc5b32bbbfb3635aebff956.tar.bz2
merge core-8-6-branch
-rw-r--r--.fossil-settings/crlf-glob3
-rw-r--r--.fossil-settings/crnl-glob3
-rw-r--r--.fossil-settings/ignore-glob3
-rw-r--r--README2
-rw-r--r--changes100
-rw-r--r--doc/Object.32
-rw-r--r--doc/SaveResult.34
-rw-r--r--generic/tcl.decls1
-rw-r--r--generic/tcl.h4
-rw-r--r--generic/tclBasic.c166
-rw-r--r--generic/tclBinary.c6
-rw-r--r--generic/tclCmdIL.c2
-rw-r--r--generic/tclCmdMZ.c33
-rw-r--r--generic/tclCompExpr.c2
-rw-r--r--generic/tclDictObj.c9
-rw-r--r--generic/tclEncoding.c24
-rw-r--r--generic/tclEnv.c1
-rw-r--r--generic/tclHash.c13
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclIORChan.c4
-rw-r--r--generic/tclIOUtil.c5
-rw-r--r--generic/tclIndexObj.c3
-rw-r--r--generic/tclInt.h20
-rw-r--r--generic/tclListObj.c6
-rw-r--r--generic/tclLoad.c2
-rw-r--r--generic/tclOO.c5
-rw-r--r--generic/tclOOCall.c75
-rw-r--r--generic/tclOOMethod.c1
-rw-r--r--generic/tclObj.c18
-rw-r--r--generic/tclPanic.c2
-rw-r--r--generic/tclParse.c2
-rw-r--r--generic/tclPipe.c8
-rw-r--r--generic/tclPkg.c93
-rw-r--r--generic/tclRegexp.c15
-rw-r--r--generic/tclScan.c18
-rw-r--r--generic/tclStringObj.c10
-rw-r--r--generic/tclUtf.c78
-rw-r--r--generic/tclUtil.c29
-rw-r--r--library/http/http.tcl3
-rw-r--r--library/http/pkgIndex.tcl2
-rw-r--r--library/init.tcl4
-rw-r--r--library/msgcat/msgcat.tcl2
-rw-r--r--library/msgcat/pkgIndex.tcl4
-rw-r--r--library/tcltest/pkgIndex.tcl2
-rw-r--r--library/tcltest/tcltest.tcl2
-rw-r--r--library/tzdata/Africa/Juba40
-rw-r--r--library/tzdata/Africa/Khartoum1
-rw-r--r--library/tzdata/Africa/Windhoek169
-rw-r--r--library/tzdata/America/Adak4
-rw-r--r--library/tzdata/America/Anchorage2
-rw-r--r--library/tzdata/America/Detroit2
-rw-r--r--library/tzdata/America/Grand_Turk164
-rw-r--r--library/tzdata/America/Juneau2
-rw-r--r--library/tzdata/America/Metlakatla2
-rw-r--r--library/tzdata/America/Nome4
-rw-r--r--library/tzdata/America/Sitka2
-rw-r--r--library/tzdata/America/Yakutat2
-rw-r--r--library/tzdata/Asia/Famagusta165
-rw-r--r--library/tzdata/Asia/Kolkata6
-rw-r--r--library/tzdata/Asia/Yangon6
-rw-r--r--library/tzdata/Asia/Yerevan1
-rw-r--r--library/tzdata/Europe/Dublin6
-rw-r--r--library/tzdata/Pacific/Apia2
-rw-r--r--library/tzdata/Pacific/Fiji24
-rw-r--r--library/tzdata/Pacific/Pago_Pago2
-rw-r--r--library/tzdata/Pacific/Tongatapu165
-rw-r--r--tests/assemble.test2
-rw-r--r--tests/basic.test15
-rw-r--r--tests/clock.test27
-rw-r--r--tests/cmdAH.test8
-rw-r--r--tests/encoding.test8
-rw-r--r--tests/exec.test8
-rw-r--r--tests/execute.test6
-rw-r--r--tests/oo.test35
-rw-r--r--tests/package.test10
-rw-r--r--tests/platform.test4
-rw-r--r--tests/resolver.test9
-rw-r--r--tests/set-old.test7
-rw-r--r--tests/split.test3
-rw-r--r--tests/string.test26
-rw-r--r--tests/utf.test4
-rw-r--r--unix/Makefile.in12
-rwxr-xr-xunix/configure2
-rw-r--r--unix/configure.in2
-rw-r--r--unix/tcl.spec2
-rw-r--r--unix/tclLoadDyld.c2
-rw-r--r--unix/tclUnixPort.h8
-rw-r--r--unix/tclUnixSock.c299
-rw-r--r--win/Makefile.in12
-rwxr-xr-xwin/configure2
-rw-r--r--win/configure.in2
-rw-r--r--win/nmakehlp.c2
-rw-r--r--win/rules.vc11
-rw-r--r--win/tclWin32Dll.c4
-rw-r--r--win/tclWinFile.c2
-rw-r--r--win/tclWinLoad.c38
-rw-r--r--win/tclWinPipe.c2
97 files changed, 1302 insertions, 836 deletions
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
diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob
index c85b488..d5c9a1e 100644
--- a/.fossil-settings/ignore-glob
+++ b/.fossil-settings/ignore-glob
@@ -44,5 +44,4 @@ unix/pkgs/*
win/Debug*
win/Release*
win/pkgs/*
-win/tcl.hpj
-win/nmhlp-out.txt
+win/tcl.hpjwin/nmhlp-out.txt
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/changes b/changes
index 034380b..d4be350 100644
--- a/changes
+++ b/changes
@@ -8698,3 +8698,103 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
2016-07-20 tzdata updated to Olson's tzdata2016f (venkat)
--- Released 8.6.6, July 27, 2016 --- http://core.tcl.tk/tcl/ for details
+
+2016-09-07 (bug)[c09edf] Bad caching with custom resolver (neumann,nijtmans)
+
+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)
+
+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) 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)
+
+2017-04-18 (bug)[bc4322] http package support for safe interps (nash,nijtmans)
+
+2017-04-28 (bug)[f34cf8] [file join a //b] => /b (neumann,porter)
+
+2017-05-01 (bug)[8bd13f] Windows threads and pipes (sebres,nijtmans)
+
+2017-05-01 (bug)[f9fe90] [file join //a b] EIAS violation (aspect,porter)
+
+2017-05-04 (bug) Make test filesystem-1.52 pass on Windows (nijtmans)
+
+2017-05-05 (bug)[601522] [binary] field spec overflow -> segfault (porter)
+
+2017-05-08 (bug)[6ca52a] http memleak handling keep-alive (aspect,nijtmans)
+=> http 2.8.11
+
+2017-05-29 (bug)[a3fb33] crash in [lsort] on long lists (sebres)
+
+2017-06-05 (bug)[67aa9a] Tcl_UtfToUniChar() revised handling invalid UTF-8 (nijtmans)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+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)
+
+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 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/doc/Object.3 b/doc/Object.3
index bf80fe2..eadd041 100644
--- a/doc/Object.3
+++ b/doc/Object.3
@@ -257,7 +257,7 @@ The \fBincr\fR command first gets an integer from \fIx\fR's value
by calling \fBTcl_GetIntFromObj\fR.
This procedure checks whether the value is already an integer value.
Since it is not, it converts the value
-by setting the value's \fIinternalRep.longValue\fR member
+by setting the value's internal representation
to the integer \fB123\fR
and setting the value's \fItypePtr\fR
to point to the integer Tcl_ObjType structure.
diff --git a/doc/SaveResult.3 b/doc/SaveResult.3
index b2270a2..6dd6cb6 100644
--- a/doc/SaveResult.3
+++ b/doc/SaveResult.3
@@ -54,9 +54,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).
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 574b49b..db1f892 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -469,7 +469,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/tcl.h b/generic/tcl.h
index 759f824..a35dd5d 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/generic/tclBasic.c b/generic/tclBasic.c
index 14d67f6..acdcf41 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -2042,11 +2042,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) {
@@ -2059,32 +2059,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.
+ */
+
+ 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);
- hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
- if (!isNew) {
/*
- * 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;
@@ -2097,18 +2117,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(Tcl_GetHashValue(hPtr));
+ }
+
+ if (!deleted) {
- ckfree(Tcl_GetHashValue(hPtr));
- }
- } else {
/*
* Command resolvers (per-interp, per-namespace) might have resolved
* to a command for the given namespace scope with this command not
@@ -2156,7 +2179,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;
@@ -2217,11 +2240,11 @@ 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;
+ int isNew = 0, deleted = 0;
ImportedCmdData *dataPtr;
if (iPtr->flags & DELETED) {
@@ -2234,28 +2257,44 @@ Tcl_CreateObjCommand(
}
/*
- * 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,
+ 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.
+ */
+
+ 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;
- }
+ if ((nsPtr == NULL) || (tail == NULL)) {
+ return (Tcl_Command) NULL;
+ }
+ } else {
+ nsPtr = iPtr->globalNsPtr;
+ tail = cmdName;
+ }
- hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
- TclInvalidateNsPath(nsPtr);
- if (!isNew) {
- cmdPtr = Tcl_GetHashValue(hPtr);
+ hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
- /* Command already exists. */
+ 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);
/*
* [***] This is wrong. See Tcl Bug a16752c252.
@@ -2293,18 +2332,20 @@ Tcl_CreateObjCommand(
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(Tcl_GetHashValue(hPtr));
- }
- } else {
+ ckfree(Tcl_GetHashValue(hPtr));
+ }
+
+ if (!deleted) {
/*
* Command resolvers (per-interp, per-namespace) might have resolved
* to a command for the given namespace scope with this command not
@@ -2324,6 +2365,7 @@ Tcl_CreateObjCommand(
*/
TclInvalidateNsCmdLookup(nsPtr);
+ TclInvalidateNsPath(nsPtr);
}
cmdPtr = ckalloc(sizeof(Command));
Tcl_SetHashValue(hPtr, cmdPtr);
@@ -2351,7 +2393,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;
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..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;
@@ -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;
@@ -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);
@@ -1122,7 +1131,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 +1460,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;
@@ -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;
}
@@ -2436,7 +2453,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 +2514,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/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; i<numElems; i+=2,cPtr=cPtr->nextPtr) {
/*
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index b4acb5f..2548b73 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;
@@ -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.
*/
@@ -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))) {
/*
@@ -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.
*/
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/generic/tclHash.c b/generic/tclHash.c
index 1991aea..7e8961d 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -1014,12 +1014,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 > (int)(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) {
@@ -1031,9 +1037,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.
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);
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(
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index e00b9ac..19620e7 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -412,7 +412,6 @@ Tcl_GetCwd(
return Tcl_DStringValue(cwdPtr);
}
-/* Obsolete */
int
Tcl_EvalFile(
Tcl_Interp *interp, /* Interpreter in which to process file. */
@@ -1762,7 +1761,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 +1895,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
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 2f830cc..91c8b96 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
/*
@@ -3098,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/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/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;
}
/*
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index ac0b94d..3e4f561 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,60 @@ 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;
+ }
+
+ 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) {
int isWanted = (!(flags & PUBLIC_METHOD)
@@ -640,7 +676,8 @@ AddClassMethodNames(
int i;
FOREACH(superPtr, clsPtr->superclasses) {
- AddClassMethodNames(superPtr, flags, namesPtr);
+ AddClassMethodNames(superPtr, flags, namesPtr,
+ examinedClassesPtr);
}
}
}
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/generic/tclObj.c b/generic/tclObj.c
index a346987..3bf5b8e 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -4488,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,
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/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/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/generic/tclPkg.c b/generic/tclPkg.c
index f6e8b20..975c85c 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -352,7 +352,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;
@@ -400,6 +400,7 @@ PkgRequireCore(
bestPtr = NULL;
bestStablePtr = NULL;
bestVersion = NULL;
+ bestStableVersion = NULL;
for (availPtr = pkgPtr->availPtr; availPtr != NULL;
availPtr = availPtr->nextPtr) {
@@ -413,60 +414,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;
}
/*
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/generic/tclScan.c b/generic/tclScan.c
index 17069eb..7f71262 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;
@@ -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];
@@ -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
@@ -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 c84b500..d43cc45 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;
int step = TclUtfToUniChar(format, &ch);
format += step;
@@ -2692,7 +2692,7 @@ TclStringObjReverse(
Tcl_Obj *objPtr)
{
String *stringPtr;
- Tcl_UniChar ch;
+ Tcl_UniChar ch = 0;
if (TclIsPureByteArray(objPtr)) {
int numBytes;
@@ -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;
}
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index b8b867c..3b39226 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -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,10 +461,7 @@ Tcl_UtfCharComplete(
* a complete UTF-8 character. */
int length) /* Length of above string in bytes. */
{
- int ch;
-
- ch = *((unsigned char *) src);
- return length >= totalBytes[ch];
+ return length >= totalBytes[(unsigned char)*src];
}
/*
@@ -464,8 +488,8 @@ Tcl_NumUtfChars(
int length) /* The length of the string in bytes, or -1
* for strlen(string). */
{
- Tcl_UniChar ch;
- register int i;
+ Tcl_UniChar ch = 0;
+ register int i = 0;
/*
* The separate implementations are faster.
@@ -474,7 +498,6 @@ Tcl_NumUtfChars(
* single-byte char case specially.
*/
- i = 0;
if (length < 0) {
while (*src != '\0') {
src += TclUtfToUniChar(src, &ch);
@@ -525,7 +548,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);
@@ -564,7 +587,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;
@@ -604,9 +627,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;
}
/*
@@ -639,8 +668,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) {
@@ -713,7 +741,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--;
@@ -797,7 +825,7 @@ int
Tcl_UtfToUpper(
char *str) /* String to convert in place. */
{
- Tcl_UniChar ch, upChar;
+ Tcl_UniChar ch = 0, upChar;
char *src, *dst;
int bytes;
@@ -850,7 +878,7 @@ int
Tcl_UtfToLower(
char *str) /* String to convert in place. */
{
- Tcl_UniChar ch, lowChar;
+ Tcl_UniChar ch = 0, lowChar;
char *src, *dst;
int bytes;
@@ -904,7 +932,7 @@ int
Tcl_UtfToTitle(
char *str) /* String to convert in place. */
{
- Tcl_UniChar ch, titleChar, lowChar;
+ Tcl_UniChar ch = 0, titleChar, lowChar;
char *src, *dst;
int bytes;
@@ -1013,7 +1041,7 @@ Tcl_UtfNcmp(
const char *ct, /* UTF string cs is compared to. */
unsigned long numChars) /* Number of UTF chars to compare. */
{
- Tcl_UniChar ch1, ch2;
+ Tcl_UniChar ch1 = 0, ch2 = 0;
/*
* Cannot use 'memcmp(cs, ct, n);' as byte representation of \u0000 (the
@@ -1061,7 +1089,7 @@ Tcl_UtfNcasecmp(
const char *ct, /* UTF string cs is compared to. */
unsigned long numChars) /* Number of UTF chars to compare. */
{
- Tcl_UniChar ch1, ch2;
+ Tcl_UniChar ch1 = 0, ch2 = 0;
while (numChars-- > 0) {
/*
* n must be interpreted as chars, not bytes.
@@ -1690,7 +1718,7 @@ Tcl_UniCharCaseMatch(
* characters. */
int nocase) /* 0 for case sensitive, 1 for insensitive */
{
- Tcl_UniChar ch1, p;
+ Tcl_UniChar ch1 = 0, p;
while (1) {
p = *uniPattern;
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 553593c..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 );
@@ -1646,7 +1631,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);
@@ -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);
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 0350808..9f5310b 100644
--- 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
index a0d28f1..d3fc7af 100644
--- 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/library/init.tcl b/library/init.tcl
index 6173b86..c31eea3 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:
@@ -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.
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..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}
-package ifneeded msgcat 1.6.0 [list source [file join $dir msgcat.tcl]]
+if {![package vsatisfies [package provide Tcl] 8.5-]} {return}
+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/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}
}
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/basic.test b/tests/basic.test
index 1a0037c..7ff0669 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -224,6 +224,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} {
} {}
diff --git a/tests/clock.test b/tests/clock.test
index b1afa39..4ec4db2 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
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 3c58c1b..e334dff 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -188,7 +188,7 @@ test cmdAH-4.5 {Tcl_EncodingObjCmd} -setup {
test cmdAH-4.6 {Tcl_EncodingObjCmd} -setup {
set system [encoding system]
} -body {
- encoding system identity
+ encoding system iso8859-1
encoding convertto jis0208 \u4e4e
} -cleanup {
encoding system $system
@@ -210,7 +210,7 @@ test cmdAH-4.9 {Tcl_EncodingObjCmd} -setup {
test cmdAH-4.10 {Tcl_EncodingObjCmd} -setup {
set system [encoding system]
} -body {
- encoding system identity
+ encoding system iso8859-1
encoding convertfrom jis0208 8C
} -cleanup {
encoding system $system
@@ -224,11 +224,11 @@ test cmdAH-4.12 {Tcl_EncodingObjCmd} -returnCodes error -body {
test cmdAH-4.13 {Tcl_EncodingObjCmd} -setup {
set system [encoding system]
} -body {
- encoding system identity
+ encoding system iso8859-1
encoding system
} -cleanup {
encoding system $system
-} -result identity
+} -result iso8859-1
test cmdAH-5.1 {Tcl_FileObjCmd} -returnCodes error -body {
file
diff --git a/tests/encoding.test b/tests/encoding.test
index 5b3c3e1..ed0e6a4 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -75,11 +75,11 @@ test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} -setup {
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 ;# Shimmer away any cache of Tcl_Encoding
lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg
} -cleanup {
- encoding system identity
+ encoding system iso8859-1
encoding dirs $path
encoding system $system
} -result "\u008c\u00c1 1 {unknown encoding \"shiftjis\"}"
@@ -136,7 +136,7 @@ test encoding-5.1 {Tcl_SetSystemEncoding} -setup {
encoding system jis0208
encoding convertto \u4e4e
} -cleanup {
- encoding system identity
+ encoding system iso8859-1
encoding system $old
} -result {8C}
test encoding-5.2 {Tcl_SetSystemEncoding: test ref count} {
@@ -259,7 +259,7 @@ test encoding-11.5.1 {LoadEncodingFile: escape file} {
test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding} -setup {
set system [encoding system]
set path [encoding dirs]
- encoding system identity
+ encoding system iso8859-1
} -body {
cd [temporaryDirectory]
encoding dirs [file join tmp encoding]
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
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/oo.test b/tests/oo.test
index 5eaa8bf..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
@@ -3799,7 +3810,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 1a56550e96: introspectors must traverse mixin links correctly} -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
diff --git a/tests/package.test b/tests/package.test
index da778f1..74415ae 100644
--- a/tests/package.test
+++ b/tests/package.test
@@ -599,6 +599,16 @@ test package-3.52 {Tcl_PkgRequire procedure, picking best stable version} -setup
package require t
return $x
} -result {1.3}
+test pkg-3.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 package-4.1 {Tcl_PackageCmd procedure} -returnCodes error -body {
package
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]]
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
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
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
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}
diff --git a/unix/Makefile.in b/unix/Makefile.in
index fe9ca40..4814ee0 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -840,17 +840,17 @@ 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 \
$(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/unix/configure b/unix/configure
index 3e3b4c4..39076a4 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/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 <mach-o/dyld.h>
#include <mach-o/fat.h>
#include <mach-o/swap.h>
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 <sys/select.h>
#endif
#include <sys/stat.h>
-#if TIME_WITH_SYS_TIME
+#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
-#if HAVE_SYS_TIME_H
+#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#else
# include <time.h>
@@ -138,11 +138,11 @@ typedef off_t Tcl_SeekOffset;
#ifndef NO_SYS_WAIT_H
# include <sys/wait.h>
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#include <limits.h>
-#if HAVE_STDINT_H
+#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_UNISTD_H
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index b9b6b53..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,6 +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)
@@ -713,16 +722,16 @@ 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);
}
+#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");
diff --git a/win/Makefile.in b/win/Makefile.in
index 71df19a..633a9f5 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -651,17 +651,17 @@ 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 \
$(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";
diff --git a/win/configure b/win/configure
index 85dc0ba..1480a57 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 b478d1e..0229e83 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
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 42034c6..0439d1c 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -160,7 +160,7 @@ main(
return 0;
} else
return 1; /* Version not found. Return non-0 exit code */
-
+
case 'Q':
if (argc != 3) {
chars = snprintf(msg, sizeof(msg) - 1,
diff --git a/win/rules.vc b/win/rules.vc
index 425f873..1351455 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1311,6 +1311,13 @@ cwarn = $(WARNINGS)
cwarn = $(cwarn) -wd4311 -wd4312
!endif
+### Common compiler options that are architecture specific
+!if "$(MACHINE)" == "ARM"
+carch = -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
+!else
+carch =
+!endif
+
!if $(DEBUG)
# Turn warnings into errors
cwarn = $(cwarn) -WX
@@ -1326,7 +1333,7 @@ INCLUDES = $(INCLUDES) -I"$(GENERICDIR)" -I"$(WINDIR)" -I"$(COMPATDIR)"
# post-reform build logs
# cflags contains generic flags used for building practically all object files
-cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\ $(cdebug)
+cflags = -nologo -c $(COMPILERFLAGS) $(carch) $(cwarn) -Fp$(TMP_DIR)^\ $(cdebug)
# appcflags contains $(cflags) and flags for building the application
# object files (e.g. tclsh, or wish) pkgcflags contains $(cflags) plus
@@ -1494,6 +1501,8 @@ default-clean:
@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
@if exist $(WINDIR)\nmakehlp.out del $(WINDIR)\nmakehlp.out
+ @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, vercl.i ...
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/tclWinLoad.c b/win/tclWinLoad.c
index 26512b1..2946ea2 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -63,9 +63,10 @@ TclpDlopen(
* file. */
int flags)
{
- HINSTANCE hInstance;
+ HINSTANCE hInstance = NULL;
const TCHAR *nativeName;
Tcl_LoadHandle handlePtr;
+ DWORD firstError;
/*
* First try the full path the user gave us. This is particularly
@@ -74,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
@@ -84,6 +88,13 @@ TclpDlopen(
Tcl_DString ds;
+ /*
+ * Remember the first error on load attempt to be used if the
+ * second load attempt below also fails.
+ */
+ firstError = (nativeName == NULL) ?
+ ERROR_MOD_NOT_FOUND : GetLastError();
+
nativeName = Tcl_WinUtfToTChar(Tcl_GetString(pathPtr), -1, &ds);
hInstance = LoadLibraryEx(nativeName, NULL,
LOAD_WITH_ALTERED_SEARCH_PATH);
@@ -91,8 +102,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 +153,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);
}
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);