Update to 8.5.19

This commit is contained in:
Zachary Ware
2017-11-24 17:50:39 -06:00
parent 49cac229de
commit 9651fde681
557 changed files with 20338 additions and 26391 deletions

View File

@@ -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)
{
WSADATA wsaData;
WORD wVersionRequested = MAKEWORD(2, 2);
tclPlatform = TCL_PLATFORM_WINDOWS;
/*
* 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.
*/
SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS);
/*
* Initialize the winsock library. On Windows XP and higher this
* can never fail.
*/
WSAStartup(wVersionRequested, &wsaData);
#ifdef STATIC_BUILD
/*
@@ -563,7 +559,8 @@ TclpSetVariables(
SYSTEM_INFO info;
OemId oemId;
} sys;
OSVERSIONINFOA osInfo;
static OSVERSIONINFOW osInfo;
static int osInfoInitialized = 0;
Tcl_DString ds;
WCHAR szUserName[UNLEN+1];
DWORD cchUserNameLen = UNLEN;
@@ -571,9 +568,19 @@ TclpSetVariables(
Tcl_SetVar2Ex(interp, "tclDefaultLibrary", NULL,
TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY);
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA(&osInfo);
if (!osInfoInitialized) {
HANDLE handle = LoadLibraryW(L"NTDLL");
int(__stdcall *getversion)(void *) =
(int(__stdcall *)(void *)) GetProcAddress(handle, "RtlGetVersion");
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
if (!getversion || getversion(&osInfo)) {
GetVersionExW(&osInfo);
}
if (handle) {
FreeLibrary(handle);
}
osInfoInitialized = 1;
}
GetSystemInfo(&sys.info);
/*