summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-07-20 16:25:50 (GMT)
committersebres <sebres@users.sourceforge.net>2018-07-20 16:25:50 (GMT)
commit81f2a20b3c848a70dc4f28b127a627216f9b31c4 (patch)
treef81c9bc32be0bd6d26153aeb345ee3fc4ab69dda /win
parent71f7b946a6a525d6c5163a34bd1c2d2ad72f25c8 (diff)
parentd00a212e82abf97d0bc54b040a3d0a153980d537 (diff)
downloadtcl-81f2a20b3c848a70dc4f28b127a627216f9b31c4.zip
tcl-81f2a20b3c848a70dc4f28b127a627216f9b31c4.tar.gz
tcl-81f2a20b3c848a70dc4f28b127a627216f9b31c4.tar.bz2
merge 8.6
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure2
-rw-r--r--win/configure.in2
-rw-r--r--win/tclWin32Dll.c2
-rw-r--r--win/tclWinFile.c3
-rw-r--r--win/tclWinInit.c19
-rw-r--r--win/tclWinSock.c16
-rw-r--r--win/tclWinThrd.c8
7 files changed, 28 insertions, 24 deletions
diff --git a/win/configure b/win/configure
index be38dc3..03ad68a 100755
--- a/win/configure
+++ b/win/configure
@@ -4372,7 +4372,7 @@ if test "$tcl_ok" = "yes"; then
ZLIB_DLL_FILE=\${ZLIB_DLL_FILE}
- if test "$do64bit" = "yes"; then
+ if test "$do64bit" != "no"; then
if test "$GCC" == "yes"; then
diff --git a/win/configure.in b/win/configure.in
index 5fc17a3..82351f1 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -128,7 +128,7 @@ AS_IF([test "${enable_shared+set}" = "set"], [
])
AS_IF([test "$tcl_ok" = "yes"], [
AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}])
- AS_IF([test "$do64bit" = "yes"], [
+ AS_IF([test "$do64bit" != "no"], [
AS_IF([test "$GCC" == "yes"],[
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64/libz.dll.a])
], [
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 6c973df..a85dd0c 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -640,7 +640,7 @@ TclWinCPUID(
#if defined(HAVE_INTRIN_H) && defined(_WIN64)
- __cpuid(regsPtr, index);
+ __cpuid((int *)regsPtr, index);
status = TCL_OK;
#elif defined(__GNUC__)
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 8bb572b..fc189da 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2022,7 +2022,8 @@ NativeStat(
*/
fileHandle = CreateFile(nativePath, GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL);
if (fileHandle != INVALID_HANDLE_VALUE) {
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 8e567e3..ff5327d 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -112,7 +112,12 @@ static ProcessGlobalValue sourceLibraryDir =
{0, 0, NULL, NULL, InitializeSourceLibraryDir, NULL, NULL};
static void AppendEnvironment(Tcl_Obj *listPtr, const char *lib);
-static int ToUtf(const WCHAR *wSrc, char *dst);
+
+#if TCL_UTF_MAX < 4
+static void ToUtf(const WCHAR *wSrc, char *dst);
+#else
+#define ToUtf(wSrc, dst) WideCharToMultiByte(CP_UTF8, 0, wSrc, -1, dst, MAX_PATH * TCL_UTF_MAX, NULL, NULL)
+#endif
/*
*---------------------------------------------------------------------------
@@ -435,7 +440,7 @@ InitializeSourceLibraryDir(
*
* ToUtf --
*
- * Convert a char string to a UTF string.
+ * Convert a wchar string to a UTF string.
*
* Results:
* None.
@@ -446,21 +451,19 @@ InitializeSourceLibraryDir(
*---------------------------------------------------------------------------
*/
-static int
+#if TCL_UTF_MAX < 4
+static void
ToUtf(
const WCHAR *wSrc,
char *dst)
{
- char *start;
-
- start = dst;
while (*wSrc != '\0') {
dst += Tcl_UniCharToUtf(*wSrc, dst);
wSrc++;
}
*dst = '\0';
- return (int) (dst - start);
}
+#endif
/*
*---------------------------------------------------------------------------
@@ -660,7 +663,7 @@ TclpSetVariables(
* TclpFindVariable --
*
* Locate the entry in environ for a given name. On Unix this routine is
- * case sensitive, on Windows this matches mioxed case.
+ * case sensitive, on Windows this matches mixed case.
*
* Results:
* The return value is the index in environ of an entry with the name
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index da2e60a..e2479e81 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -686,7 +686,7 @@ WaitForConnect(
}
/*
- * A non blocking socket waiting for an asyncronous connect
+ * A non blocking socket waiting for an asynchronous connect
* returns directly the error EWOULDBLOCK
*/
@@ -1606,9 +1606,9 @@ TcpGetHandleProc(
*
* This might be called in 3 circumstances:
* - By a regular socket command
- * - By the event handler to continue an asynchroneous connect
+ * - By the event handler to continue an asynchronously connect
* - By a blocking socket function (gets/puts) to terminate the
- * connect synchroneously
+ * connect synchronously
*
* Results:
* TCL_OK, if the socket was successfully connected or an asynchronous
@@ -1620,7 +1620,7 @@ TcpGetHandleProc(
*
* Remarks:
* A single host name may resolve to more than one IP address, e.g. for
- * an IPv4/IPv6 dual stack host. For handling asyncronously connecting
+ * an IPv4/IPv6 dual stack host. For handling asynchronously connecting
* sockets in the background for such hosts, this function can act as a
* coroutine. On the first call, it sets up the control variables for the
* two nested loops over the local and remote addresses. Once the first
@@ -1628,7 +1628,7 @@ TcpGetHandleProc(
* event handler for that socket, and returns. When the callback occurs,
* control is transferred to the "reenter" label, right after the initial
* return and the loops resume as if they had never been interrupted.
- * For syncronously connecting sockets, the loops work the usual way.
+ * For synchronously connecting sockets, the loops work the usual way.
*
*----------------------------------------------------------------------
*/
@@ -1718,7 +1718,7 @@ TcpConnect(
continue;
}
/*
- * For asyncroneous connect set the socket in nonblocking mode
+ * For asynchroneous connect set the socket in nonblocking mode
* and activate connect notification
*/
if (async_connect) {
@@ -1806,7 +1806,7 @@ TcpConnect(
/*
* Clear the tsd socket list pointer if we did not wait for
- * the FD_CONNECT asyncroneously
+ * the FD_CONNECT asynchroneously
*/
tsdPtr->pendingTcpState = NULL;
@@ -1868,7 +1868,7 @@ out:
SetEvent(tsdPtr->socketListLock);
}
/*
- * Error message on syncroneous connect
+ * Error message on synchroneous connect
*/
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 8f3ddb9..0f83526 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -247,7 +247,7 @@ TclpThreadCreate(
/*
* The only purpose of this is to decrement the reference count so the
- * OS resources will be reaquired when the thread closes.
+ * OS resources will be reacquired when the thread closes.
*/
CloseHandle(tHandle);
@@ -405,7 +405,7 @@ TclpInitUnlock(void)
* mutexes, condition variables, and thread local storage keys.
*
* This lock must be different than the initLock because the initLock is
- * held during creation of syncronization objects.
+ * held during creation of synchronization objects.
*
* Results:
* None.
@@ -555,7 +555,7 @@ static void FinalizeConditionEvent(ClientData data);
* None.
*
* Side effects:
- * May block the current thread. The mutex is aquired when this returns.
+ * May block the current thread. The mutex is acquired when this returns.
*
*----------------------------------------------------------------------
*/
@@ -655,7 +655,7 @@ TclpFinalizeMutex(
* None.
*
* Side effects:
- * May block the current thread. The mutex is aquired when this returns.
+ * May block the current thread. The mutex is acquired when this returns.
* Will allocate memory for a HANDLE and initialize this the first time
* this Tcl_Condition is used.
*