diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-02-04 21:33:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-02-04 21:33:13 (GMT) |
commit | 20c43bb48a2e8a63a84389e3987f43e399522e93 (patch) | |
tree | 58cf7d808c6aa74dc785c5d6d8dd7de58f2bd533 | |
parent | 4dd8f4fb7dd4484d1bfcc0910e9c7f901b83dcbd (diff) | |
parent | e11501e82c5daaf3f89f915d6df764823e9edb86 (diff) | |
download | tcl-20c43bb48a2e8a63a84389e3987f43e399522e93.zip tcl-20c43bb48a2e8a63a84389e3987f43e399522e93.tar.gz tcl-20c43bb48a2e8a63a84389e3987f43e399522e93.tar.bz2 |
Add missing __stdcall (which crashes on win32), and clean-up indenting
-rw-r--r-- | unix/tclUnixInit.c | 21 | ||||
-rw-r--r-- | win/tclWinInit.c | 21 |
2 files changed, 22 insertions, 20 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); diff --git a/win/tclWinInit.c b/win/tclWinInit.c index b3f8f41..daa4d37 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"); + __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); |