summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-07-09 14:53:45 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-07-09 14:53:45 (GMT)
commit9bd3b59e1deef204fd29cac25e705bfffd93177d (patch)
treec5ae520a28addd15bde6de72f59681836492a29d /win/tclWinFile.c
parentfd7ecfb8773ddaea6892a08930ff34f6516187b0 (diff)
parent64cbe6e187a319a8a9cef0d6201f22ba68a7ed60 (diff)
downloadtcl-9bd3b59e1deef204fd29cac25e705bfffd93177d.zip
tcl-9bd3b59e1deef204fd29cac25e705bfffd93177d.tar.gz
tcl-9bd3b59e1deef204fd29cac25e705bfffd93177d.tar.bz2
merge 8.7
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 0595e6c..f1e4cc9 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -567,7 +567,6 @@ WinReadLinkDirectory(
*/
offset = 0;
-#ifdef UNICODE
if (reparseBuffer->MountPointReparseBuffer.PathBuffer[0] == L'\\') {
/*
* Check whether this is a mounted volume.
@@ -629,7 +628,6 @@ WinReadLinkDirectory(
offset = 4;
}
}
-#endif /* UNICODE */
Tcl_WinTCharToUtf((const TCHAR *)
reparseBuffer->MountPointReparseBuffer.PathBuffer,
@@ -800,7 +798,7 @@ tclWinDebugPanic(
{
#define TCL_MAX_WARN_LEN 1024
va_list argList;
- char buf[TCL_MAX_WARN_LEN * TCL_UTF_MAX];
+ char buf[TCL_MAX_WARN_LEN * 3];
WCHAR msgString[TCL_MAX_WARN_LEN];
va_start(argList, format);
@@ -859,7 +857,7 @@ TclpFindExecutable(
* ignore. */
{
WCHAR wName[MAX_PATH];
- char name[MAX_PATH * TCL_UTF_MAX];
+ char name[MAX_PATH * 3];
/*
* Under Windows we ignore argv0, and return the path for the file used to
@@ -871,17 +869,7 @@ TclpFindExecutable(
Tcl_SetPanicProc(tclWinDebugPanic);
}
-#ifdef UNICODE
GetModuleFileNameW(NULL, wName, MAX_PATH);
-#else
- GetModuleFileNameA(NULL, name, sizeof(name));
-
- /*
- * Convert to WCHAR to get out of ANSI codepage
- */
-
- MultiByteToWideChar(CP_ACP, 0, name, -1, wName, MAX_PATH);
-#endif
WideCharToMultiByte(CP_UTF8, 0, wName, -1, name, sizeof(name), NULL, NULL);
TclWinNoBackslash(name);
TclSetObjNameOfExecutable(Tcl_NewStringObj(name, -1), NULL);
@@ -1646,7 +1634,6 @@ NativeAccess(
* what permissions the OS has set for a file.
*/
-#ifdef UNICODE
{
SECURITY_DESCRIPTOR *sdPtr = NULL;
unsigned long size;
@@ -1809,7 +1796,6 @@ NativeAccess(
}
}
-#endif /* !UNICODE */
return 0;
}