diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-16 11:06:19 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-16 11:06:19 (GMT) |
| commit | f0f432af921a05f57a62cb9da7f6d9ed0f59492f (patch) | |
| tree | 4e3298974ddb809fc61107f0012b191827be0312 /win/tclWinInit.c | |
| parent | c4700cbf6d432d8c285b69987e663a40bfbdceeb (diff) | |
| parent | fcca5df8d6fb5bfd7dd4b6d10dbef115565ddc3f (diff) | |
| download | tcl-f0f432af921a05f57a62cb9da7f6d9ed0f59492f.zip tcl-f0f432af921a05f57a62cb9da7f6d9ed0f59492f.tar.gz tcl-f0f432af921a05f57a62cb9da7f6d9ed0f59492f.tar.bz2 | |
merge trunk.
Remove (internal) functions TclWinGetServByName(), TclWinGetSockOpt() and TclWinSetSockOpt(), which are no longer needed for any purpose.
Diffstat (limited to 'win/tclWinInit.c')
| -rw-r--r-- | win/tclWinInit.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 2c21d38..d90d57a 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -113,8 +113,8 @@ static int ToUtf(const WCHAR *wSrc, char *dst); * * TclpInitPlatform -- * - * Initialize all the platform-dependant things like signals and - * floating-point error handling. + * Initialize all the platform-dependant things like signals, + * floating-point error handling and sockets. * * Called at process initialization time. * @@ -130,20 +130,16 @@ static int ToUtf(const WCHAR *wSrc, char *dst); void TclpInitPlatform(void) { - tclPlatform = TCL_PLATFORM_WINDOWS; + WSADATA wsaData; + WORD wVersionRequested = MAKEWORD(2, 2); - /* - * The following code stops Windows 3.X and Windows NT 3.51 from - * automatically putting up Sharing Violation dialogs, e.g, when someone - * tries to access a file that is locked or a drive with no disk in it. - * Tcl already returns the appropriate error to the caller, and they can - * decide to put up their own dialog in response to that failure. - * - * Under 95 and NT 4.0, this is a NOOP because the system doesn't - * automatically put up dialogs when the above operations fail. - */ + tclPlatform = TCL_PLATFORM_WINDOWS; - SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS); + /* + * Initialize the winsock library. On Windows XP and higher this + * can never fail. + */ + WSAStartup(wVersionRequested, &wsaData); #ifdef STATIC_BUILD /* |
