Tcl Source Code

Check-in [bd84c74e43]
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 | trunk
Files: files | file ages | folders
SHA1: bd84c74e43404a3b80acd8f018cb839e2d29b926
User & Date: jan.nijtmans 2013-11-20 14:40:38
Context
2013-11-20
16:06
Safer clean-up of environment variables: Do removal after insertions -> tcltest 2.3.7 check-in: 9835f4f033 user: jan.nijtmans tags: trunk
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
12:58
Fix env-5.1 test-case on Cygwin (and probably other platforms which don't have iso8859-1 as system-e... check-in: 1f318a23a1 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/tclWin32Dll.c.

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
 *----------------------------------------------------------------------
 */

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 or Win9x, so just in case someone manages
     * to get a runtime there, make sure they know that.
     */








|


|
|







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
 *----------------------------------------------------------------------
 */

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 or Win9x, so just in case someone manages
     * to get a runtime there, make sure they know that.
     */

Changes to win/tclWinInit.c.

526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
{
    const char *ptr;
    char buffer[TCL_INTEGER_SPACE * 2];
    union {
	SYSTEM_INFO info;
	OemId oemId;
    } sys;
    OSVERSIONINFOA osInfo;
    Tcl_DString ds;
    TCHAR 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.
     */








|







|
|







526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
{
    const char *ptr;
    char buffer[TCL_INTEGER_SPACE * 2];
    union {
	SYSTEM_INFO info;
	OemId oemId;
    } sys;
    OSVERSIONINFOW osInfo;
    Tcl_DString ds;
    TCHAR 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.
     */