summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-10-03 08:11:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-10-03 08:11:48 (GMT)
commitd7fd32ebdc04976287c78247d664efa442b3c5fe (patch)
tree15adf3c75d8eed679221308126e83de6e2bfb15d
parent948410d3929a4818d0fe0c6b7dfd918e4a98f35f (diff)
parent301282088d6b7961c502f111c171db6e6a341ab9 (diff)
downloadtcl-d7fd32ebdc04976287c78247d664efa442b3c5fe.zip
tcl-d7fd32ebdc04976287c78247d664efa442b3c5fe.tar.gz
tcl-d7fd32ebdc04976287c78247d664efa442b3c5fe.tar.bz2
merge trunk
-rw-r--r--ChangeLog97
-rw-r--r--README2
-rw-r--r--changes16
-rw-r--r--compat/zlib/win32/zdll.libbin13438 -> 15256 bytes
-rw-r--r--compat/zlib/win64/zdll.libbin0 -> 14896 bytes
-rw-r--r--compat/zlib/win64/zlib1.dllbin0 -> 112640 bytes
-rw-r--r--doc/dde.n17
-rw-r--r--doc/define.n2
-rw-r--r--doc/msgcat.n34
-rw-r--r--doc/trace.n2
-rw-r--r--generic/tcl.h18
-rw-r--r--generic/tclBinary.c14
-rw-r--r--generic/tclIOSock.c15
-rw-r--r--generic/tclInt.h8
-rw-r--r--generic/tclIntPlatDecls.h5
-rw-r--r--generic/tclMain.c4
-rw-r--r--generic/tclOO.c2
-rw-r--r--generic/tclOO.h5
-rw-r--r--generic/tclOOBasic.c2
-rw-r--r--generic/tclOOCall.c2
-rw-r--r--generic/tclOODefineCmds.c2
-rw-r--r--generic/tclOOInfo.c2
-rw-r--r--generic/tclOOInt.h2
-rw-r--r--generic/tclOOMethod.c2
-rw-r--r--generic/tclPathObj.c9
-rw-r--r--generic/tclStubInit.c23
-rw-r--r--library/dde/pkgIndex.tcl4
-rw-r--r--library/init.tcl2
-rw-r--r--library/msgcat/msgcat.tcl82
-rw-r--r--library/msgcat/pkgIndex.tcl2
-rwxr-xr-xlibrary/msgs/uk.msg2
-rw-r--r--pkgs/README58
-rw-r--r--tests/fileSystem.test4
-rw-r--r--tests/ioTrans.test12
-rw-r--r--tests/msgcat.test50
-rw-r--r--tests/oo.test4
-rw-r--r--tests/ooNext2.test10
-rw-r--r--tests/thread.test2
-rw-r--r--tests/winDde.test8
-rw-r--r--tools/tcl.wse.in2
-rw-r--r--unix/Makefile.in4
-rwxr-xr-xunix/configure11
-rw-r--r--unix/configure.in7
-rw-r--r--unix/tcl.m44
-rw-r--r--unix/tcl.spec2
-rw-r--r--unix/tclConfig.h.in39
-rw-r--r--unix/tclLoadDl.c8
-rw-r--r--unix/tclUnixCompat.c16
-rw-r--r--unix/tclooConfig.sh2
-rw-r--r--win/Makefile.in18
-rwxr-xr-xwin/buildall.vc.bat41
-rwxr-xr-xwin/configure23
-rw-r--r--win/configure.in12
-rw-r--r--win/makefile.vc4
-rw-r--r--win/nmakehlp.c19
-rw-r--r--win/rules.vc26
-rw-r--r--win/tclAppInit.c30
-rw-r--r--win/tclWinDde.c69
-rw-r--r--win/tclWinFCmd.c4
-rw-r--r--win/tclWinFile.c2
-rw-r--r--win/tclWinPort.h1
-rw-r--r--win/tclWinSock.c22
-rw-r--r--win/tclooConfig.sh2
63 files changed, 604 insertions, 289 deletions
diff --git a/ChangeLog b/ChangeLog
index 4391648..9f10890 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,84 @@
+2012-09-26 Reinhard Max <max@suse.de>
+
+ * generic/tclIOSock.c (TclCreateSocketAddress): Work around a bug
+ in getaddrinfo() on OSX that caused name resolution to fail for
+ [socket -server foo -myaddr localhost 0].
+
+2012-09-20 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/configure.in: New import libraries for zlib 1.2.7,
+ * win/configure: usable for all win32/win64 compilers
+ * compat/zlib/win32/zdll.lib
+ * compat/zlib/win64/zdll.lib
+
+ * win/tclWinDde.c: [Frq 3527238]: Full unicode support
+ for dde. Dde version is now 1.4.0b2.
+ ***POTENTIAL INCOMPATIBILITY***
+
+2012-09-19 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tcl.h: make Tcl_Interp a fully opaque structure
+ if TCL_NO_DEPRECATED is set (TIP 330 and 336).
+ * win/nmakehlp.c: Let "nmakehlp -V" start searching digits
+ after the found match (suggested by Harald Oehlmann)
+
+2012-09-07 Harald Oehlmann <oehhar@users.sf.net>
+
+ *** 8.6b3 TAGGED FOR RELEASE ***
+
+ IMPLEMENTATION OF TIP#404.
+
+ * library/msgcat/msgcat.tcl: [FRQ 3544988]: New commands [mcflset]
+ * library/msgcat/pkgIndex.tcl: and [mcflmset] to set mc entries with
+ * unix/Makefile.in: implicit message file locale.
+ * win/Makefile.in: Bump to 1.5.0.
+
+2012-08-25 Donal K. Fellows <dkf@users.sf.net>
+
+ * library/msgs/uk.msg: [Bug 3561330]: Use the correct full name of
+ March in Ukrainian. Thanks to Mikhail Teterin for reporting.
+
+2012-08-23 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclBinary.c: [Bug 3496014]: Unecessary memset() in
+ Tcl_SetByteArrayObj().
+
+2012-08-20 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclPathObj.c: [Bug 3559678]: Fix bad filename normalization
+ when the last component is the empty string.
+
+2012-08-20 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/tclWinPort.h: Remove wrapper macro for ntohs(): unnecessary,
+ because it doesn't require an initialized winsock_2 library. See:
+ <http://msdn.microsoft.com/en-us/library/windows/desktop/ms740075%28v=vs.85%29.aspx>
+ * win/tclWinSock.c
+ * generic/tclStubInit.c
+
+2012-08-17 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/nmakehlp.c: Add "-V<num>" option, in order to be able
+ to detect partial version numbers.
+
+2012-08-15 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/buildall.vc.bat: Only build the threaded builds by default
+ * win/rules.vc: Some code cleanup
+
+2010-08-13 Stuart Cassoff <stwo@users.sourceforge.net>
+
+ * unix/tclUnixCompat.c: [Bug 3555454]: Rearrange a bit to quash
+ 'declared but never defined' compiler warnings.
+
+2012-08-13 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * compat/zlib/win64/zlib1.dll: Add 64-bit build of zlib1.dll, and use it
+ * compat/zlib/win64/zdll.lib: for the dynamic mingw-w64 build.
+ * win/Makefile.in
+ * win/configure.in
+ * win/configure
+
2012-08-09 Reinhard Max <max@suse.de>
* tests/http.test: Fix http-3.29 for machines without IPv6 support.
@@ -14,8 +95,8 @@
2012-08-07 Don Porter <dgp@users.sourceforge.net>
- * generic/tclIOUtil.c: [Bug 3554250] Overlooked one field of
- cleanup in the thread exit handler for the filesystem subsystem.
+ * generic/tclIOUtil.c: [Bug 3554250]: Overlooked one field of cleanup
+ in the thread exit handler for the filesystem subsystem.
2012-07-31 Donal K. Fellows <dkf@users.sf.net>
@@ -140,7 +221,7 @@
* library/msgcat/msgcat.tcl: Add tn, ro_MO and ru_MO to msgcat.
-2012-06-29 Harald Oehlmann <harald.oehlmann@elmicron.de>
+2012-06-29 Harald Oehlmann <oehhar@users.sf.net>
* library/msgcat/msgcat.tcl: [Bug 3536888]: Locale guessing of
* library/msgcat/pkgIndex.tcl: msgcat fails on (some) Windows 7. Bump
@@ -204,9 +285,9 @@
2012-06-11 Don Porter <dgp@users.sourceforge.net>
* generic/tclBasic.c: [Bug 3532959]: Make sure the lifetime
- * generic/tclProc.c: management of entries in the linePBodyPtr hash
- * tests/proc.test: table can tolerate either order of teardown,
- interp first, or Proc first.
+ * generic/tclProc.c: management of entries in the linePBodyPtr
+ * tests/proc.test: hash table can tolerate either order of
+ teardown, interp first, or Proc first.
2012-06-08 Don Porter <dgp@users.sourceforge.net>
@@ -552,8 +633,8 @@
2012-04-04 Jan Nijtmans <nijtmans@users.sf.net>
- * win/tclWinSock.c: [Bug 510001]: TclSockMinimumBuffers needs plat imp
- * generic/tclIOSock.c:
+ * win/tclWinSock.c: [Bug 510001]: TclSockMinimumBuffers needs
+ * generic/tclIOSock.c: platform implementation.
* generic/tclInt.decls:
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
diff --git a/README b/README
index 0442a0e..56f7e38 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
README: Tcl
- This is the Tcl 8.6b2 source distribution.
+ This is the Tcl 8.6b3 source distribution.
http://tcl.sourceforge.net/
You can get any source release of Tcl from the file distributions
link at the above URL.
diff --git a/changes b/changes
index 1430f8c..b902445 100644
--- a/changes
+++ b/changes
@@ -8023,8 +8023,6 @@ like "nano()" instead of parsing as "nan o()" with missing op (duquette,porter)
2012-02-02 (bug fix)[2974459,2879351,1951574,1852572,1661378,1613456] Fix
problems where [file *able] would return false results on Win/Samba (porter)
-2012-02-02 (update)[3464401] Support Unicode 6.1 (nijtmans)
-
2012-02-06 (bug fix)[3484621] bump bytecode epoch on exec traces (kuhn,sofer)
2012-02-15 (bug fix)[3487626] crash compiling [dict for] (fellows)
@@ -8094,7 +8092,6 @@ problems where [file *able] would return false results on Win/Samba (porter)
and Tcl_FSMountsChanged(). (porter)
2012-06-29 (bug fix)[3536888] fix locale guessing (oehlmann,nijtmans)
-=> msgcat 1.4.5
2012-07-05 (bug fix)[1189293] make "<<" redirect binary safe (porter)
@@ -8105,6 +8102,17 @@ and Tcl_FSMountsChanged(). (porter)
2012-07-25 (bug fix)[3546275] [auto_execok] search match [exec] (danckaert)
+2012-07-27 (update)[3464401] Support Unicode 6.2 (nijtmans)
+
+2012-08-20 (bug fix)[3559678] [file normalize] EIAS failure (phao,dgp)
+
+2012-08-25 (bug fix)[3561330] Ukranian translation of "March" (teterin)
+
+2012-09-12 (TIP 404) New msgcat commands [mcflset], [mcflmset] (oehlmann)
+=> msgcat 1.5.0
+
Many revisions to better support a Cygwin environment (nijtmans)
---- Released 8.6b3, July 30, 2012 --- See ChangeLog for details ---
+Dropped support for OS X versions less than 10.4 (Tiger) (fellows)
+
+--- Released 8.6b3, September 18, 2012 --- See ChangeLog for details ---
diff --git a/compat/zlib/win32/zdll.lib b/compat/zlib/win32/zdll.lib
index 4e53491..669b186 100644
--- a/compat/zlib/win32/zdll.lib
+++ b/compat/zlib/win32/zdll.lib
Binary files differ
diff --git a/compat/zlib/win64/zdll.lib b/compat/zlib/win64/zdll.lib
new file mode 100644
index 0000000..d7dfb09
--- /dev/null
+++ b/compat/zlib/win64/zdll.lib
Binary files differ
diff --git a/compat/zlib/win64/zlib1.dll b/compat/zlib/win64/zlib1.dll
new file mode 100644
index 0000000..631439b
--- /dev/null
+++ b/compat/zlib/win64/zlib1.dll
Binary files differ
diff --git a/doc/dde.n b/doc/dde.n
index e4b51b7..3fe0f87 100644
--- a/doc/dde.n
+++ b/doc/dde.n
@@ -83,12 +83,14 @@ asynchronous invocation. The command returns an error message if the
script did not run, unless the \fB\-async\fR flag was used, in which case
the command returns immediately with no error.
.VS 8.6
-The \fB\-binary\fR option treats \fIdata\fR as binary data, otherwise an utf-8
-string is sent. Combining \fB-binary\fR with the result of
-\fBencoding convertto\fR may be used to send data in arbitrary encodings.
+Without the \fB\-binary\fR option all data will be sent in unicode. For
+dde clients which don't implement the CF_UNICODE clipboard format, this
+will automatically be translated to the system encoding. You can use
+the \fB\-binary\fR option in combination with the result of
+\fBencoding convertto\fR to send data in any other encoding.
.VE 8.6
.TP
-\fBdde poke ?\fB\-binary\fR? \fIservice topic item data\fR
+\fBdde poke\fR ?\fB\-binary\fR? \fIservice topic item data\fR
.
\fBdde poke\fR passes the \fIdata\fR to the server indicated by
\fIservice\fR using the \fItopic\fR and \fIitem\fR specified. Typically,
@@ -98,8 +100,11 @@ on. The \fIitem\fR is also application specific and is often not used, but
it must always be non-null. The \fIdata\fR field is given to the remote
application.
.VS 8.6
-The \fB\-binary\fR option treats \fIdata\fR as binary data, otherwise an utf-8
-string is sent.
+Without the \fB\-binary\fR option all data will be sent in unicode. For
+dde clients which don't implement the CF_UNICODE clipboard format, this
+will automatically be translated to the system encoding. You can use
+the \fB\-binary\fR option in combination with the result of
+\fBencoding convertto\fR to send data in any other encoding.
.VE 8.6
.TP
\fBdde request\fR ?\fB\-binary\fR? \fIservice topic item\fR
diff --git a/doc/define.n b/doc/define.n
index 6bdd9c5..1c36ca3 100644
--- a/doc/define.n
+++ b/doc/define.n
@@ -152,7 +152,7 @@ and
operates identically to
.QW "\fBoo::objdefine \fIcls subcommand ...\fR" .
.TP
-\fBsuperclass\fI ?\fI\-slotOperation\fR? \fR?\fIclassName ...\fR?
+\fBsuperclass\fR ?\fI\-slotOperation\fR? ?\fIclassName ...\fR?
.VS
This slot (see \fBSLOTTED DEFINITIONS\fR below)
.VE
diff --git a/doc/msgcat.n b/doc/msgcat.n
index 595c85f..af6be7f 100644
--- a/doc/msgcat.n
+++ b/doc/msgcat.n
@@ -13,7 +13,7 @@ msgcat \- Tcl message catalog
.SH SYNOPSIS
\fBpackage require Tcl 8.5\fR
.sp
-\fBpackage require msgcat 1.4.5\fR
+\fBpackage require msgcat 1.5.0\fR
.sp
\fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR?
.sp
@@ -29,6 +29,12 @@ msgcat \- Tcl message catalog
.sp
\fB::msgcat::mcmset \fIlocale src-trans-list\fR
.sp
+.VS "TIP 404"
+\fB::msgcat::mcflset \fIsrc-string \fR?\fItranslate-string\fR?
+.sp
+\fB::msgcat::mcflmset \fIsrc-trans-list\fR
+.VE "TIP 404"
+.sp
\fB::msgcat::mcunknown \fIlocale src-string\fR
.BE
.SH DESCRIPTION
@@ -131,6 +137,26 @@ translate-string ...\fR?} \fB::msgcat::mcmset\fR can be significantly
faster than multiple invocations of \fB::msgcat::mcset\fR. The function
returns the number of translations set.
.TP
+\fB::msgcat::mcflset \fIsrc-string \fR?\fItranslate-string\fR?
+.VS "TIP 404"
+Sets the translation for \fIsrc-string\fR to \fItranslate-string\fR in the
+current namespace for the locale implied by the name of the message catalog
+being loaded via \fB::msgcat::mcload\fR. If \fItranslate-string\fR is not
+specified, \fIsrc-string\fR is used for both. The function returns
+\fItranslate-string\fR.
+.VE "TIP 404"
+.TP
+\fB::msgcat::mcflmset \fIsrc-trans-list\fR
+.VS "TIP 404"
+Sets the translation for multiple source strings in \fIsrc-trans-list\fR in
+the current namespace for the locale implied by the name of the message
+catalog being loaded via \fB::msgcat::mcload\fR. \fIsrc-trans-list\fR must
+have an even number of elements and is in the form {\fIsrc-string
+translate-string\fR ?\fIsrc-string translate-string ...\fR?}
+\fB::msgcat::mcflmset\fR can be significantly faster than multiple invocations
+of \fB::msgcat::mcflset\fR. The function returns the number of translations set.
+.VE "TIP 404"
+.TP
\fB::msgcat::mcunknown \fIlocale src-string\fR
.
This routine is called by \fB::msgcat::mc\fR in the case when
@@ -286,15 +312,15 @@ cause peculiar behavior, such as marking the message file as
.QW hidden
on Unix file systems.
.IP [3]
-The file contains a series of calls to \fBmcset\fR and
-\fBmcmset\fR, setting the necessary translation strings
+The file contains a series of calls to \fBmcflset\fR and
+\fBmcflmset\fR, setting the necessary translation strings
for the language, likely enclosed in a \fBnamespace eval\fR
so that all source strings are tied to the namespace of
the package. For example, a short \fBes.msg\fR might contain:
.PP
.CS
namespace eval ::mypackage {
- \fB::msgcat::mcset\fR es "Free Beer!" "Cerveza Gracias!"
+ \fB::msgcat::mcflset\fR "Free Beer!" "Cerveza Gracias!"
}
.CE
.SH "RECOMMENDED MESSAGE SETUP FOR PACKAGES"
diff --git a/doc/trace.n b/doc/trace.n
index 940a1e9..63ed1cb 100644
--- a/doc/trace.n
+++ b/doc/trace.n
@@ -143,7 +143,7 @@ error will occur.
For \fBleave\fR and \fBleavestep\fR operations:
.PP
.CS
-\fIcommand command-string code result op\fR
+\fIcommandPrefix command-string code result op\fR
.CE
.PP
\fICommand-string\fR gives the complete current command being
diff --git a/generic/tcl.h b/generic/tcl.h
index 729e521..3f9f06a 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -58,10 +58,10 @@ extern "C" {
#define TCL_MAJOR_VERSION 8
#define TCL_MINOR_VERSION 6
#define TCL_RELEASE_LEVEL TCL_BETA_RELEASE
-#define TCL_RELEASE_SERIAL 2
+#define TCL_RELEASE_SERIAL 3
#define TCL_VERSION "8.6"
-#define TCL_PATCH_LEVEL "8.6b2"
+#define TCL_PATCH_LEVEL "8.6b3"
/*
*----------------------------------------------------------------------------
@@ -500,7 +500,9 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
* accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
*/
-typedef struct Tcl_Interp {
+typedef struct Tcl_Interp
+#ifndef TCL_NO_DEPRECATED
+{
/* TIP #330: Strongly discourage extensions from using the string
* result. */
#ifdef USE_INTERP_RESULT
@@ -517,8 +519,8 @@ typedef struct Tcl_Interp {
* Tcl_Eval must free it before executing next
* command. */
#else
- char *unused3 TCL_DEPRECATED_API("bad field access");
- void (*unused4) (char *) TCL_DEPRECATED_API("bad field access");
+ char *resultDontUse; /* Don't use in extensions! */
+ void (*freeProcDontUse) (char *); /* Don't use in extensions! */
#endif
#ifdef USE_INTERP_ERRORLINE
int errorLine TCL_DEPRECATED_API("use Tcl_GetErrorLine/Tcl_SetErrorLine");
@@ -526,9 +528,11 @@ typedef struct Tcl_Interp {
* line number within the command where the
* error occurred (1 if first line). */
#else
- int unused5 TCL_DEPRECATED_API("bad field access");
+ int errorLineDontUse; /* Don't use in extensions! */
#endif
-} Tcl_Interp;
+}
+#endif /* TCL_NO_DEPRECATED */
+Tcl_Interp;
typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
typedef struct Tcl_Channel_ *Tcl_Channel;
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index a1e836e..3d8b24c 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -303,18 +303,16 @@ Tcl_SetByteArrayObj(
TclFreeIntRep(objPtr);
Tcl_InvalidateStringRep(objPtr);
- length = (length < 0) ? 0 : length;
+ if (length < 0) {
+ length = 0;
+ }
byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
byteArrayPtr->used = length;
byteArrayPtr->allocated = length;
- if (length) {
- if (bytes) {
- memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
- } else {
- memset(byteArrayPtr->bytes, 0, (size_t) length);
- }
- }
+ if ((bytes != NULL) && (length > 0)) {
+ memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
+ }
objPtr->typePtr = &tclByteArrayType;
SET_BYTEARRAY(objPtr, byteArrayPtr);
}
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index e603c91..694501f 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -151,7 +151,7 @@ TclCreateSocketAddress(
struct addrinfo *p;
struct addrinfo *v4head = NULL, *v4ptr = NULL;
struct addrinfo *v6head = NULL, *v6ptr = NULL;
- char *native = NULL, portstring[TCL_INTEGER_SPACE];
+ char *native = NULL, portbuf[TCL_INTEGER_SPACE], *portstring;
const char *family = NULL;
Tcl_DString ds;
int result, i;
@@ -159,7 +159,18 @@ TclCreateSocketAddress(
if (host != NULL) {
native = Tcl_UtfToExternalDString(NULL, host, -1, &ds);
}
- TclFormatInt(portstring, port);
+
+ /*
+ * Workaround for OSX's apparent inability to resolve "localhost", "0"
+ * when the loopback device is the only available network interface.
+ */
+ if (host != NULL && port == 0) {
+ portstring = NULL;
+ } else {
+ TclFormatInt(portbuf, port);
+ portstring = portbuf;
+ }
+
(void) memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 53a88d6..6c6e664 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -801,13 +801,17 @@ typedef struct VarInHash {
#define TclSetVarNamespaceVar(varPtr) \
if (!TclIsVarNamespaceVar(varPtr)) {\
(varPtr)->flags |= VAR_NAMESPACE_VAR;\
- ((VarInHash *)(varPtr))->refCount++;\
+ if (TclIsVarInHash(varPtr)) {\
+ ((VarInHash *)(varPtr))->refCount++;\
+ }\
}
#define TclClearVarNamespaceVar(varPtr) \
if (TclIsVarNamespaceVar(varPtr)) {\
(varPtr)->flags &= ~VAR_NAMESPACE_VAR;\
- ((VarInHash *)(varPtr))->refCount--;\
+ if (TclIsVarInHash(varPtr)) {\
+ ((VarInHash *)(varPtr))->refCount--;\
+ }\
}
/*
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 7322a37..36cb918 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -525,7 +525,10 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
#undef TclWinConvertWSAError
#define TclWinConvertWSAError TclWinConvertError
-#if !defined(__WIN32__) && !defined(__CYGWIN__)
+#if defined(__WIN32__) || defined(__CYGWIN__)
+# undef TclWinNToHS
+# define TclWinNToHS ntohs
+#else
# undef TclpGetPid
# define TclpGetPid(pid) ((unsigned long) (pid))
#endif
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 14139ec..f445383 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -334,14 +334,14 @@ Tcl_MainEx(
*/
if ((argc > 3) && (0 == _tcscmp(TEXT("-encoding"), argv[1]))
- && (TEXT('-') != argv[3][0])) {
+ && ('-' != argv[3][0])) {
Tcl_Obj *value = NewNativeObj(argv[2], -1);
Tcl_SetStartupScript(NewNativeObj(argv[3], -1),
Tcl_GetString(value));
Tcl_DecrRefCount(value);
argc -= 3;
argv += 3;
- } else if ((argc > 1) && (TEXT('-') != argv[1][0])) {
+ } else if ((argc > 1) && ('-' != argv[1][0])) {
Tcl_SetStartupScript(NewNativeObj(argv[1], -1), NULL);
argc--;
argv++;
diff --git a/generic/tclOO.c b/generic/tclOO.c
index d9f5d60..04a2bf7 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -3,7 +3,7 @@
*
* This file contains the object-system core (NB: not Tcl_Obj, but ::oo)
*
- * Copyright (c) 2005-2011 by Donal K. Fellows
+ * Copyright (c) 2005-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOO.h b/generic/tclOO.h
index fef2bd0..280481c 100644
--- a/generic/tclOO.h
+++ b/generic/tclOO.h
@@ -4,7 +4,7 @@
* This file contains the public API definitions and some of the function
* declarations for the object-system (NB: not Tcl_Obj, but ::oo).
*
- * Copyright (c) 2006-2008 by Donal K. Fellows
+ * Copyright (c) 2006-2010 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -34,11 +34,12 @@ extern const char *TclOOInitializeStubs(
* version in the files:
*
* tests/oo.test
+ * tests/ooNext2.test
* unix/tclooConfig.sh
* win/tclooConfig.sh
*/
-#define TCLOO_VERSION "0.6.3"
+#define TCLOO_VERSION "0.7"
#define TCLOO_PATCHLEVEL TCLOO_VERSION
/*
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index 3637ede..0676618 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -4,7 +4,7 @@
* This file contains implementations of the "simple" commands and
* methods from the object-system core.
*
- * Copyright (c) 2005-2011 by Donal K. Fellows
+ * Copyright (c) 2005-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 760bd7b..a79e4fa 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -4,7 +4,7 @@
* This file contains the method call chain management code for the
* object-system core.
*
- * Copyright (c) 2005-2011 by Donal K. Fellows
+ * Copyright (c) 2005-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index c022e6b..bacab38 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -4,7 +4,7 @@
* This file contains the implementation of the ::oo::define command,
* part of the object-system core (NB: not Tcl_Obj, but ::oo).
*
- * Copyright (c) 2006-2008 by Donal K. Fellows
+ * Copyright (c) 2006-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c
index 796442b..1a94e69 100644
--- a/generic/tclOOInfo.c
+++ b/generic/tclOOInfo.c
@@ -4,7 +4,7 @@
* This file contains the implementation of the ::oo-related [info]
* subcommands.
*
- * Copyright (c) 2006-2008 by Donal K. Fellows
+ * Copyright (c) 2006-2011 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h
index 631961f..ab54964 100644
--- a/generic/tclOOInt.h
+++ b/generic/tclOOInt.h
@@ -4,7 +4,7 @@
* This file contains the structure definitions and some of the function
* declarations for the object-system (NB: not Tcl_Obj, but ::oo).
*
- * Copyright (c) 2006-2011 by Donal K. Fellows
+ * Copyright (c) 2006-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 60eaa6e..28820e0 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -3,7 +3,7 @@
*
* This file contains code to create and manage methods.
*
- * Copyright (c) 2005-2008 by Donal K. Fellows
+ * Copyright (c) 2005-2011 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index db07c0e..2b9ff87 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -1764,7 +1764,7 @@ Tcl_FSGetNormalizedPath(
*/
Tcl_Obj *dir, *copy;
- int cwdLen, pathType;
+ int tailLen, cwdLen, pathType;
pathType = Tcl_FSGetPathType(fsPathPtr->cwdPtr);
dir = Tcl_FSGetNormalizedPath(interp, fsPathPtr->cwdPtr);
@@ -1776,7 +1776,12 @@ Tcl_FSGetNormalizedPath(
UpdateStringOfFsPath(pathPtr);
}
- copy = AppendPath(dir, fsPathPtr->normPathPtr);
+ Tcl_GetStringFromObj(fsPathPtr->normPathPtr, &tailLen);
+ if (tailLen) {
+ copy = AppendPath(dir, fsPathPtr->normPathPtr);
+ } else {
+ copy = Tcl_DuplicateObj(dir);
+ }
Tcl_IncrRefCount(dir);
Tcl_IncrRefCount(copy);
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index ca2638c..75af3b7 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -53,6 +53,15 @@ static int TclSockMinimumBuffersOld(int sock, int size)
}
#endif
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+#undef TclWinNToHS
+#define TclWinNToHS winNToHS
+static unsigned short TclWinNToHS(unsigned short ns) {
+ return ntohs(ns);
+}
+#endif
+
#ifdef __WIN32__
# define TclUnixWaitForFile 0
# define TclUnixCopyFile 0
@@ -89,12 +98,6 @@ void *TclWinGetTclInstance()
return hInstance;
}
-unsigned short
-TclWinNToHS(unsigned short ns)
-{
- return ntohs(ns);
-}
-
int
TclWinSetSockOpt(SOCKET s, int level, int optname,
const char *optval, int optlen)
@@ -166,14 +169,6 @@ Tcl_WinTCharToUtf(
string, len, dsPtr);
}
-#define TclMacOSXGetFileAttribute (int (*) (Tcl_Interp *, \
- int, Tcl_Obj *, Tcl_Obj **)) TclpCreateProcess
-#define TclMacOSXMatchType (int (*) (Tcl_Interp *, const char *, \
- const char *, Tcl_StatBuf *, Tcl_GlobTypeData *)) TclpMakeFile
-#define TclMacOSXNotifierAddRunLoopMode (void (*) (const void *)) TclpOpenFile
-#define TclpLocaltime_unix (struct tm *(*) (const time_t *)) TclGetAndDetachPids
-#define TclpGmtime_unix (struct tm *(*) (const time_t *)) TclpCloseFile
-
#else /* UNIX and MAC */
# define TclpLocaltime_unix TclpLocaltime
# define TclpGmtime_unix TclpGmtime
diff --git a/library/dde/pkgIndex.tcl b/library/dde/pkgIndex.tcl
index ce8276b..8758bd2 100644
--- a/library/dde/pkgIndex.tcl
+++ b/library/dde/pkgIndex.tcl
@@ -1,7 +1,7 @@
if {([info commands ::tcl::pkgconfig] eq "")
|| ([info sharedlibextension] ne ".dll")} return
if {[::tcl::pkgconfig get debug]} {
- package ifneeded dde 1.4.0b1 [list load [file join $dir tcldde14g.dll] dde]
+ package ifneeded dde 1.4.0b2 [list load [file join $dir tcldde14g.dll] dde]
} else {
- package ifneeded dde 1.4.0b1 [list load [file join $dir tcldde14.dll] dde]
+ package ifneeded dde 1.4.0b2 [list load [file join $dir tcldde14.dll] dde]
}
diff --git a/library/init.tcl b/library/init.tcl
index 51c7f29..3ec78af 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -15,7 +15,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.6b2
+package require -exact Tcl 8.6b3
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index 3377b47..112507a 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -13,11 +13,11 @@
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.4.5
+package provide msgcat 1.5.0
namespace eval msgcat {
namespace export mc mcload mclocale mcmax mcmset mcpreferences mcset \
- mcunknown
+ mcunknown mcflset mcflmset
# Records the current locale as passed to mclocale
variable Locale ""
@@ -25,6 +25,9 @@ namespace eval msgcat {
# Records the list of locales to search
variable Loclist {}
+ # Records the locale of the currently sourced message catalogue file
+ variable FileLocale
+
# Records the mapping between source strings and translated strings. The
# dict key is of the form "<locale> <namespace> <src>", where locale and
# namespace should be themselves dict values and the value is
@@ -277,6 +280,11 @@ proc msgcat::mcpreferences {} {
# Returns the number of message catalogs that were loaded.
proc msgcat::mcload {langdir} {
+ variable FileLocale
+ # Save the file locale if we are recursively called
+ if {[info exists FileLocale]} {
+ set nestedFileLocale $FileLocale
+ }
set x 0
foreach p [mcpreferences] {
if { $p eq {} } {
@@ -285,9 +293,17 @@ proc msgcat::mcload {langdir} {
set langfile [file join $langdir $p.msg]
if {[file exists $langfile]} {
incr x
+ set FileLocale [string tolower [file tail [file rootname $langfile]]]
+ if {"root" eq $FileLocale} {
+ set FileLocale ""
+ }
uplevel 1 [list ::source -encoding utf-8 $langfile]
+ unset FileLocale
}
}
+ if {[info exists nestedFileLocale]} {
+ set FileLocale $nestedFileLocale
+ }
return $x
}
@@ -318,6 +334,35 @@ proc msgcat::mcset {locale src {dest ""}} {
return $dest
}
+# msgcat::mcflset --
+#
+# Set the translation for a given string in the current file locale.
+#
+# Arguments:
+# src The source string.
+# dest (Optional) The translated string. If omitted,
+# the source string is used.
+#
+# Results:
+# Returns the new locale.
+
+proc msgcat::mcflset {src {dest ""}} {
+ variable FileLocale
+ variable Msgs
+
+ if {![info exists FileLocale]} {
+ return -code error \
+ "must only be used inside a message catalog loaded with ::msgcat::mcload"
+ }
+ if {[llength [info level 0]] == 2} { ;# dest not specified
+ set dest $src
+ }
+
+ set ns [uplevel 1 [list ::namespace current]]
+ dict set Msgs $FileLocale $ns $src $dest
+ return $dest
+}
+
# msgcat::mcmset --
#
# Set the translation for multiple strings in a specified locale.
@@ -345,7 +390,38 @@ proc msgcat::mcmset {locale pairs } {
dict set Msgs $locale $ns $src $dest
}
- return $length
+ return [expr {$length / 2}]
+}
+
+# msgcat::mcflmset --
+#
+# Set the translation for multiple strings in the mc file locale.
+#
+# Arguments:
+# pairs One or more src/dest pairs (must be even length)
+#
+# Results:
+# Returns the number of pairs processed
+
+proc msgcat::mcflmset {pairs} {
+ variable FileLocale
+ variable Msgs
+
+ if {![info exists FileLocale]} {
+ return -code error \
+ "must only be used inside a message catalog loaded with ::msgcat::mcload"
+ }
+ set length [llength $pairs]
+ if {$length % 2} {
+ return -code error "bad translation list:\
+ should be \"[lindex [info level 0] 0] locale {src dest ...}\""
+ }
+
+ set ns [uplevel 1 [list ::namespace current]]
+ foreach {src dest} $pairs {
+ dict set Msgs $FileLocale $ns $src $dest
+ }
+ return [expr {$length / 2}]
}
# msgcat::mcunknown --
diff --git a/library/msgcat/pkgIndex.tcl b/library/msgcat/pkgIndex.tcl
index 60c2d3c..832bf81 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.4.5 [list source [file join $dir msgcat.tcl]]
+package ifneeded msgcat 1.5.0 [list source [file join $dir msgcat.tcl]]
diff --git a/library/msgs/uk.msg b/library/msgs/uk.msg
index 3e24f86..7d4c64a 100755
--- a/library/msgs/uk.msg
+++ b/library/msgs/uk.msg
@@ -33,7 +33,7 @@ namespace eval ::tcl::clock {
::msgcat::mcset uk MONTHS_FULL [list \
"\u0441\u0456\u0447\u043d\u044f"\
"\u043b\u044e\u0442\u043e\u0433\u043e"\
- "\u0431\u0435\u0440\u0435\u0436\u043d\u044f"\
+ "\u0431\u0435\u0440\u0435\u0437\u043d\u044f"\
"\u043a\u0432\u0456\u0442\u043d\u044f"\
"\u0442\u0440\u0430\u0432\u043d\u044f"\
"\u0447\u0435\u0440\u0432\u043d\u044f"\
diff --git a/pkgs/README b/pkgs/README
index e2b33f5..01c6f43 100644
--- a/pkgs/README
+++ b/pkgs/README
@@ -1 +1,57 @@
-Add notes here about bundling packages with Tcl.
+
+The 'pkgs' subdirectory of the Tcl source code distribution is meant to be
+a place where the source code distribution of Tcl packages may be placed so
+that they are built, installed, and tested along with Tcl. As originally
+distributed, Tcl re-distributes a number of packages in this location. The
+build systems for Tcl are written so that additional packages may be added,
+or the original packages removed in any number and still have all packages
+present get built, installed, and tested along with Tcl.
+
+In order for a package to work properly under the pkgs subdirectory, it
+needs to conform to the following conventions.
+
+ All files of the package need to be contained in (subdirs of ...) a
+ single subdirectory of the "pkgs" directrory.
+
+ In that subdirectory of "pkgs" there must be an executable file named
+ "configure". When the program "configure" is run, it should generate
+ a file "Makefile" in the current working directory. The "configure"
+ program should be able to accept as command line arguments all the
+ arguments that can be passed to the master unix/configure program. It
+ should also accept the --with-tcl= and --with-tclinclude= options in
+ the conventional way.
+
+ The generated "Makefile" must be one suitable for controlling the operations
+ of a `make` program. The following targets must be defined:
+
+ <default>: Perform a build of the runtime components of the
+ package from sources.
+
+ install: Copy the runtime components of the package into their
+ installed location. Must respect the DESTDIR variable
+ for determining the installation location.
+
+ test: Run the test suite of the package. Must respect the
+ TCLSH_PROG, TESTFLAGS variables.
+
+ clean: Delete all files generated by the default build target.
+
+ distclean: Delete all generated files.
+
+ dist: Produce a copy of the package's source code distribution.
+ Must respect the DIST_ROOT variable determing where to
+ write the generated directory.
+
+Packages that are written to make use of the Tcl Extension Architecture (TEA)
+and that make use of the tclconfig collection of support files, should
+conform to these conventions without further efforts.
+
+These conventions are subject to revision and refinement over time to
+better support the needs of the build system. Efforts will be made to
+keep the TEA support scripts consistent with the demands of this system.
+
+In addition, it is requested that packages also support building with
+Microsoft Visual Studio tools. This means the file win/makefile.vc
+should be included, suitable for use by the nmake program, defining the
+targets <default>, install, test, and clean.
+
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 38ecbee..b098f35 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -27,7 +27,7 @@ catch {
set ::ddelib [lindex [package ifneeded dde $::ddever] 1]
set ::regver [package require registry]
set ::reglib [lindex [package ifneeded registry $::regver] 1]
- testConstraint loaddll 0
+ testConstraint loaddll 1
}
# Test for commands defined in Tcltest executable
@@ -514,7 +514,7 @@ test filesystem-7.1.1 {load from vfs} -setup {
set dir [pwd]
} -constraints {win testsimplefilesystem loaddll} -body {
# This may cause a crash on exit
- cd [file dirname $::reglib]
+ cd [file dirname $::ddelib]
testsimplefilesystem 1
# This loads dde via a complex copy-to-temp operation
load simplefs:/[file tail $::ddelib] dde
diff --git a/tests/ioTrans.test b/tests/ioTrans.test
index db9a2cb..7027ec1 100644
--- a/tests/ioTrans.test
+++ b/tests/ioTrans.test
@@ -283,6 +283,8 @@ test iortrans-3.1 {chan finalize, handler destruction has no effect on channel}
lappend res [catch {close $c} msg] $msg
lappend res [file channels file*]
lappend res [file channels rt*]
+} -cleanup {
+ tempdone
} -result {{initialize rt* {read write}} file* file* {} 1 {invalid command name "foo"} {} {}}
test iortrans-3.2 {chan finalize, for close} -setup {
set res {}
@@ -300,6 +302,7 @@ test iortrans-3.2 {chan finalize, for close} -setup {
lappend res [info command foo]
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} {} foo}
test iortrans-3.3 {chan finalize, for close, error, close error} -setup {
set res {}
@@ -315,6 +318,7 @@ test iortrans-3.3 {chan finalize, for close, error, close error} -setup {
lappend res [file channels rt*]
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 5 {}}
test iortrans-3.4 {chan finalize, for close, error, close error} -setup {
set res {}
@@ -328,6 +332,7 @@ test iortrans-3.4 {chan finalize, for close, error, close error} -setup {
lappend res [catch {close $c} msg] $msg $::errorInfo
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 FOO {FOO
*"close $c"}}
test iortrans-3.5 {chan finalize, for close, arbitrary result, ignored} -setup {
@@ -342,6 +347,7 @@ test iortrans-3.5 {chan finalize, for close, arbitrary result, ignored} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 0 {}}
test iortrans-3.6 {chan finalize, for close, break, close error} -setup {
set res {}
@@ -355,6 +361,7 @@ test iortrans-3.6 {chan finalize, for close, break, close error} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*}
test iortrans-3.7 {chan finalize, for close, continue, close error} -setup {
set res {}
@@ -368,6 +375,7 @@ test iortrans-3.7 {chan finalize, for close, continue, close error} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*}
test iortrans-3.8 {chan finalize, for close, custom code, close error} -setup {
set res {}
@@ -381,6 +389,7 @@ test iortrans-3.8 {chan finalize, for close, custom code, close error} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*}
test iortrans-3.9 {chan finalize, for close, ignore level, close error} -setup {
set res {}
@@ -395,6 +404,7 @@ test iortrans-3.9 {chan finalize, for close, ignore level, close error} -setup {
noteOpts $opt
} -match glob -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "finalize"*}}
# --- === *** ###########################
@@ -1036,6 +1046,8 @@ test iortrans-11.2 {delete interp of reflected transform} -setup {
chan event $c readable no-op
}
interp delete slave
+} -cleanup {
+ tempdone
} -result {}
# ### ### ### ######### ######### #########
diff --git a/tests/msgcat.test b/tests/msgcat.test
index bbcd023..1522354 100644
--- a/tests/msgcat.test
+++ b/tests/msgcat.test
@@ -17,8 +17,8 @@ if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2 required."
return
}
-if {[catch {package require msgcat 1.4.5}]} {
- puts stderr "Skipping tests in [info script]. No msgcat 1.4.5 found to test."
+if {[catch {package require msgcat 1.5.0}]} {
+ puts stderr "Skipping tests in [info script]. No msgcat 1.5.0 found to test."
return
}
@@ -56,6 +56,13 @@ namespace eval ::msgcat::test {
set result [string tolower \
[msgcat::ConvertLocale $::tcl::mac::locale]]
} else {
+ if {([info sharedlibextension] == ".dll")
+ && ![catch {package require registry}]} {
+ # Windows and Cygwin have other ways to determine the
+ # locale when the environment variables are missing
+ # and the registry package is present
+ continue
+ }
set result c
}
}
@@ -611,6 +618,45 @@ namespace eval ::msgcat::test {
mc "this is a %s" "good test"
} -result "this is a good test"
+ # Tests msgcat-8.*: [mcflset]
+
+ set msgdir1 [makeDirectory msgdir1]
+ makeFile {::msgcat::mcflset k1 v1} l1.msg $msgdir1
+
+ test msgcat-8.1 {mcflset} -setup {
+ variable locale [mclocale]
+ mclocale l1
+ mcload $msgdir1
+ } -cleanup {
+ mclocale $locale
+ } -body {
+ mc k1
+ } -result v1
+
+ removeFile l1.msg $msgdir1
+ removeDirectory msgdir1
+
+ set msgdir2 [makeDirectory msgdir2]
+ set msgdir3 [makeDirectory msgdir3]
+ makeFile "::msgcat::mcflset k2 v2 ; ::msgcat::mcload [list $msgdir3]"\
+ l2.msg $msgdir2
+ makeFile {::msgcat::mcflset k3 v3} l2.msg $msgdir3
+
+ # chained mcload
+ test msgcat-8.2 {mcflset} -setup {
+ variable locale [mclocale]
+ mclocale l2
+ mcload $msgdir2
+ } -cleanup {
+ mclocale $locale
+ } -body {
+ return [mc k2][mc k3]
+ } -result v2v3
+
+ removeFile l2.msg $msgdir2
+ removeDirectory msgdir2
+ removeDirectory msgdir3
+
cleanupTests
}
namespace delete ::msgcat::test
diff --git a/tests/oo.test b/tests/oo.test
index 00663e9..540cdf3 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -2,12 +2,12 @@
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright (c) 2006-2011 Donal K. Fellows
+# Copyright (c) 2006-2012 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require -exact TclOO 0.6.3 ;# Must match value in generic/tclOO.h
+package require -exact TclOO 0.7 ;# Must match value in generic/tclOO.h
package require tcltest 2
if {"::tcltest" in [namespace children]} {
namespace import -force ::tcltest::*
diff --git a/tests/ooNext2.test b/tests/ooNext2.test
index eeade11..e78e0d0 100644
--- a/tests/ooNext2.test
+++ b/tests/ooNext2.test
@@ -2,16 +2,14 @@
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright (c) 2006-2008 Donal K. Fellows
+# Copyright (c) 2006-2011 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: oo.test,v 1.59 2011/01/18 16:10:48 dkf Exp $
-package require -exact TclOO 0.6.3 ;# Must match value in configure.in
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest 2
+package require -exact TclOO 0.7 ;# Must match value in configure.in
+package require tcltest 2
+if {"::tcltest" in [namespace children]} {
namespace import -force ::tcltest::*
}
diff --git a/tests/thread.test b/tests/thread.test
index f2735da..43222ac 100644
--- a/tests/thread.test
+++ b/tests/thread.test
@@ -79,7 +79,7 @@ if {[testConstraint thread]} {
if {[testConstraint testthread]} {
proc drainEventQueue {} {
while {[set x [testthread event]]} {
- puts "WARNING: drained $x event(s) on main thread"
+ #puts "WARNING: drained $x event(s) on main thread"
}
}
diff --git a/tests/winDde.test b/tests/winDde.test
index 8d9bd12..9411c92 100644
--- a/tests/winDde.test
+++ b/tests/winDde.test
@@ -20,7 +20,7 @@ testConstraint dde 0
if {[testConstraint win]} {
if {![catch {
::tcltest::loadTestedCommands
- set ::ddever [package require dde 1.4.0b1]
+ set ::ddever [package require dde 1.4.0b2]
set ::ddelib [lindex [package ifneeded dde $::ddever] 1]}]} {
testConstraint dde 1
}
@@ -104,7 +104,7 @@ proc createChildProcess {ddeServerName args} {
# -------------------------------------------------------------------------
test winDde-1.0 {check if we are testing the right dll} {win dde} {
set ::ddever
-} {1.4.0b1}
+} {1.4.0b2}
test winDde-1.1 {Settings the server's topic name} -constraints dde -body {
list [dde servername foobar] [dde servername] [dde servername self]
@@ -203,8 +203,8 @@ test winDde-4.3 {DDE request remotely} -constraints {dde stdio} -body {
set \xe1 ""
set name ch\xEDld-4.3
set child [createChildProcess $name]
- dde execute TclEval $name [list set a foo]
- set \xe1 [dde request TclEval $name a]
+ dde execute TclEval $name [list set \xe1 foo]
+ set \xe1 [dde request TclEval $name \xe1]
dde execute TclEval $name {set done 1}
update
set \xe1
diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in
index 653b1e1..77beb41 100644
--- a/tools/tcl.wse.in
+++ b/tools/tcl.wse.in
@@ -12,7 +12,7 @@ item: Global
Log Pathname=%MAINDIR%\INSTALL.LOG
Message Font=MS Sans Serif
Font Size=8
- Disk Label=tcl8.6b2
+ Disk Label=tcl8.6b3
Disk Filename=setup
Patch Flags=0000000000000001
Patch Threshold=85
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 4d5595d..9ac84f7 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -846,8 +846,8 @@ install-libraries: libraries
do \
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \
done;
- @echo "Installing package msgcat 1.4.5 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.4.5.tm;
+ @echo "Installing package msgcat 1.5.0 as a Tcl Module";
+ @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.5.0.tm;
@echo "Installing package tcltest 2.3.4 as a Tcl Module";
@$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.4.tm;
diff --git a/unix/configure b/unix/configure
index 18611f0..cbb10b4 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="b2"
+TCL_PATCH_LEVEL="b3"
VERSION=${TCL_VERSION}
#------------------------------------------------------------------------
@@ -1355,7 +1355,10 @@ fi
#------------------------------------------------------------------------
# Empty slate for bundled packages, to avoid stale configuration
#------------------------------------------------------------------------
-rm -Rf pkgs
+#rm -Rf pkgs
+if test -f Makefile; then
+ make distclean-packages
+fi
#------------------------------------------------------------------------
# Handle the --prefix=... option
@@ -8757,7 +8760,7 @@ else
arch=`isainfo`
echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5
echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6
- if test "$arch" = "amd64 i386"; then
+ if test "$arch" = "amd64 i386" -o "$arch" = "i386"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
@@ -8956,7 +8959,7 @@ else
fi
case $system in
- SunOS-5.[1-9][0-9]*)
+ SunOS-5.[1-9][0-9]*|SunOS-5.[7-9])
SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";;
*)
SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";;
diff --git a/unix/configure.in b/unix/configure.in
index dc0d543..f4b695d 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="b2"
+TCL_PATCH_LEVEL="b3"
VERSION=${TCL_VERSION}
#------------------------------------------------------------------------
@@ -45,7 +45,10 @@ fi
#------------------------------------------------------------------------
# Empty slate for bundled packages, to avoid stale configuration
#------------------------------------------------------------------------
-rm -Rf pkgs
+#rm -Rf pkgs
+if test -f Makefile; then
+ make distclean-packages
+fi
#------------------------------------------------------------------------
# Handle the --prefix=... option
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index a142baf..b13fddd 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1968,7 +1968,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AS_IF([test "$GCC" = yes],[use_sunmath=no],[
arch=`isainfo`
AC_MSG_CHECKING([whether to use -lsunmath for fp rounding control])
- AS_IF([test "$arch" = "amd64 i386"], [
+ AS_IF([test "$arch" = "amd64 i386" -o "$arch" = "i386"], [
AC_MSG_RESULT([yes])
MATH_LIBS="-lsunmath $MATH_LIBS"
AC_CHECK_HEADER(sunmath.h)
@@ -2001,7 +2001,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
], [
AS_IF([test "$use_sunmath" = yes], [textmode=textoff],[textmode=text])
case $system in
- SunOS-5.[[1-9]][[0-9]]*)
+ SunOS-5.[[1-9]][[0-9]]*|SunOS-5.[[7-9]])
SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";;
*)
SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";;
diff --git a/unix/tcl.spec b/unix/tcl.spec
index b35e220..0c42aa4 100644
--- a/unix/tcl.spec
+++ b/unix/tcl.spec
@@ -4,7 +4,7 @@
Name: tcl
Summary: Tcl scripting language development environment
-Version: 8.6b2
+Version: 8.6b3
Release: 2
License: BSD
Group: Development/Languages
diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in
index 31466bc..f171cce 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -4,6 +4,9 @@
#ifndef _TCLCONFIG
#define _TCLCONFIG
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
/* Is gettimeofday() actually declared in <sys/time.h>? */
#undef GETTOD_NOT_DECLARED
@@ -13,8 +16,8 @@
/* Define to 1 if the system has the type `blkcnt_t'. */
#undef HAVE_BLKCNT_T
-/* Do we have BSDgettimeofday()? */
-#undef HAVE_BSDGETTIMEOFDAY
+/* Defined when compiler supports casting to union type. */
+#undef HAVE_CAST_TO_UNION
/* Define to 1 if you have the `chflags' function. */
#undef HAVE_CHFLAGS
@@ -28,6 +31,9 @@
/* Do we have access to Darwin CoreFoundation.framework? */
#undef HAVE_COREFOUNDATION
+/* Is the cpuid instruction usable? */
+#undef HAVE_CPUID
+
/* Define to 1 if you have the `freeaddrinfo' function. */
#undef HAVE_FREEADDRINFO
@@ -205,10 +211,10 @@
/* Is 'struct stat64' in <sys/stat.h>? */
#undef HAVE_STRUCT_STAT64
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
-/* Define to 1 if `st_blocks' is member of `struct stat'. */
+/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if you have the <sys/filio.h> header file. */
@@ -271,6 +277,9 @@
/* Default libtommath precision. */
#undef MP_PREC
+/* Is no debugging enabled? */
+#undef NDEBUG
+
/* Use compat implementation of getaddrinfo() and friends */
#undef NEED_FAKE_RFC2553
@@ -349,6 +358,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@@ -361,9 +373,6 @@
/* What encoding should be used for embedded configuration info? */
#undef TCL_CFGVAL_ENCODING
-/* Is debugging enabled? */
-#undef NDEBUG
-
/* Is this a 64-bit build? */
#undef TCL_CFG_DO64BIT
@@ -439,9 +448,17 @@
/* Should we use vfork() instead of fork()? */
#undef USE_VFORK
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
/* Are Darwin SUSv3 extensions available? */
#undef _DARWIN_C_SOURCE
@@ -496,7 +513,7 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define as int if socklen_t is not available */
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index f8fe6d3..a48aa23 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -176,8 +176,14 @@ FindSymbol(
}
Tcl_DStringFree(&ds);
if (proc == NULL && interp != NULL) {
+ const char *errorStr = dlerror();
+
+ if (!errorStr) {
+ errorStr = "unknown";
+ }
+
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "cannot find symbol \"%s\": %s", symbol, dlerror()));
+ "cannot find symbol \"%s\": %s", symbol, errorStr));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol,
NULL);
}
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index 359e253..e201018 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -99,12 +99,20 @@ static Tcl_Mutex compatLock;
#undef NEED_COPYPWD
#undef NEED_COPYSTRING
+#if !defined(HAVE_GETGRNAM_R_5) && !defined(HAVE_GETGRNAM_R_4)
+#define NEED_COPYGRP 1
+static int CopyGrp(struct group *tgtPtr, char *buf, int buflen);
+#endif
+
+#if !defined(HAVE_GETPWNAM_R_5) && !defined(HAVE_GETPWNAM_R_4)
+#define NEED_COPYPWD 1
+static int CopyPwd(struct passwd *tgtPtr, char *buf, int buflen);
+#endif
+
static int CopyArray(char **src, int elsize, char *buf,
int buflen);
-static int CopyGrp(struct group *tgtPtr, char *buf, int buflen);
static int CopyHostent(struct hostent *tgtPtr, char *buf,
int buflen);
-static int CopyPwd(struct passwd *tgtPtr, char *buf, int buflen);
static int CopyString(const char *src, char *buf, int buflen);
#endif
@@ -214,7 +222,6 @@ TclpGetPwNam(
return getpwnam_r(name, &tsdPtr->pwd, tsdPtr->pbuf, sizeof(tsdPtr->pbuf));
#else
-#define NEED_COPYPWD 1
struct passwd *pwPtr;
Tcl_MutexLock(&compatLock);
@@ -295,7 +302,6 @@ TclpGetPwUid(
return getpwuid_r(uid, &tsdPtr->pwd, tsdPtr->pbuf, sizeof(tsdPtr->pbuf));
#else
-#define NEED_COPYPWD 1
struct passwd *pwPtr;
Tcl_MutexLock(&compatLock);
@@ -399,7 +405,6 @@ TclpGetGrNam(
return getgrnam_r(name, &tsdPtr->grp, tsdPtr->gbuf, sizeof(tsdPtr->gbuf));
#else
-#define NEED_COPYGRP 1
struct group *grPtr;
Tcl_MutexLock(&compatLock);
@@ -480,7 +485,6 @@ TclpGetGrGid(
return getgrgid_r(gid, &tsdPtr->grp, tsdPtr->gbuf, sizeof(tsdPtr->gbuf));
#else
-#define NEED_COPYGRP 1
struct group *grPtr;
Tcl_MutexLock(&compatLock);
diff --git a/unix/tclooConfig.sh b/unix/tclooConfig.sh
index 68de106..dce540a 100644
--- a/unix/tclooConfig.sh
+++ b/unix/tclooConfig.sh
@@ -16,4 +16,4 @@ TCLOO_STUB_LIB_SPEC=""
TCLOO_INCLUDE_SPEC=""
TCLOO_PRIVATE_INCLUDE_SPEC=""
TCLOO_CFLAGS=-DUSE_TCLOO_STUBS
-TCLOO_VERSION=0.6.3
+TCLOO_VERSION=0.7
diff --git a/win/Makefile.in b/win/Makefile.in
index 84dcaf7..b616737 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -456,8 +456,12 @@ ${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE}
@MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
# use pre-built zlib1.dll
-${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE}
- @$(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}
+${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE}
+ @if test "@ZLIB_LIBS@set" == "${ZLIB_DIR}/win64/zdll.libset" ; then \
+ $(COPY) $(ZLIB_DIR)/win64/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
+ else \
+ $(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
+ fi;
# Add the object extension to the implicit rules. By default .obj is not
# automatically added.
@@ -643,8 +647,8 @@ install-libraries: libraries install-tzdata install-msgs
do \
$(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \
done;
- @echo "Installing package msgcat 1.4.5 as a Tcl Module";
- @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.5.tm;
+ @echo "Installing package msgcat 1.5.0 as a Tcl Module";
+ @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.5.0.tm;
@echo "Installing package tcltest 2.3.4 as a Tcl Module";
@$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.4.tm;
@echo "Installing package platform 1.0.10 as a Tcl Module";
@@ -697,14 +701,14 @@ test-tcl: binaries $(TCLSH) $(CAT32) $(TEST_DLL_FILE)
TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
./$(TCLSH) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \
-load "package ifneeded Tcltest ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}] Tcltest]; \
- package ifneeded dde 1.4.0b1 [list load [file normalize ${DDE_DLL_FILE}] dde]; \
+ package ifneeded dde 1.4.0b2 [list load [file normalize ${DDE_DLL_FILE}] dde]; \
package ifneeded registry 1.3.0 [list load [file normalize ${REG_DLL_FILE}] registry]" | ./$(CAT32)
# Useful target to launch a built tclsh with the proper path,...
runtest: binaries $(TCLSH) $(TEST_DLL_FILE)
@TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
./$(TCLSH) $(TESTFLAGS) -load "package ifneeded Tcltest ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}] Tcltest]; \
- package ifneeded dde 1.4.0b1 [list load [file normalize ${DDE_DLL_FILE}] dde]; \
+ package ifneeded dde 1.4.0b2 [list load [file normalize ${DDE_DLL_FILE}] dde]; \
package ifneeded registry 1.3.0 [list load [file normalize ${REG_DLL_FILE}] registry]" $(SCRIPT)
# This target can be used to run tclsh from the build directory via
@@ -782,7 +786,7 @@ test-packages: tcltest packages
pkg=`basename $$i`; \
if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \
echo "Testing package '$$pkg'"; \
- ( cd $(PKG_DIR)/$$pkg; $(MAKE) "LD_LIBRARY_PATH=$$builddir:${LD_LIBRARY_PATH}" "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" "TCLLIBPATH=$$builddir/pkgs" test "TCLSH_PROG=$$builddir/tcltest"; ) \
+ ( cd $(PKG_DIR)/$$pkg; $(MAKE) "LD_LIBRARY_PATH=$$builddir:${LD_LIBRARY_PATH}" "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" "TCLLIBPATH=$$builddir/pkgs" test "TCLSH_PROG=$$builddir/${TCLSH}"; ) \
fi; \
fi; \
done; \
diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat
index c33aefd..e4f0a30 100755
--- a/win/buildall.vc.bat
+++ b/win/buildall.vc.bat
@@ -1,4 +1,5 @@
@echo off
+
:: This is an example batchfile for building everything. Please
:: edit this (or make your own) for your needs and wants using
:: the instructions for calling makefile.vc found in makefile.vc
@@ -26,10 +27,11 @@ cd > nul
:: path or have already run vcvars32.bat. Testing these envars proves
:: cl.exe and friends are in your path.
::
-if defined VCINSTALLDIR (goto :startBuilding)
-if defined MSDRVDIR (goto :startBuilding)
-if defined MSVCDIR (goto :startBuilding)
-if defined MSSDK (goto :startBuilding)
+if defined VCINSTALLDIR (goto :startBuilding)
+if defined MSDEVDIR (goto :startBuilding)
+if defined MSVCDIR (goto :startBuilding)
+if defined MSSDK (goto :startBuilding)
+if defined WINDOWSSDKDIR (goto :startBuilding)
:: We need to run the development environment batch script that comes
:: with developer studio (v4,5,6,7,etc...) All have it. This path
@@ -62,42 +64,13 @@ if not %SYMBOLS%.==. set OPTS=symbols
nmake -nologo -f makefile.vc release htmlhelp OPTS=%OPTS% %1
if errorlevel 1 goto error
-:: Build the static core, dlls and shell.
-::
-set OPTS=static
-if not %SYMBOLS%.==. set OPTS=symbols,static
-nmake -nologo -f makefile.vc release OPTS=%OPTS% %1
-if errorlevel 1 goto error
-
-:: Build the special static libraries that use the dynamic runtime.
+:: Build the static core and shell.
::
set OPTS=static,msvcrt
if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt
-nmake -nologo -f makefile.vc core dlls OPTS=%OPTS% %1
-if errorlevel 1 goto error
-
-:: Build the core and shell for thread support.
-::
-set OPTS=threads
-if not %SYMBOLS%.==. set OPTS=symbols,threads
nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1
if errorlevel 1 goto error
-:: Build a static, thread support core library with a shell.
-::
-set OPTS=static,threads
-if not %SYMBOLS%.==. set OPTS=symbols,static,threads
-nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1
-if errorlevel 1 goto error
-
-:: Build the special static libraries that use the dynamic runtime,
-:: but now with thread support.
-::
-set OPTS=static,msvcrt,threads
-if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt,threads
-nmake -nologo -f makefile.vc core dlls OPTS=%OPTS% %1
-if errorlevel 1 goto error
-
set OPTS=
set SYMBOLS=
goto end
diff --git a/win/configure b/win/configure
index f5a23fe..0258898 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="b2"
+TCL_PATCH_LEVEL="b3"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
@@ -4344,12 +4344,6 @@ esac
# as we just assume that the platform hasn't got a usable z.lib
#------------------------------------------------------------------------
-if test "$do64bit" = "yes"; then
-
- tcl_ok=no
-
-else
-
if test "${enable_shared+set}" = "set"; then
enableval="$enable_shared"
@@ -4361,14 +4355,21 @@ else
fi
-
-fi
-
if test "$tcl_ok" = "yes"; then
ZLIB_DLL_FILE=\${ZLIB_DLL_FILE}
- ZLIB_LIBS=\${ZLIB_DIR}/win32/zdll.lib
+ if test "$do64bit" = "yes"; then
+
+ ZLIB_LIBS=\${ZLIB_DIR}/win64/zdll.lib
+
+
+else
+
+ ZLIB_LIBS=\${ZLIB_DIR}/win32/zdll.lib
+
+
+fi
else
diff --git a/win/configure.in b/win/configure.in
index d17f815..0426bb1 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="b2"
+TCL_PATCH_LEVEL="b3"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
@@ -120,19 +120,19 @@ esac
# as we just assume that the platform hasn't got a usable z.lib
#------------------------------------------------------------------------
-AS_IF([test "$do64bit" = "yes"], [
- tcl_ok=no
-], [
AS_IF([test "${enable_shared+set}" = "set"], [
enableval="$enable_shared"
tcl_ok=$enableval
], [
tcl_ok=yes
])
-])
AS_IF([test "$tcl_ok" = "yes"], [
AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}])
- AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win32/zdll.lib])
+ AS_IF([test "$do64bit" = "yes"], [
+ AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win64/zdll.lib])
+ ], [
+ AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win32/zdll.lib])
+ ])
], [
AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])
AC_DEFINE_UNQUOTED(NO_VIZ, 1)
diff --git a/win/makefile.vc b/win/makefile.vc
index ba5b710..d097e26 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -578,13 +578,13 @@ test-core: setup $(TCLTEST) dlls $(CAT32)
set TCL_LIBRARY=$(ROOT:\=/)/library
!if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE"
$(DEBUGGER) $(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile <<
- package ifneeded dde 1.4.0b1 [list load "$(TCLDDELIB:\=/)" dde]
+ package ifneeded dde 1.4.0b2 [list load "$(TCLDDELIB:\=/)" dde]
package ifneeded registry 1.3.0 [list load "$(TCLREGLIB:\=/)" registry]
<<
!else
@echo Please wait while the tests are collected...
$(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile << > tests.log
- package ifneeded dde 1.4.0b1 "$(TCLDDELIB:\=/)" dde]
+ package ifneeded dde 1.4.0b2 "$(TCLDDELIB:\=/)" dde]
package ifneeded registry 1.3.0 "$(TCLREGLIB:\=/)" registry]
<<
type tests.log | more
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 2868857..b1a1517 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -47,7 +47,7 @@ static int CheckForLinkerFeature(const char *option);
static int IsIn(const char *string, const char *substring);
static int SubstituteFile(const char *substs, const char *filename);
static int QualifyPath(const char *path);
-static const char *GetVersionFromFile(const char *filename, const char *match);
+static const char *GetVersionFromFile(const char *filename, const char *match, int numdots);
static DWORD WINAPI ReadFromPipe(LPVOID args);
/* globals */
@@ -153,7 +153,7 @@ main(
&dwWritten, NULL);
return 0;
}
- printf("%s\n", GetVersionFromFile(argv[2], argv[3]));
+ printf("%s\n", GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0'));
return 0;
case 'Q':
if (argc != 3) {
@@ -479,7 +479,8 @@ IsIn(
static const char *
GetVersionFromFile(
const char *filename,
- const char *match)
+ const char *match,
+ int numdots)
{
size_t cbBuffer = 100;
static char szBuffer[100];
@@ -497,9 +498,10 @@ GetVersionFromFile(
p = strstr(szBuffer, match);
if (p != NULL) {
/*
- * Skip to first digit.
+ * Skip to first digit after the match.
*/
+ p += strlen(match);
while (*p && !isdigit(*p)) {
++p;
}
@@ -509,7 +511,8 @@ GetVersionFromFile(
*/
q = p;
- while (*q && (isalnum(*q) || *q == '.')) {
+ while (*q && (strchr("0123456789.ab", *q)) && ((!strchr(".ab", *q)
+ && (!strchr("ab", q[-1])) || --numdots))) {
++q;
}
@@ -628,11 +631,11 @@ SubstituteFile(
}
}
#endif
-
+
/*
* Run the substitutions over each line of the input
*/
-
+
while (fgets(szBuffer, cbBuffer, fp) != NULL) {
list_item_t *p = NULL;
for (p = substPtr; p != NULL; p = p->nextPtr) {
@@ -652,7 +655,7 @@ SubstituteFile(
}
printf(szBuffer);
}
-
+
list_free(&substPtr);
}
fclose(fp);
diff --git a/win/rules.vc b/win/rules.vc
index f09e2ea..1513198 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -218,7 +218,7 @@ DEBUG = 0
SYMBOLS = 0
PROFILE = 0
PGO = 0
-MSVCRT = 0
+MSVCRT = 1
LOIMPACT = 0
TCL_USE_STATIC_PACKAGES = 0
USE_THREAD_ALLOC = 1
@@ -234,9 +234,13 @@ STATIC_BUILD = 0
!message *** Doing msvcrt
MSVCRT = 1
!else
+!if !$(STATIC_BUILD)
+MSVCRT = 1
+!else
MSVCRT = 0
!endif
-!if [nmakehlp -f $(OPTS) "staticpkg"]
+!endif
+!if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD)
!message *** Doing staticpkg
TCL_USE_STATIC_PACKAGES = 1
!else
@@ -245,6 +249,7 @@ TCL_USE_STATIC_PACKAGES = 0
!if [nmakehlp -f $(OPTS) "nothreads"]
!message *** Compile explicitly for non-threaded tcl
TCL_THREADS = 0
+USE_THREAD_ALLOC= 0
!else
TCL_THREADS = 1
USE_THREAD_ALLOC= 1
@@ -298,15 +303,6 @@ UNCHECKED = 0
!endif
!endif
-
-!if !$(STATIC_BUILD)
-# Make sure we don't build overly fat DLLs.
-MSVCRT = 1
-# We shouldn't statically put the extensions inside the shell when dynamic.
-TCL_USE_STATIC_PACKAGES = 0
-!endif
-
-
#----------------------------------------------------------
# Figure-out how to name our intermediate and output directories.
# We wouldn't want different builds to use the same .obj files
@@ -348,10 +344,8 @@ TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX
TMP_DIRFULL = $(TMP_DIRFULL:Static=)
SUFX = $(SUFX:s=)
EXT = dll
-!if $(MSVCRT)
TMP_DIRFULL = $(TMP_DIRFULL:X=)
SUFX = $(SUFX:x=)
-!endif
!else
TMP_DIRFULL = $(TMP_DIRFULL:Dynamic=)
EXT = lib
@@ -583,12 +577,6 @@ Failed to find tcl.h. The TCLDIR macro does not appear correct.
TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
-!if $(TCL_VERSION) < 81
-TCL_DOES_STUBS = 0
-!else
-TCL_DOES_STUBS = 1
-!endif
-
!if $(TCLINSTALL)
TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
!if !exist($(TCLSH)) && $(TCL_THREADS)
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index d6da500..56f45a0 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -109,9 +109,9 @@ _tmain(
* Forward slashes substituted for backslashes.
*/
- for (p = argv[0]; *p != TEXT('\0'); p++) {
- if (*p == TEXT('\\')) {
- *p = TEXT('/');
+ for (p = argv[0]; *p != '\0'; p++) {
+ if (*p == '\\') {
+ *p = '/';
}
}
@@ -242,13 +242,13 @@ setargv(
*/
size = 2;
- for (p = cmdLine; *p != TEXT('\0'); p++) {
- if ((*p == TEXT(' ')) || (*p == TEXT('\t'))) { /* INTL: ISO space. */
+ for (p = cmdLine; *p != '\0'; p++) {
+ if ((*p == ' ') || (*p == '\t')) { /* INTL: ISO space. */
size++;
- while ((*p == TEXT(' ')) || (*p == TEXT('\t'))) { /* INTL: ISO space. */
+ while ((*p == ' ') || (*p == '\t')) { /* INTL: ISO space. */
p++;
}
- if (*p == TEXT('\0')) {
+ if (*p == '\0') {
break;
}
}
@@ -267,10 +267,10 @@ setargv(
p = cmdLine;
for (argc = 0; argc < size; argc++) {
argv[argc] = arg = argSpace;
- while ((*p == TEXT(' ')) || (*p == TEXT('\t'))) { /* INTL: ISO space. */
+ while ((*p == ' ') || (*p == '\t')) { /* INTL: ISO space. */
p++;
}
- if (*p == TEXT('\0')) {
+ if (*p == '\0') {
break;
}
@@ -278,14 +278,14 @@ setargv(
slashes = 0;
while (1) {
copy = 1;
- while (*p == TEXT('\\')) {
+ while (*p == '\\') {
slashes++;
p++;
}
- if (*p == TEXT('"')) {
+ if (*p == '"') {
if ((slashes & 1) == 0) {
copy = 0;
- if ((inquote) && (p[1] == TEXT('"'))) {
+ if ((inquote) && (p[1] == '"')) {
p++;
copy = 1;
} else {
@@ -296,13 +296,13 @@ setargv(
}
while (slashes) {
- *arg = TEXT('\\');
+ *arg = '\\';
arg++;
slashes--;
}
- if ((*p == TEXT('\0')) || (!inquote &&
- ((*p == TEXT(' ')) || (*p == TEXT('\t'))))) { /* INTL: ISO space. */
+ if ((*p == '\0') || (!inquote &&
+ ((*p == ' ') || (*p == '\t')))) { /* INTL: ISO space. */
break;
}
if (copy != 0) {
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index 23b3a8e..f5c0484 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -17,13 +17,7 @@
#include <dde.h>
#include <ddeml.h>
-#ifdef UNICODE
-# if !defined(NDEBUG)
- /* test POKE server Implemented for UNICODE in debug mode only */
-# undef CBF_FAIL_POKES
-# define CBF_FAIL_POKES 0
-# endif
-#else
+#ifndef UNICODE
# undef CP_WINUNICODE
# define CP_WINUNICODE CP_WINANSI
# undef Tcl_WinTCharToUtf
@@ -32,6 +26,12 @@
# define Tcl_WinUtfToTChar(a,b,c) Tcl_UtfToExternalDString(NULL,a,b,c)
#endif
+#if !defined(NDEBUG)
+ /* test POKE server Implemented for debug mode only */
+# undef CBF_FAIL_POKES
+# define CBF_FAIL_POKES 0
+#endif
+
/*
* TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the Dde_Init
* declaration is in the source file itself, which is only accessed when we
@@ -96,7 +96,7 @@ static DWORD ddeInstance; /* The application instance handle given to us
* by DdeInitialize. */
static int ddeIsServer = 0;
-#define TCL_DDE_VERSION "1.4.0b1"
+#define TCL_DDE_VERSION "1.4.0b2"
#define TCL_DDE_PACKAGE_NAME "dde"
#define TCL_DDE_SERVICE_NAME TEXT("TclEval")
#define TCL_DDE_EXECUTE_RESULT TEXT("$TCLEVAL$EXECUTE$RESULT")
@@ -756,7 +756,7 @@ DdeServerProc(
} else {
returnString = (char *)
Tcl_GetUnicodeFromObj(convPtr->returnPackagePtr, &len);
- len = 2 * len + 1;
+ len = sizeof(TCHAR) * len + 1;
}
ddeReturn = DdeCreateDataHandle(ddeInstance, (BYTE *)returnString,
(DWORD) len+1, 0, ddeItem, uFmt, 0);
@@ -777,7 +777,7 @@ DdeServerProc(
} else {
returnString = (char *) Tcl_GetUnicodeFromObj(
variableObjPtr, &len);
- len = 2 * len + 1;
+ len = sizeof(TCHAR) * len + 1;
}
ddeReturn = DdeCreateDataHandle(ddeInstance,
(BYTE *)returnString, (DWORD) len+1, 0, ddeItem,
@@ -1494,15 +1494,15 @@ DdeObjCmd(
case DDE_EXECUTE: {
int dataLength;
- const char *dataString;
+ const Tcl_UniChar *dataString;
if (flags & DDE_FLAG_BINARY) {
- dataString = (const char *)
+ dataString = (const Tcl_UniChar *)
Tcl_GetByteArrayFromObj(objv[firstArg + 2], &dataLength);
} else {
dataString =
- Tcl_GetStringFromObj(objv[firstArg + 2], &dataLength);
- dataLength += 1;
+ Tcl_GetUnicodeFromObj(objv[firstArg + 2], &dataLength);
+ dataLength = (dataLength + 1) * sizeof(Tcl_UniChar);
}
if (dataLength <= 0) {
@@ -1523,15 +1523,15 @@ DdeObjCmd(
}
ddeData = DdeCreateDataHandle(ddeInstance, (BYTE *) dataString,
- (DWORD) dataLength, 0, 0, CF_TEXT, 0);
+ (DWORD) dataLength, 0, 0, (flags & DDE_FLAG_BINARY) ? CF_TEXT : CF_UNICODETEXT, 0);
if (ddeData != NULL) {
if (flags & DDE_FLAG_ASYNC) {
DdeClientTransaction((LPBYTE) ddeData, 0xFFFFFFFF, hConv, 0,
- CF_TEXT, XTYP_EXECUTE, TIMEOUT_ASYNC, &ddeResult);
+ (flags & DDE_FLAG_BINARY) ? CF_TEXT : CF_UNICODETEXT, XTYP_EXECUTE, TIMEOUT_ASYNC, &ddeResult);
DdeAbandonTransaction(ddeInstance, hConv, ddeResult);
} else {
ddeReturn = DdeClientTransaction((LPBYTE) ddeData, 0xFFFFFFFF,
- hConv, 0, CF_TEXT, XTYP_EXECUTE, 30000, NULL);
+ hConv, 0, (flags & DDE_FLAG_BINARY) ? CF_TEXT : CF_UNICODETEXT, XTYP_EXECUTE, 30000, NULL);
if (ddeReturn == 0) {
SetDdeError(interp);
result = TCL_ERROR;
@@ -1573,22 +1573,23 @@ DdeObjCmd(
CP_WINUNICODE);
if (ddeItem != NULL) {
ddeData = DdeClientTransaction(NULL, 0, hConv, ddeItem,
- CF_TEXT, XTYP_REQUEST, 5000, NULL);
+ (flags & DDE_FLAG_BINARY) ? CF_TEXT : CF_UNICODETEXT, XTYP_REQUEST, 5000, NULL);
if (ddeData == NULL) {
SetDdeError(interp);
result = TCL_ERROR;
} else {
DWORD tmp;
- const char *dataString = (const char *) DdeAccessData(ddeData, &tmp);
+ const Tcl_UniChar *dataString = (const Tcl_UniChar *) DdeAccessData(ddeData, &tmp);
if (flags & DDE_FLAG_BINARY) {
returnObjPtr =
Tcl_NewByteArrayObj((BYTE *) dataString, (int) tmp);
} else {
- if (tmp && !dataString[tmp-1]) {
+ tmp >>= 1;
+ if (tmp && !dataString[(tmp-1)]) {
--tmp;
}
- returnObjPtr = Tcl_NewStringObj(dataString,
+ returnObjPtr = Tcl_NewUnicodeObj(dataString,
(int) tmp);
}
DdeUnaccessData(ddeData);
@@ -1625,8 +1626,8 @@ DdeObjCmd(
Tcl_GetByteArrayFromObj(objv[firstArg + 3], &length);
} else {
dataString = (BYTE *)
- Tcl_GetStringFromObj(objv[firstArg + 3], &length);
- length += 1;
+ Tcl_GetUnicodeFromObj(objv[firstArg + 3], &length);
+ length = 2 * length + 1;
}
hConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL);
@@ -1641,7 +1642,7 @@ DdeObjCmd(
CP_WINUNICODE);
if (ddeItem != NULL) {
ddeData = DdeClientTransaction(dataString, (DWORD) length,
- hConv, ddeItem, CF_TEXT, XTYP_POKE, 5000, NULL);
+ hConv, ddeItem, (flags & DDE_FLAG_BINARY) ? CF_TEXT : CF_UNICODETEXT, XTYP_POKE, 5000, NULL);
if (ddeData == NULL) {
SetDdeError(interp);
result = TCL_ERROR;
@@ -1784,24 +1785,24 @@ DdeObjCmd(
}
objPtr = Tcl_ConcatObj(objc, objv);
- string = Tcl_GetStringFromObj(objPtr, &length);
+ string = (const char *) Tcl_GetUnicodeFromObj(objPtr, &length);
ddeItemData = DdeCreateDataHandle(ddeInstance,
- (BYTE *) string, (DWORD) length+1, 0, 0, CF_TEXT, 0);
+ (BYTE *) string, (DWORD) 2*length+2, 0, 0, CF_UNICODETEXT, 0);
if (flags & DDE_FLAG_ASYNC) {
ddeData = DdeClientTransaction((LPBYTE) ddeItemData,
0xFFFFFFFF, hConv, 0,
- CF_TEXT, XTYP_EXECUTE, TIMEOUT_ASYNC, &ddeResult);
+ CF_UNICODETEXT, XTYP_EXECUTE, TIMEOUT_ASYNC, &ddeResult);
DdeAbandonTransaction(ddeInstance, hConv, ddeResult);
} else {
ddeData = DdeClientTransaction((LPBYTE) ddeItemData,
0xFFFFFFFF, hConv, 0,
- CF_TEXT, XTYP_EXECUTE, 30000, NULL);
+ CF_UNICODETEXT, XTYP_EXECUTE, 30000, NULL);
if (ddeData != 0) {
ddeCookie = DdeCreateStringHandle(ddeInstance,
TCL_DDE_EXECUTE_RESULT, CP_WINUNICODE);
ddeData = DdeClientTransaction(NULL, 0, hConv, ddeCookie,
- CF_TEXT, XTYP_REQUEST, 30000, NULL);
+ CF_UNICODETEXT, XTYP_REQUEST, 30000, NULL);
}
}
@@ -1815,6 +1816,7 @@ DdeObjCmd(
if (!(flags & DDE_FLAG_ASYNC)) {
Tcl_Obj *resultPtr;
+ Tcl_UniChar *ddeDataString;
/*
* The return handle has a two or four element list in it. The
@@ -1827,10 +1829,11 @@ DdeObjCmd(
resultPtr = Tcl_NewObj();
length = DdeGetData(ddeData, NULL, 0, 0);
- Tcl_SetObjLength(resultPtr, (length + 1) * sizeof(TCHAR) - 1);
- string = Tcl_GetString(resultPtr);
- DdeGetData(ddeData, (BYTE *) string, (DWORD) length, 0);
- Tcl_SetObjLength(resultPtr, (int) strlen(string));
+ ddeDataString = ckalloc(length);
+ DdeGetData(ddeData, (BYTE *) ddeDataString, (DWORD) length, 0);
+ length = (length >> 1) - 1;
+ resultPtr = Tcl_NewUnicodeObj(ddeDataString, length);
+ ckfree(ddeDataString);
if (Tcl_ListObjIndex(NULL, resultPtr, 0, &objPtr) != TCL_OK) {
Tcl_DecrRefCount(resultPtr);
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 80fad3e..ac88861 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -1738,11 +1738,11 @@ ConvertFileNameFormat(
}
nativeName = data.cAlternateFileName;
if (longShort) {
- if (data.cFileName[0] != TEXT('\0')) {
+ if (data.cFileName[0] != '\0') {
nativeName = data.cFileName;
}
} else {
- if (data.cAlternateFileName[0] == TEXT('\0')) {
+ if (data.cAlternateFileName[0] == '\0') {
nativeName = (TCHAR *) data.cFileName;
}
}
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index a44a257..a1189f5 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1784,7 +1784,7 @@ NativeIsExec(
return 0;
}
- if (path[len-4] != TEXT('.')) {
+ if (path[len-4] != '.') {
return 0;
}
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index c6ac2b7..48f7894 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -538,7 +538,6 @@ typedef DWORD_PTR * PDWORD_PTR;
#define getservbyname TclWinGetServByName
#define getsockopt TclWinGetSockOpt
-#define ntohs TclWinNToHS
#define setsockopt TclWinSetSockOpt
/* This type is not defined in the Windows headers */
#define socklen_t int
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 9f7caee..1a74354 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -72,7 +72,6 @@
#undef getservbyname
#undef getsockopt
-#undef ntohs
#undef setsockopt
/*
@@ -163,7 +162,7 @@ struct SocketInfo {
* socket event occurs.
*/
-typedef struct SocketEvent {
+typedef struct {
Tcl_Event header; /* Information that is standard for all
* events. */
SOCKET socket; /* Socket descriptor that is ready. Used to
@@ -191,7 +190,7 @@ typedef struct SocketEvent {
#define SOCKET_PENDING (1<<3) /* A message has been sent for this
* socket */
-typedef struct ThreadSpecificData {
+typedef struct {
HWND hwnd; /* Handle to window for socket messages. */
HANDLE socketThread; /* Thread handling the window */
Tcl_ThreadId threadId; /* Parent thread. */
@@ -2736,23 +2735,6 @@ TclWinSetSockOpt(
return setsockopt(s, level, optname, optval, optlen);
}
-unsigned short
-TclWinNToHS(
- unsigned short netshort)
-{
- /*
- * Check that WinSock is initialized; do not call it if not, to prevent
- * system crashes. This can happen at exit time if the exit handler for
- * WinSock ran before other exit handlers that want to use sockets.
- */
-
- if (!SocketsEnabled()) {
- return (unsigned short) -1;
- }
-
- return ntohs(netshort);
-}
-
char *
TclpInetNtoa(
struct in_addr addr)
diff --git a/win/tclooConfig.sh b/win/tclooConfig.sh
index 68de106..dce540a 100644
--- a/win/tclooConfig.sh
+++ b/win/tclooConfig.sh
@@ -16,4 +16,4 @@ TCLOO_STUB_LIB_SPEC=""
TCLOO_INCLUDE_SPEC=""
TCLOO_PRIVATE_INCLUDE_SPEC=""
TCLOO_CFLAGS=-DUSE_TCLOO_STUBS
-TCLOO_VERSION=0.6.3
+TCLOO_VERSION=0.7