summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index f8acad5..7fe511b 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");
+ __stdcall int(*getversion)(void *) =
+ (__stdcall int(*)(void *))GetProcAddress(handle, "RtlGetVersion");
+ osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
+ if (!getversion || getversion(&osInfo)) {
+ GetVersionExW(&osInfo);
+ }
+ if (handle) {
+ FreeLibrary(handle);
+ }
+ osInfoInitialized = 1;
}
GetSystemInfo(&sysInfo);