diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-19 07:44:09 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-19 07:44:09 (GMT) |
| commit | 52f7f8443ded7a957803e75eea737fdaf04234db (patch) | |
| tree | 25af82e23e90dd325ce0c5edd94a905dc053bec7 /win/tclWinInit.c | |
| parent | bb14939c6492e648fedc29e6da35641e98b9c824 (diff) | |
| parent | 3a94aaa6cb69b47612e4f299ef44bbb6d8869827 (diff) | |
| download | tcl-52f7f8443ded7a957803e75eea737fdaf04234db.zip tcl-52f7f8443ded7a957803e75eea737fdaf04234db.tar.gz tcl-52f7f8443ded7a957803e75eea737fdaf04234db.tar.bz2 | |
Merge 8.6. Missing cast in Tcl_WinTCharToUtf() macro (when compiling without -DUNICODE)
Diffstat (limited to 'win/tclWinInit.c')
| -rw-r--r-- | win/tclWinInit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 852e5f7..1669ede 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -17,7 +17,7 @@ #include <lmcons.h> /* - * GetUserName() is found in advapi32.dll + * GetUserNameW() is found in advapi32.dll */ #ifdef _MSC_VER # pragma comment(lib, "advapi32.lib") @@ -149,13 +149,13 @@ TclpInitPlatform(void) * invoked. */ - TclWinInit(GetModuleHandle(NULL)); + TclWinInit(GetModuleHandleW(NULL)); #endif /* * Fill available functions depending on windows version */ - handle = GetModuleHandle(L"KERNEL32"); + handle = GetModuleHandleW(L"KERNEL32"); tclWinProcs.cancelSynchronousIo = (BOOL (WINAPI *)(HANDLE)) GetProcAddress(handle, "CancelSynchronousIo"); @@ -472,7 +472,7 @@ TclpGetUserName( WCHAR szUserName[UNLEN+1]; DWORD cchUserNameLen = UNLEN; - if (!GetUserName(szUserName, &cchUserNameLen)) { + if (!GetUserNameW(szUserName, &cchUserNameLen)) { return NULL; } cchUserNameLen--; @@ -517,7 +517,7 @@ TclpSetVariables( TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY); if (!osInfoInitialized) { - HMODULE handle = GetModuleHandle(L"NTDLL"); + HMODULE handle = GetModuleHandleW(L"NTDLL"); int(__stdcall *getversion)(void *) = (int(__stdcall *)(void *)) GetProcAddress(handle, "RtlGetVersion"); osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); |
