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 | 6c766bfaa301e4123b0e8744ea4c4c6d5856ec60 (patch) | |
| tree | 1ce3de3e6a1a74a1ae33b87491b78d5fdd9171a6 /unix | |
| parent | 4e8387e36afcce8b72317ca6a12f51279710b112 (diff) | |
| parent | 8c3bcfe950879a5de83f6ed1ecb6539de608b572 (diff) | |
| download | tcl-6c766bfaa301e4123b0e8744ea4c4c6d5856ec60.zip tcl-6c766bfaa301e4123b0e8744ea4c4c6d5856ec60.tar.gz tcl-6c766bfaa301e4123b0e8744ea4c4c6d5856ec60.tar.bz2 | |
merge trunk
Diffstat (limited to 'unix')
| -rw-r--r-- | unix/tclUnixInit.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 9f860b0..8207612 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -865,16 +865,17 @@ TclpSetVariables( #ifdef __CYGWIN__ unameOK = 1; 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(&sysInfo); |
