If we have <windows.h>, we need to include it to declare OSVERSIONINFO.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 8 Mar 2003 11:15:49 +0000 (11:15 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 8 Mar 2003 11:15:49 +0000 (11:15 +0000)
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

util.c

diff --git a/util.c b/util.c
index f3aafe5ebf3b940bd3dc28d67e4f564dd033f04d..affb97db6c099b413b84df365d645d3a0935d844 100644 (file)
--- a/util.c
+++ b/util.c
@@ -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>
 #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()".