diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-18 15:11:23 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-18 15:11:23 (GMT) |
| commit | 3a94aaa6cb69b47612e4f299ef44bbb6d8869827 (patch) | |
| tree | 38b517499284c2f8ba3ff0efc49b56a2a594746e /win/tclWinSock.c | |
| parent | f2f4614f5cd6f0493ed0e46688b28017c8fc93b9 (diff) | |
| download | tcl-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/tclWinSock.c')
| -rw-r--r-- | win/tclWinSock.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index e2479e81..cbc4f64 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -90,7 +90,7 @@ */ static int initialized = 0; -static const TCHAR classname[] = TEXT("TclSocket"); +static const WCHAR classname[] = L"TclSocket"; TCL_DECLARE_MUTEX(socketMutex) /* @@ -232,7 +232,7 @@ typedef struct { } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; -static WNDCLASS windowClass; +static WNDCLASSW windowClass; /* * Static routines for this file: @@ -343,16 +343,16 @@ InitializeHostName( int *lengthPtr, Tcl_Encoding *encodingPtr) { - TCHAR tbuf[MAX_COMPUTERNAME_LENGTH + 1]; + WCHAR wbuf[MAX_COMPUTERNAME_LENGTH + 1]; DWORD length = MAX_COMPUTERNAME_LENGTH + 1; Tcl_DString ds; - if (GetComputerName(tbuf, &length) != 0) { + if (GetComputerNameW(wbuf, &length) != 0) { /* * Convert string from native to UTF then change to lowercase. */ - Tcl_UtfToLower(Tcl_WinTCharToUtf(tbuf, -1, &ds)); + Tcl_UtfToLower(Tcl_WinTCharToUtf((TCHAR *)wbuf, -1, &ds)); } else { Tcl_DStringInit(&ds); @@ -2341,7 +2341,7 @@ InitSockets(void) windowClass.hIcon = NULL; windowClass.hCursor = NULL; - if (!RegisterClass(&windowClass)) { + if (!RegisterClassW(&windowClass)) { TclWinConvertError(GetLastError()); goto initFailure; } @@ -2466,7 +2466,7 @@ SocketExitHandler( */ TclpFinalizeSockets(); - UnregisterClass(classname, TclWinGetTclInstance()); + UnregisterClassW(classname, TclWinGetTclInstance()); initialized = 0; Tcl_MutexUnlock(&socketMutex); } @@ -2992,7 +2992,7 @@ SocketThread( * Create a dummy window receiving socket events. */ - tsdPtr->hwnd = CreateWindow(classname, classname, WS_TILED, 0, 0, 0, 0, + tsdPtr->hwnd = CreateWindowW(classname, classname, WS_TILED, 0, 0, 0, 0, NULL, NULL, windowClass.hInstance, arg); /* |
