summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 9115eaa..564ce7d 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinInit.c,v 1.85 2010/02/15 23:10:47 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinInit.c,v 1.86 2010/09/13 14:20:39 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -478,7 +478,7 @@ TclpSetVariables(
} sys;
OSVERSIONINFOA osInfo;
Tcl_DString ds;
- WCHAR szUserName[UNLEN+1];
+ TCHAR szUserName[UNLEN+1];
DWORD cchUserNameLen = UNLEN;
Tcl_SetVar2Ex(interp, "tclDefaultLibrary", NULL,
@@ -552,10 +552,10 @@ TclpSetVariables(
Tcl_DStringInit(&ds);
if (TclGetEnv("USERNAME", &ds) == NULL) {
- if (tclWinProcs->getUserName((LPTSTR)szUserName, &cchUserNameLen) != 0) {
+ if (GetUserName(szUserName, &cchUserNameLen) != 0) {
int cbUserNameLen = cchUserNameLen - 1;
- if (tclWinProcs->useWide) cbUserNameLen *= sizeof(WCHAR);
- tclWinProcs->tchar2utf((LPTSTR)szUserName, cbUserNameLen, &ds);
+ cbUserNameLen *= sizeof(TCHAR);
+ Tcl_WinTCharToUtf(szUserName, cbUserNameLen, &ds);
}
}
Tcl_SetVar2(interp, "tcl_platform", "user", Tcl_DStringValue(&ds),