summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-03-08 08:59:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-03-08 08:59:32 (GMT)
commita00c70241d676e238f275f3cd0265f2c5470ee7d (patch)
treeff66eb52b929bb532fe52f8cac03ce16ce0a8781
parent9c3e75d3d4c2a5b80155880c80b8f204cf88c896 (diff)
parent4b85ca90cba7edb9a10caead17ffa8d407e1e2b3 (diff)
downloadtcl-a00c70241d676e238f275f3cd0265f2c5470ee7d.zip
tcl-a00c70241d676e238f275f3cd0265f2c5470ee7d.tar.gz
tcl-a00c70241d676e238f275f3cd0265f2c5470ee7d.tar.bz2
merge from trunk
-rw-r--r--ChangeLog38
-rw-r--r--doc/AddErrInfo.36
-rw-r--r--generic/tclBinary.c9
-rw-r--r--generic/tclCompile.c3
-rw-r--r--generic/tclEncoding.c4
-rw-r--r--generic/tclIOUtil.c38
-rw-r--r--generic/tclLoad.c6
-rw-r--r--generic/tclParse.c14
-rw-r--r--generic/tclParse.h17
-rw-r--r--generic/tclUtil.c33
-rw-r--r--library/http/http.tcl6
-rw-r--r--library/http/pkgIndex.tcl2
-rw-r--r--tests/http.test12
-rw-r--r--tests/reg.test63
-rw-r--r--tests/source.test13
-rw-r--r--unix/Makefile.in9
-rwxr-xr-xunix/configure3
-rw-r--r--unix/tcl.m43
-rw-r--r--win/Makefile.in4
-rw-r--r--win/tclWinPort.h6
20 files changed, 206 insertions, 83 deletions
diff --git a/ChangeLog b/ChangeLog
index 808a585..af6d1ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,42 @@
+2012-03-07 Andreas Kupries <andreask@activestate.com>
+
+ * library/http/http.tcl: [Bug 3498327]: Generate upper-case
+ * library/http/pkgIndex.tcl: hexadecimal output for compliance
+ * tests/http.test: with RFC 3986. Bumped version to 2.8.4.
+ * unix/Makefile.in:
+ * win/Makefile.in:
+
+2012-03-06 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/tclWinPort.h: Compatibility with older Visual Studio versions.
+
+2012-03-04 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclLoad.c: Patch from the cygwin folks
+ * unix/tcl.m4:
+ * unix/configure: (re-generated)
+
+2012-03-02 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclBinary.c (Tcl_SetByteArrayObj): [Bug 3496014]: Only zero
+ out the memory block if it is not being immediately overwritten. (Our
+ caller might still overwrite, but we should at least avoid
+ known-useless work.)
+
+2012-02-29 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclIOUtil.c: [Bug 3466099]: BOM in Unicode
+ * generic/tclEncoding.c:
+ * tests/source.test
+
+2012-02-23 Donal K. Fellows <dkf@users.sf.net>
+
+ * tests/reg.test (14.21-23): Add tests relating to bug 1115587. Actual
+ bug is characterised by test marked with 'knownBug'.
+
2012-02-17 Jan Nijtmans <nijtmans@users.sf.net>
- * generic/tclIOUtil.c: [Bug 2233954] AIX: compile error
+ * generic/tclIOUtil.c: [Bug 2233954]: AIX: compile error
* unix/tclUnixPort.h:
2012-02-16 Donal K. Fellows <dkf@users.sf.net>
diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3
index 4087b41..e450a3e 100644
--- a/doc/AddErrInfo.3
+++ b/doc/AddErrInfo.3
@@ -108,6 +108,11 @@ by \fBTcl_GetReturnOptions\fR points to an unshared
\fBTcl_Obj\fR with reference count of zero. The dictionary
may be written to, either adding, removing, or overwriting
any entries in it, without the need to check for a shared object.
+As with any \fBTcl_Obj\fR with reference count of zero, it is up to
+the caller to arrange for its disposal with \fBTcl_DecrRefCount\fR or
+to a reference to it via \fBTcl_IncrRefCount\fR (or one of the many
+functions that call that, notably including \fBTcl_SetObjResult\fR and
+\fBTcl_SetVar2Ex\fR).
.PP
A typical usage for \fBTcl_GetReturnOptions\fR is to
retrieve the stack trace when script evaluation returns
@@ -123,6 +128,7 @@ if (code == TCL_ERROR) {
Tcl_DictObjGet(NULL, options, key, &stackTrace);
Tcl_DecrRefCount(key);
/* Do something with stackTrace */
+ Tcl_DecrRefCount(options);
}
.CE
.PP
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 0a340f2..444e7fa 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -305,11 +305,14 @@ Tcl_SetByteArrayObj(
length = (length < 0) ? 0 : length;
byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
- memset(byteArrayPtr, 0, BYTEARRAY_SIZE(length));
byteArrayPtr->used = length;
byteArrayPtr->allocated = length;
- if (bytes && length) {
- memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
+ if (length) {
+ if (bytes) {
+ memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
+ } else {
+ memset(byteArrayPtr->bytes, 0, (size_t) length);
+ }
}
objPtr->typePtr = &tclByteArrayType;
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 826e49c..1d88e11 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -4593,12 +4593,13 @@ RecordByteCodeStats(
* to add to accumulated statistics. */
{
Interp *iPtr = (Interp *) *codePtr->interpHandle;
- register ByteCodeStats *statsPtr = &iPtr->stats;
+ register ByteCodeStats *statsPtr;
if (iPtr == NULL) {
/* Avoid segfaulting in case we're called in a deleted interp */
return;
}
+ statsPtr = &(iPtr->stats);
statsPtr->numCompilations++;
statsPtr->totalSrcBytes += (double) codePtr->numSrcBytes;
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index ea228ef..c3fe485 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1002,13 +1002,13 @@ Tcl_GetEncodingNames(
int
Tcl_SetSystemEncoding(
Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */
- const char *name) /* The name of the desired encoding, or NULL
+ const char *name) /* The name of the desired encoding, or NULL/""
* to reset to default encoding. */
{
Tcl_Encoding encoding;
Encoding *encodingPtr;
- if (name == NULL) {
+ if (!name || !*name) {
Tcl_MutexLock(&encodingMutex);
encoding = defaultEncoding;
encodingPtr = (Encoding *) encoding;
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 0837070..9905256 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -18,7 +18,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#ifdef HAVE_SYS_STAT_H
+#if defined(HAVE_SYS_STAT_H) && !defined _WIN32
# include <sys/stat.h>
#endif
#include "tclInt.h"
@@ -1729,7 +1729,22 @@ Tcl_FSEvalFileEx(
objPtr = Tcl_NewObj();
Tcl_IncrRefCount(objPtr);
- if (Tcl_ReadChars(chan, objPtr, -1, 0) < 0) {
+ /* Try to read first character of stream, so we can
+ * check for utf-8 BOM to be handled especially.
+ */
+ if (Tcl_ReadChars(chan, objPtr, 1, 0) < 0) {
+ Tcl_Close(interp, chan);
+ Tcl_AppendResult(interp, "couldn't read file \"",
+ Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL);
+ goto end;
+ }
+ string = Tcl_GetString(objPtr);
+ /*
+ * If first character is not a BOM, append the remaining characters,
+ * otherwise replace them [Bug 3466099].
+ */
+ if (Tcl_ReadChars(chan, objPtr, -1,
+ memcmp(string, "\xef\xbb\xbf", 3)) < 0) {
Tcl_Close(interp, chan);
Tcl_AppendResult(interp, "couldn't read file \"",
Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL);
@@ -1798,6 +1813,7 @@ TclNREvalFile(
Tcl_Obj *oldScriptFile, *objPtr;
Interp *iPtr;
Tcl_Channel chan;
+ const char *string;
if (Tcl_FSGetNormalizedPath(interp, pathPtr) == NULL) {
return TCL_ERROR;
@@ -1839,13 +1855,29 @@ TclNREvalFile(
objPtr = Tcl_NewObj();
Tcl_IncrRefCount(objPtr);
- if (Tcl_ReadChars(chan, objPtr, -1, 0) < 0) {
+ /* Try to read first character of stream, so we can
+ * check for utf-8 BOM to be handled especially.
+ */
+ if (Tcl_ReadChars(chan, objPtr, 1, 0) < 0) {
Tcl_Close(interp, chan);
Tcl_AppendResult(interp, "couldn't read file \"",
Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL);
Tcl_DecrRefCount(objPtr);
return TCL_ERROR;
}
+ string = Tcl_GetString(objPtr);
+ /*
+ * If first character is not a BOM, append the remaining characters,
+ * otherwise replace them [Bug 3466099].
+ */
+ if (Tcl_ReadChars(chan, objPtr, -1,
+ memcmp(string, "\xef\xbb\xbf", 3)) < 0) {
+ Tcl_Close(interp, chan);
+ Tcl_AppendResult(interp, "couldn't read file \"",
+ Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL);
+ Tcl_DecrRefCount(objPtr);
+ return TCL_ERROR;
+ }
if (Tcl_Close(interp, chan) != TCL_OK) {
Tcl_DecrRefCount(objPtr);
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 820707e..202e66a 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -305,6 +305,12 @@ Tcl_LoadObjCmd(
&& (pkgGuess[2] == 'b')) {
pkgGuess += 3;
}
+#ifdef __CYGWIN__
+ if ((pkgGuess[0] == 'c') && (pkgGuess[1] == 'y')
+ && (pkgGuess[2] == 'g')) {
+ pkgGuess += 3;
+ }
+#endif /* __CYGWIN__ */
for (p = pkgGuess; *p != 0; p += offset) {
offset = Tcl_UtfToUniChar(p, &ch);
if ((ch > 0x100)
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 3c984bf..f0050c6 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -14,6 +14,7 @@
*/
#include "tclInt.h"
+#include "tclParse.h"
/*
* The following table provides parsing information about each possible 8-bit
@@ -41,18 +42,7 @@
* TYPE_BRACE - Character is a curly brace (either left or right).
*/
-#define TYPE_NORMAL 0
-#define TYPE_SPACE 0x1
-#define TYPE_COMMAND_END 0x2
-#define TYPE_SUBS 0x4
-#define TYPE_QUOTE 0x8
-#define TYPE_CLOSE_PAREN 0x10
-#define TYPE_CLOSE_BRACK 0x20
-#define TYPE_BRACE 0x40
-
-#define CHAR_TYPE(c) (charTypeTable+128)[(int)(c)]
-
-static const char charTypeTable[] = {
+const char charTypeTable[] = {
/*
* Negative character values, from -128 to -1:
*/
diff --git a/generic/tclParse.h b/generic/tclParse.h
new file mode 100644
index 0000000..be1ab15
--- /dev/null
+++ b/generic/tclParse.h
@@ -0,0 +1,17 @@
+/*
+ * Minimal set of shared macro definitions and declarations so that multiple
+ * source files can make use of the parsing table in tclParse.c
+ */
+
+#define TYPE_NORMAL 0
+#define TYPE_SPACE 0x1
+#define TYPE_COMMAND_END 0x2
+#define TYPE_SUBS 0x4
+#define TYPE_QUOTE 0x8
+#define TYPE_CLOSE_PAREN 0x10
+#define TYPE_CLOSE_BRACK 0x20
+#define TYPE_BRACE 0x40
+
+#define CHAR_TYPE(c) (charTypeTable+128)[(int)(c)]
+
+MODULE_SCOPE const char charTypeTable[];
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 31c9fd3..6ce430b 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -13,6 +13,7 @@
*/
#include "tclInt.h"
+#include "tclParse.h"
#include <math.h>
/*
@@ -972,15 +973,16 @@ TclScanElement(
}
while (length) {
+ if (CHAR_TYPE(*p) != TYPE_NORMAL) {
switch (*p) {
- case '{':
+ case '{': /* TYPE_BRACE */
#if COMPAT
braceCount++;
#endif
extra++; /* Escape '{' => '\{' */
nestingLevel++;
break;
- case '}':
+ case '}': /* TYPE_BRACE */
#if COMPAT
braceCount++;
#endif
@@ -991,8 +993,8 @@ TclScanElement(
requireEscape = 1;
}
break;
- case ']':
- case '"':
+ case ']': /* TYPE_CLOSE_BRACK */
+ case '"': /* TYPE_SPACE */
#if COMPAT
forbidNone = 1;
extra++; /* Escapes all just prepend a backslash */
@@ -1001,22 +1003,22 @@ TclScanElement(
#else
/* FLOW THROUGH */
#endif
- case '[':
- case '$':
- case ';':
- case ' ':
- case '\f':
- case '\n':
- case '\r':
- case '\t':
- case '\v':
+ case '[': /* TYPE_SUBS */
+ case '$': /* TYPE_SUBS */
+ case ';': /* TYPE_COMMAND_END */
+ case ' ': /* TYPE_SPACE */
+ case '\f': /* TYPE_SPACE */
+ case '\n': /* TYPE_COMMAND_END */
+ case '\r': /* TYPE_SPACE */
+ case '\t': /* TYPE_SPACE */
+ case '\v': /* TYPE_SPACE */
forbidNone = 1;
extra++; /* Escape sequences all one byte longer. */
#if COMPAT
preferBrace = 1;
#endif
break;
- case '\\':
+ case '\\': /* TYPE_SUBS */
extra++; /* Escape '\' => '\\' */
if ((length == 1) || ((length == -1) && (p[1] == '\0'))) {
/* Final backslash. Cannot format with brace quoting. */
@@ -1041,13 +1043,14 @@ TclScanElement(
preferBrace = 1;
#endif
break;
- case '\0':
+ case '\0': /* TYPE_SUBS */
if (length == -1) {
goto endOfString;
}
/* TODO: Panic on improper encoding? */
break;
}
+ }
length -= (length > 0);
p++;
}
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 6f0f4ce..b5ce82b 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.3
+package provide http 2.8.4
namespace eval http {
# Allow resourcing to not clobber existing data
@@ -43,11 +43,11 @@ namespace eval http {
for {set i 0} {$i <= 256} {incr i} {
set c [format %c $i]
if {![string match {[-._~a-zA-Z0-9]} $c]} {
- set map($c) %[format %.2x $i]
+ set map($c) %[format %.2X $i]
}
}
# These are handled specially
- set map(\n) %0d%0a
+ set map(\n) %0D%0A
variable formMap [array get map]
# Create a map for HTTP/1.1 open sockets
diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl
index d89b14b..d51f8a8 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.3 [list tclPkgSetup $dir http 2.8.3 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
+package ifneeded http 2.8.4 [list tclPkgSetup $dir http 2.8.4 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
diff --git a/tests/http.test b/tests/http.test
index d9c1efb..37d4a05 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -555,17 +555,17 @@ test http-5.1 {http::formatQuery} {
# test http-5.2 obsoleted by 5.4 and 5.5 with http 2.5
test http-5.3 {http::formatQuery} {
http::formatQuery lines "line1\nline2\nline3"
-} {lines=line1%0d%0aline2%0d%0aline3}
+} {lines=line1%0D%0Aline2%0D%0Aline3}
test http-5.4 {http::formatQuery} {
http::formatQuery name1 ~bwelch name2 \xa1\xa2\xa2
-} {name1=~bwelch&name2=%c2%a1%c2%a2%c2%a2}
+} {name1=~bwelch&name2=%C2%A1%C2%A2%C2%A2}
test http-5.5 {http::formatQuery} {
set enc [http::config -urlencoding]
http::config -urlencoding iso8859-1
set res [http::formatQuery name1 ~bwelch name2 \xa1\xa2\xa2]
http::config -urlencoding $enc
set res
-} {name1=~bwelch&name2=%a1%a2%a2}
+} {name1=~bwelch&name2=%A1%A2%A2}
test http-6.1 {http::ProxyRequired} -body {
http::config -proxyhost [info hostname] -proxyport $port
@@ -583,12 +583,12 @@ test http-6.1 {http::ProxyRequired} -body {
test http-7.1 {http::mapReply} {
http::mapReply "abc\$\[\]\"\\()\}\{"
-} {abc%24%5b%5d%22%5c%28%29%7d%7b}
+} {abc%24%5B%5D%22%5C%28%29%7D%7B}
test http-7.2 {http::mapReply} {
# RFC 2718 specifies that we pass urlencoding on utf-8 chars by default,
# so make sure this gets converted to utf-8 then urlencoded.
http::mapReply "\u2208"
-} {%e2%88%88}
+} {%E2%88%88}
test http-7.3 {http::formatQuery} -setup {
set enc [http::config -urlencoding]
} -returnCodes error -body {
@@ -607,7 +607,7 @@ test http-7.4 {http::formatQuery} -setup {
http::mapReply "\u2208"
} -cleanup {
http::config -urlencoding $enc
-} -result {%3f}
+} -result {%3F}
# cleanup
catch {unset url}
diff --git a/tests/reg.test b/tests/reg.test
index ca6cdd1..abfc9ca 100644
--- a/tests/reg.test
+++ b/tests/reg.test
@@ -174,14 +174,32 @@ namespace eval RETest {
return $ret
}
+ # Share the generation of the list of test constraints so it is
+ # done the same on all routes.
+ proc TestConstraints {flags} {
+ set constraints [list testregexp]
+
+ variable regBug
+ if {$regBug} {
+ # This will trigger registration as a skipped test
+ lappend constraints knownBug
+ }
+
+ # Tcl locale stuff doesn't do the ch/xy test fakery yet
+ if {[string match *+* $flags]} {
+ # This will trigger registration as a skipped test
+ lappend constraints localeRegexp
+ }
+
+ return $constraints
+ }
+
# match expected, internal routine that does the work
# parameters like the "real" routines except they don't have "opts",
# which is a possibly-empty list of switches for the regexp match attempt
# The ! flag is used to indicate expected match failure (for REG_EXPECT,
# which wants argument testing even in the event of failure).
proc MatchExpected {opts testid flags re target args} {
- variable regBug
-
# if &, test as both BRE and ARE
if {[string match *&* $flags]} {
set f [string map {& {}} $flags]
@@ -190,18 +208,7 @@ namespace eval RETest {
return
}
- set constraints [list testregexp]
-
- if {$regBug} {
- # This will register as a skipped test
- lappend constraints knownBug
- }
-
- # Tcl locale stuff doesn't do the ch/xy test fakery yet
- if {[string match *+* $flags]} {
- # This will register as a skipped test
- lappend constraints localeRegexp
- }
+ set constraints [TestConstraints $flags]
set f [TestFlags $flags]
set infoflags [TestInfoFlags $flags]
@@ -252,13 +259,7 @@ namespace eval RETest {
return
}
- set constraints [list testregexp]
-
- # Tcl locale stuff doesn't do the ch/xy test fakery yet
- if {[string match *+* $flags]} {
- # This will register as a skipped test
- lappend constraints localeRegexp
- }
+ set constraints [TestConstraints $flags]
set cmd [list testregexp -about {*}[TestFlags $flags] $re]
::tcltest::test [TestNum $testid error] [TestDesc $testid error] \
@@ -268,6 +269,7 @@ namespace eval RETest {
# match failure expected
proc expectNomatch {testid flags re target args} {
+ variable regBug
# if &, test as both ARE and BRE
if {[string match *&* $flags]} {
set f [string map {& {}} $flags]
@@ -276,13 +278,7 @@ namespace eval RETest {
return
}
- set constraints [list testregexp]
-
- # Tcl locale stuff doesn't do the ch/xy test fakery yet
- if {[string match *+* $flags]} {
- # This will register as a skipped test
- lappend constraints localeRegexp
- }
+ set constraints [TestConstraints $flags]
set f [TestFlags $flags]
set infoflags [TestInfoFlags $flags]
@@ -331,7 +327,7 @@ namespace eval RETest {
}
}
namespace import RETest::*
-
+
######## the tests themselves ########
# support functions and preliminary misc.
@@ -668,6 +664,9 @@ expectMatch 14.17 RP {a([bc])(\1*)} ab ab b ""
expectError 14.18 - {a((b)\1)} ESUBREG
expectError 14.19 - {a(b)c\2} ESUBREG
expectMatch 14.20 bR {a\(b*\)c\1} abbcbb abbcbb bb
+expectMatch 14.21 RP {^([bc])\1*$} bbb bbb b
+expectMatch 14.22 RP {^([bc])\1*$} ccc ccc c
+knownBug expectNomatch 14.23 R {^([bc])\1*$} bcb
doing 15 "octal escapes vs back references"
@@ -1078,7 +1077,11 @@ test reg-33.13 {Bug 1810264 - infinite loop} {
test reg-33.14 {Bug 1810264 - super-expensive expression} nonPortable {
regexp {(x{200}){200}$y} {x}
} 0
-
+
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End:
diff --git a/tests/source.test b/tests/source.test
index 081a129..d71212d 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -107,6 +107,19 @@ test source-2.6 {source error conditions} -setup {
} -match listGlob -result [list 1 \
{couldn't read file "*_non_existent_": no such file or directory} \
{POSIX ENOENT {no such file or directory}}]
+test source-2.7 {utf-8 with BOM} -setup {
+ set sourcefile [makeFile {} source.file]
+} -body {
+ set out [open $sourcefile w]
+ fconfigure $out -encoding utf-8
+ puts $out "\ufeffset y new-y"
+ close $out
+ set y old-y
+ source -encoding utf-8 $sourcefile
+ return $y
+} -cleanup {
+ removeFile $sourcefile
+} -result {new-y}
test source-3.1 {return in middle of source file} -setup {
set sourcefile [makeFile {
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 154f1b9..0a22a58 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -829,8 +829,8 @@ install-libraries: libraries
do \
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \
done;
- @echo "Installing package http 2.8.3 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.3.tm;
+ @echo "Installing package http 2.8.4 as a Tcl Module";
+ @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.4.tm;
@echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/";
@for i in $(TOP_DIR)/library/opt/*.tcl ; \
do \
@@ -990,6 +990,7 @@ COMPILEHDR=$(GENERIC_DIR)/tclCompile.h
FSHDR=$(GENERIC_DIR)/tclFileSystem.h
IOHDR=$(GENERIC_DIR)/tclIO.h
MATHHDRS=$(GENERIC_DIR)/tommath.h $(GENERIC_DIR)/tclTomMath.h
+PARSEHDR=$(GENERIC_DIR)/tclParse.h
NREHDR=$(GENERIC_DIR)/tclInt.h
regcomp.o: $(REGHDRS) $(GENERIC_DIR)/regcomp.c $(GENERIC_DIR)/regc_lex.c \
@@ -1186,7 +1187,7 @@ tclOOMethod.o: $(GENERIC_DIR)/tclOOMethod.c
tclOOStubInit.o: $(GENERIC_DIR)/tclOOStubInit.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOOStubInit.c
-tclParse.o: $(GENERIC_DIR)/tclParse.c
+tclParse.o: $(GENERIC_DIR)/tclParse.c $(PARSEHDR)
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclParse.c
tclPanic.o: $(GENERIC_DIR)/tclPanic.c
@@ -1258,7 +1259,7 @@ tclStubInit.o: $(GENERIC_DIR)/tclStubInit.c
tclTrace.o: $(GENERIC_DIR)/tclTrace.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTrace.c
-tclUtil.o: $(GENERIC_DIR)/tclUtil.c
+tclUtil.o: $(GENERIC_DIR)/tclUtil.c $(PARSEHDR)
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclUtil.c
tclUtf.o: $(GENERIC_DIR)/tclUtf.c $(GENERIC_DIR)/tclUniData.c
diff --git a/unix/configure b/unix/configure
index 72d704d..72d5d73 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7061,6 +7061,9 @@ fi
DL_LIBS="-ldl"
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a'
+ TCL_SHLIB_LD_EXTRAS='-Wl,--out-implib,$@.a'
;;
dgux*)
SHLIB_CFLAGS="-K PIC"
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 2f7cb16..39f8ca1 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1228,6 +1228,9 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
DL_LIBS="-ldl"
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a'
+ TCL_SHLIB_LD_EXTRAS='-Wl,--out-implib,$[@].a'
;;
dgux*)
SHLIB_CFLAGS="-K PIC"
diff --git a/win/Makefile.in b/win/Makefile.in
index 8880dc6..8492b8f 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -662,8 +662,8 @@ install-libraries: libraries install-tzdata install-msgs
do \
$(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \
done;
- @echo "Installing package http 2.8.3 as a Tcl Module";
- @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.3.tm;
+ @echo "Installing package http 2.8.4 as a Tcl Module";
+ @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.4.tm;
@echo "Installing library opt0.4 directory";
@for j in $(ROOT_DIR)/library/opt/*.tcl; \
do \
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index d94bfda..e5dac8c 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -36,6 +36,12 @@
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
+/* Compatibility to older visual studio / windows platform SDK */
+#if !defined(MAXULONG_PTR)
+typedef DWORD DWORD_PTR;
+typedef DWORD_PTR * PDWORD_PTR;
+#endif
+
/*
* Ask for the winsock function typedefs, also.
*/