summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-04 21:21:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-04 21:21:53 (GMT)
commit9901c4812ae35bda160641378fab124f87238b96 (patch)
treed04ea85bcb30f3e9aeff79e22a534f71b31ed096 /win/tclWinInit.c
parentae0cf24fb4a1c43bb6ffc8d5db7404a17bc3b8ea (diff)
downloadtcl-9901c4812ae35bda160641378fab124f87238b96.zip
tcl-9901c4812ae35bda160641378fab124f87238b96.tar.gz
tcl-9901c4812ae35bda160641378fab124f87238b96.tar.bz2
Add missing __stdcall (which crashes on win32), and clean-up indenting
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c21
1 files changed, 11 insertions, 10 deletions
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);