summaryrefslogtreecommitdiffstats
path: root/win/tclWinChan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-18 15:11:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-18 15:11:23 (GMT)
commit3a94aaa6cb69b47612e4f299ef44bbb6d8869827 (patch)
tree38b517499284c2f8ba3ff0efc49b56a2a594746e /win/tclWinChan.c
parentf2f4614f5cd6f0493ed0e46688b28017c8fc93b9 (diff)
downloadtcl-3a94aaa6cb69b47612e4f299ef44bbb6d8869827.zip
tcl-3a94aaa6cb69b47612e4f299ef44bbb6d8869827.tar.gz
tcl-3a94aaa6cb69b47612e4f299ef44bbb6d8869827.tar.bz2
TCHAR -> WCHAR converions (and corresponding Win32 API call changes), since we are impicitly compiling with -DUNICODE
Diffstat (limited to 'win/tclWinChan.c')
-rw-r--r--win/tclWinChan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 78b510b..209b860 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -95,7 +95,7 @@ static void FileThreadActionProc(ClientData instanceData,
static int FileTruncateProc(ClientData instanceData,
Tcl_WideInt length);
static DWORD FileGetType(HANDLE handle);
-static int NativeIsComPort(const TCHAR *nativeName);
+static int NativeIsComPort(const WCHAR *nativeName);
/*
* This structure describes the channel type structure for file based IO.
*/
@@ -836,7 +836,7 @@ TclpOpenFileChannel(
Tcl_Channel channel = 0;
int channelPermissions = 0;
DWORD accessMode = 0, createMode, shareMode, flags;
- const TCHAR *nativeName;
+ const WCHAR *nativeName;
HANDLE handle;
char channelName[16 + TCL_INTEGER_SPACE];
TclFile readFile = NULL, writeFile = NULL;
@@ -932,7 +932,7 @@ TclpOpenFileChannel(
flags = FILE_ATTRIBUTE_READONLY;
}
} else {
- flags = GetFileAttributes(nativeName);
+ flags = GetFileAttributesW(nativeName);
if (flags == 0xFFFFFFFF) {
flags = 0;
}
@@ -948,7 +948,7 @@ TclpOpenFileChannel(
* Now we get to create the file.
*/
- handle = CreateFile(nativeName, accessMode, shareMode,
+ handle = CreateFileW(nativeName, accessMode, shareMode,
NULL, createMode, flags, (HANDLE) NULL);
if (handle == INVALID_HANDLE_VALUE) {
@@ -1540,7 +1540,7 @@ FileGetType(
static int
NativeIsComPort(
- const TCHAR *nativePath) /* Path of file to access, native encoding. */
+ const WCHAR *nativePath) /* Path of file to access, native encoding. */
{
const WCHAR *p = (const WCHAR *) nativePath;
int i, len = wcslen(p);