diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-03-08 11:15:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-03-08 11:15:49 +0000 |
commit | 4d46ba0a271ff21c98644c4ecda1cd05b3216ff4 (patch) | |
tree | d1e42d03f6b55c45675a805f7084e63f51ac49a2 /util.c | |
parent | ad8856029b0faf99cfcf74fd0a83f9e1f01d2716 (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.)
svn path=/trunk/; revision=7324
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()". |