diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-12-13 00:02:34 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-12-13 00:02:34 +0000 |
commit | 097002bb0d8e1693935c8f7039c4277587bdba98 (patch) | |
tree | eabb084abd6b91c34e9ea05e26d290e74c4caf84 /version_info.c | |
parent | 8cb89f2645180195f8ea4703322917975f8e9c8d (diff) |
Detect Windows Server 2008 in the runtime version info.
svn path=/trunk/; revision=26979
Diffstat (limited to 'version_info.c')
-rw-r--r-- | version_info.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/version_info.c b/version_info.c index 3480b7e86d..52836f2b8f 100644 --- a/version_info.c +++ b/version_info.c @@ -296,7 +296,7 @@ void get_runtime_version_info(GString *str, void (*additional_info)(GString *)) { #if defined(_WIN32) - OSVERSIONINFO info; + OSVERSIONINFOEX info; #elif defined(HAVE_SYS_UTSNAME_H) struct utsname name; #endif @@ -325,7 +325,7 @@ get_runtime_version_info(GString *str, void (*additional_info)(GString *)) * older versions of the SDK. */ info.dwOSVersionInfoSize = sizeof info; - if (!GetVersionEx(&info)) { + if (!GetVersionEx((OSVERSIONINFO *)&info)) { /* * XXX - get the failure reason. */ @@ -407,7 +407,10 @@ get_runtime_version_info(GString *str, void (*additional_info)(GString *)) break; case 6: - g_string_append_printf(str, "Windows Vista"); + if (info.wProductType == VER_NT_WORKSTATION) + g_string_append_printf(str, "Windows Vista"); + else + g_string_append_printf(str, "Windows Server 2008"); break; default: |