diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-03-08 11:15:49 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-03-08 11:15:49 +0000 |
commit | 41fc6bb8f7a246b054e6f55a579f09b7a922be8d (patch) | |
tree | d1e42d03f6b55c45675a805f7084e63f51ac49a2 /util.c | |
parent | f076ed9bf470b2b437befeae88d304fb13c8cc64 (diff) |
If we have <windows.h>, we need to include it to declare OSVERSIONINFO.
Fix some typos.
Put the build number after the "szCSDVersion" value; on NT, that makes
it show up as "Windows {NT x.y,2000,XP,etc.} Service Pack N, build N",
and on OT, it might make it show up as "Windows {95,98,Me} X, build N",
where "X" might be "A" or "B" or something such as that. (We might want
to omit the space before "szCSDVersion" on Windows OT - I think the
"right" name might be something like "Windows 95B", but I'm not sure.)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7324 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* util.c * Utility routines * - * $Id: util.c,v 1.58 2003/03/08 07:00:46 guy Exp $ + * $Id: util.c,v 1.59 2003/03/08 11:15:49 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -37,6 +37,10 @@ #include <unistd.h> #endif +#ifdef HAVE_WINDOWS_H +#include <windows.h> +#endif + #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif @@ -201,7 +205,7 @@ get_version_info(GString *str) case 3: case 4: g_string_sprintfa(str, "Windows NT %u.%u", - dwMajorVersion, info.dwMinorVersion); + info.dwMajorVersion, info.dwMinorVersion); break; case 5: @@ -239,9 +243,9 @@ get_version_info(GString *str) info.dwPlatformId, info.dwMajorVersion, info.dwMinorVersion); break; } + if (info.szCSDVersion[0] != '\0') + g_string_sprintfa(str, " %s", info.szCSDVersion); g_string_sprintfa(str, ", build %u", info.dwBuildNumber); - if (szCSDVersion[0] != '\0') - g_string_sprintfa(str, ", %s", szCSDVersion); #elif defined(HAVE_SYS_UTSNAME_H) /* * We have <sys/utsname.h>, so we assume we have "uname()". |