summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unix/tclUnixInit.c22
-rw-r--r--win/tclWinInit.c21
2 files changed, 23 insertions, 20 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 423e97e..11a65707 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -38,6 +38,7 @@ DLLIMPORT extern __stdcall void *LoadLibraryW(const void *);
DLLIMPORT extern __stdcall void FreeLibrary(void *);
DLLIMPORT extern __stdcall void *GetProcAddress(void *, const char *);
DLLIMPORT extern __stdcall void GetSystemInfo(void *);
+DLLIMPORT extern __stdcall void GetSystemInfo(void *);
#define NUMPLATFORMS 4
static const char *const platforms[NUMPLATFORMS] = {
@@ -929,16 +930,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);
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 08ef1ed..f49edf0 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -573,16 +573,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");
+ __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(&sys.info);