Tcl Source Code

Check-in [450e7bd007]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Starting with Windows 8 DSK, GetVersionExA is deprecated
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 450e7bd007c96cb4219be1b432ef215b61fc2efa
User & Date: jan.nijtmans 2013-11-20 14:38:08
Context
2013-11-20
16:04
Safer clean-up of environment variables: Do removal after insertions -> tcltest 2.3.7 check-in: e934186601 user: jan.nijtmans tags: core-8-5-branch
14:40
Starting with Windows 8 DSK, GetVersionExA is deprecated check-in: bd84c74e43 user: jan.nijtmans tags: trunk
14:38
Starting with Windows 8 DSK, GetVersionExA is deprecated check-in: 450e7bd007 user: jan.nijtmans tags: core-8-5-branch
2013-11-19
08:23
Cygwin: Instead of checking whether the win32 part is configured properly, just configure it when ne... check-in: 4202101f7e user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/tclWin32Dll.c.

428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
 *----------------------------------------------------------------------
 */

void
TclWinInit(
    HINSTANCE hInst)		/* Library instance handle. */
{
    OSVERSIONINFO os;

    hInstance = hInst;
    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
    GetVersionEx(&os);
    platformId = os.dwPlatformId;

    /*
     * We no longer support Win32s, so just in case someone manages to get a
     * runtime there, make sure they know that.
     */








|


|
|







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
 *----------------------------------------------------------------------
 */

void
TclWinInit(
    HINSTANCE hInst)		/* Library instance handle. */
{
    OSVERSIONINFOW os;

    hInstance = hInst;
    os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
    GetVersionExW(&os);
    platformId = os.dwPlatformId;

    /*
     * We no longer support Win32s, so just in case someone manages to get a
     * runtime there, make sure they know that.
     */

Changes to win/tclWinInit.c.

559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
{
    CONST char *ptr;
    char buffer[TCL_INTEGER_SPACE * 2];
    union {
	SYSTEM_INFO info;
	OemId oemId;
    } sys;
    OSVERSIONINFOA osInfo;
    Tcl_DString ds;
    WCHAR szUserName[UNLEN+1];
    DWORD cchUserNameLen = UNLEN;

    Tcl_SetVar2Ex(interp, "tclDefaultLibrary", NULL,
	    TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY);

    osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
    GetVersionExA(&osInfo);

    GetSystemInfo(&sys.info);

    /*
     * Define the tcl_platform array.
     */








|







|
|







559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
{
    CONST char *ptr;
    char buffer[TCL_INTEGER_SPACE * 2];
    union {
	SYSTEM_INFO info;
	OemId oemId;
    } sys;
    OSVERSIONINFOW osInfo;
    Tcl_DString ds;
    WCHAR szUserName[UNLEN+1];
    DWORD cchUserNameLen = UNLEN;

    Tcl_SetVar2Ex(interp, "tclDefaultLibrary", NULL,
	    TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY);

    osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
    GetVersionExW(&osInfo);

    GetSystemInfo(&sys.info);

    /*
     * Define the tcl_platform array.
     */