summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-11-03 12:09:23 (GMT)
committernijtmans <nijtmans>2010-11-03 12:09:23 (GMT)
commitf3a48000e4c73654b48530a402518c8c89c3be06 (patch)
tree46b52e1fadb5484cfd6be47dc982afb94162c5d2 /win/tclWinFile.c
parentd4d95330eb4e444b9ed5cbdfbad4fa6e887fd2b9 (diff)
downloadtcl-f3a48000e4c73654b48530a402518c8c89c3be06.zip
tcl-f3a48000e4c73654b48530a402518c8c89c3be06.tar.gz
tcl-f3a48000e4c73654b48530a402518c8c89c3be06.tar.bz2
[FRQ 2965056]: Windows build with -DUNICODE
(more clean-ups for pre-win2000 stuff)
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index e3d674b..6ef6f8c 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.115 2010/10/12 10:21:55 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.116 2010/11/03 12:09:23 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -573,6 +573,7 @@ WinReadLinkDirectory(
*/
offset = 0;
+#ifdef UNICODE
if (reparseBuffer->MountPointReparseBuffer.PathBuffer[0] == L'\\') {
/*
* Check whether this is a mounted volume.
@@ -634,6 +635,7 @@ WinReadLinkDirectory(
offset = 4;
}
}
+#endif /* UNICODE */
Tcl_WinTCharToUtf((const TCHAR *)
reparseBuffer->MountPointReparseBuffer.PathBuffer,
@@ -1712,19 +1714,19 @@ static int
NativeIsExec(
const TCHAR *path)
{
- int len = wcslen(path);
+ int len = _tcslen(path);
if (len < 5) {
return 0;
}
- if (path[len-4] != L'.') {
+ if (path[len-4] != TEXT('.')) {
return 0;
}
- if ((_wcsicmp(path+len-3, L"exe") == 0)
- || (_wcsicmp(path+len-3, L"com") == 0)
- || (_wcsicmp(path+len-3, L"bat") == 0)) {
+ if ((_tcsicmp(path+len-3, TEXT("exe")) == 0)
+ || (_tcsicmp(path+len-3, TEXT("com")) == 0)
+ || (_tcsicmp(path+len-3, TEXT("bat")) == 0)) {
return 1;
}
return 0;
@@ -3128,7 +3130,7 @@ TclNativeDupInternalRep(
return NULL;
}
- len = sizeof(TCHAR) * (_tcslen((const WCHAR *) clientData) + 1);
+ len = sizeof(TCHAR) * (_tcslen((const TCHAR *) clientData) + 1);
copy = (char *) ckalloc(len);
memcpy(copy, clientData, len);