summaryrefslogtreecommitdiffstats
path: root/unix
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 /unix
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 'unix')
-rw-r--r--unix/tclUnixInit.c22
1 files changed, 12 insertions, 10 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);