summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-05-04 11:05:34 (GMT)
committernijtmans <nijtmans>2010-05-04 11:05:34 (GMT)
commit12f45b93f54d74dcc7e81bd9b04f9734f832f72f (patch)
tree766c8aedc9843dd60ab666a1ce391251c3c4bea4 /win/tclWinSock.c
parent603632160ce039289adcabac2684febc649c535b (diff)
downloadtcl-12f45b93f54d74dcc7e81bd9b04f9734f832f72f.zip
tcl-12f45b93f54d74dcc7e81bd9b04f9734f832f72f.tar.gz
tcl-12f45b93f54d74dcc7e81bd9b04f9734f832f72f.tar.bz2
TCHAR-related fixes, making those files compile fine when TCHAR != char
Please see comments in [Freq 2965056] (2965056-1.patch).
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r--win/tclWinSock.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 27f7245..63f5f0c 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinSock.c,v 1.70 2010/03/07 14:39:25 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.71 2010/05/04 11:05:34 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -41,6 +41,7 @@
*/
static int initialized = 0;
+static const TCHAR classname[] = TEXT("TclSocket");
TCL_DECLARE_MUTEX(socketMutex)
/*
@@ -247,12 +248,12 @@ InitSockets(void)
windowClass.hInstance = TclWinGetTclInstance();
windowClass.hbrBackground = NULL;
windowClass.lpszMenuName = NULL;
- windowClass.lpszClassName = "TclSocket";
+ windowClass.lpszClassName = classname;
windowClass.lpfnWndProc = SocketProc;
windowClass.hIcon = NULL;
windowClass.hCursor = NULL;
- if (!RegisterClassA(&windowClass)) {
+ if (!RegisterClass(&windowClass)) {
TclWinConvertError(GetLastError());
goto initFailure;
}
@@ -394,7 +395,7 @@ SocketExitHandler(
*/
TclpFinalizeSockets();
- UnregisterClass("TclSocket", TclWinGetTclInstance());
+ UnregisterClass(classname, TclWinGetTclInstance());
WSACleanup();
initialized = 0;
Tcl_MutexUnlock(&socketMutex);
@@ -2192,7 +2193,7 @@ SocketThread(
* Create a dummy window receiving socket events.
*/
- tsdPtr->hwnd = CreateWindow("TclSocket", "TclSocket",
+ tsdPtr->hwnd = CreateWindow(classname, classname,
WS_TILED, 0, 0, 0, 0, NULL, NULL, windowClass.hInstance, arg);
/*