diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-02-06 22:10:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-02-06 22:10:55 (GMT) |
commit | c05fbe8cf9ce62d0d061610ca3200c26dc12f3e8 (patch) | |
tree | 1ce3de3e6a1a74a1ae33b87491b78d5fdd9171a6 /win | |
parent | b7a436af60e61f81ec9e5d31278eb6a5ab9ac0cd (diff) | |
parent | 1d139334be18bced5b3d4d6b1117e47696032f07 (diff) | |
download | tcl-c05fbe8cf9ce62d0d061610ca3200c26dc12f3e8.zip tcl-c05fbe8cf9ce62d0d061610ca3200c26dc12f3e8.tar.gz tcl-c05fbe8cf9ce62d0d061610ca3200c26dc12f3e8.tar.bz2 |
merge trunk
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinInit.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c index b3f8f41..2c21d38 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -540,16 +540,17 @@ TclpSetVariables( TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY); if (!osInfoInitialized) { - HANDLE handle = LoadLibraryW(L"NTDLL"); - int(*getversion)(void *) = (int(*)(void *))GetProcAddress(handle, "RtlGetVersion"); - osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); - if (!getversion || getversion(&osInfo)) { - GetVersionExW(&osInfo); - } - if (handle) { - FreeLibrary(handle); - } - osInfoInitialized = 1; + 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); |