summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-04-28 18:09:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-04-28 18:09:46 (GMT)
commit9a454635ecd23f4e1976376f84adf53755d6517e (patch)
treef59e7d0209bb55b8db7983df51e0fa641db432bb
parentc9faf05d63a694096dc57c1ee4f301edb4883e84 (diff)
parent20e304e69bb30dbe0c5d9266d1841d39b6a003f2 (diff)
downloadtcl-9a454635ecd23f4e1976376f84adf53755d6517e.zip
tcl-9a454635ecd23f4e1976376f84adf53755d6517e.tar.gz
tcl-9a454635ecd23f4e1976376f84adf53755d6517e.tar.bz2
merge 8.6; update changes
-rw-r--r--changes4
-rw-r--r--generic/tclExecute.c8
-rw-r--r--generic/tclPathObj.c7
-rw-r--r--tests/fileName.test3
-rw-r--r--unix/tclUnixSock.c2
-rw-r--r--win/tclWinConsole.c2
-rw-r--r--win/tclWinPipe.c2
7 files changed, 19 insertions, 9 deletions
diff --git a/changes b/changes
index 33b1bb7..872a407 100644
--- a/changes
+++ b/changes
@@ -8763,4 +8763,6 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
2017-04-18 (bug)[bc4322] http package support for safe interps (nash,nijtmans)
---- Released 8.6.7, April 30, 2016 --- http://core.tcl.tk/tcl/ for details
+2017-04-28 (bug)[f34cf8] [file join a //b] => /b (neumann,porter)
+
+--- Released 8.6.7, May 10, 2016 --- http://core.tcl.tk/tcl/ for details
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index cb4e6dc..6499cf8 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -510,8 +510,7 @@ VarHashCreateVar(
: (*(tPtr) = TCL_NUMBER_DOUBLE)), \
*(ptrPtr) = (ClientData) \
(&((objPtr)->internalRep.doubleValue)), TCL_OK) : \
- ((((objPtr)->typePtr == NULL) && ((objPtr)->bytes == NULL)) || \
- (((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \
+ (((objPtr)->bytes != NULL) && ((objPtr)->length == 0)) \
? (*(tPtr) = TCL_NUMBER_LONG),TCL_ERROR : \
TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr)))
#else /* !TCL_WIDE_INT_IS_LONG */
@@ -530,8 +529,7 @@ VarHashCreateVar(
: (*(tPtr) = TCL_NUMBER_DOUBLE)), \
*(ptrPtr) = (ClientData) \
(&((objPtr)->internalRep.doubleValue)), TCL_OK) : \
- ((((objPtr)->typePtr == NULL) && ((objPtr)->bytes == NULL)) || \
- (((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \
+ (((objPtr)->bytes != NULL) && ((objPtr)->length == 0)) \
? (*(tPtr) = TCL_NUMBER_LONG),TCL_ERROR : \
TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr)))
#endif /* TCL_WIDE_INT_IS_LONG */
@@ -9410,7 +9408,7 @@ TclCompareTwoNumbers(
Tcl_Obj *valuePtr,
Tcl_Obj *value2Ptr)
{
- int type1, type2, compare;
+ int type1 = TCL_NUMBER_NAN, type2 = TCL_NUMBER_NAN, compare;
ClientData ptr1, ptr2;
mp_int big1, big2;
double d1, d2, tmp;
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index c2643bf..20f41a3 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -948,6 +948,7 @@ TclJoinPath(
}
}
strElt = Tcl_GetStringFromObj(elt, &strEltLen);
+ driveNameLength = 0;
type = TclGetPathType(elt, &fsPtr, &driveNameLength, &driveName);
if (type != TCL_PATH_RELATIVE) {
/*
@@ -1003,6 +1004,12 @@ TclJoinPath(
}
}
ptr = strElt;
+ /* [Bug f34cf83dd0] */
+ if (driveNameLength > 0) {
+ if (ptr[0] == '/' && ptr[-1] == '/') {
+ goto noQuickReturn;
+ }
+ }
while (*ptr != '\0') {
if (*ptr == '/' && (ptr[1] == '/' || ptr[1] == '\0')) {
/*
diff --git a/tests/fileName.test b/tests/fileName.test
index 387d844..ce89623 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -441,6 +441,9 @@ test filename-7.18 {Tcl_JoinPath: unix} {testsetplatform} {
testsetplatform unix
file join /// a b
} "/a/b"
+test filename-7.19 {[Bug f34cf83dd0]} {
+ file join foo //bar
+} /bar
test filename-9.1 {Tcl_JoinPath: win} {testsetplatform} {
testsetplatform win
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index e8767e2..b9b6b53 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -713,7 +713,7 @@ IPv6AddressNeedsNumericRendering(
* at least some versions of OSX.
*/
-#pragma GCC diagnostic push
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
if (!IN6_IS_ADDR_V4MAPPED(&addr)) {
#pragma GCC diagnostic pop
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index ab55035..71facef 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -808,7 +808,7 @@ ConsoleOutputProc(
int *errorCode) /* Where to store error code. */
{
ConsoleInfo *infoPtr = instanceData;
- ConsoleThreadInfo *threadInfo = &infoPtr->reader;
+ ConsoleThreadInfo *threadInfo = &infoPtr->writer;
DWORD bytesWritten, timeout;
*errorCode = 0;
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 4666deb..4775418 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1618,7 +1618,7 @@ TclpCreateCommandChannel(
infoPtr->stopWriter = CreateEvent(NULL, TRUE, FALSE, NULL);
infoPtr->writeThread = CreateThread(NULL, 256, PipeWriterThread,
infoPtr, 0, &id);
- SetThreadPriority(infoPtr->readThread, THREAD_PRIORITY_HIGHEST);
+ SetThreadPriority(infoPtr->writeThread, THREAD_PRIORITY_HIGHEST);
infoPtr->validMask |= TCL_WRITABLE;
}