]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r12546@catbus: nickm | 2007-04-29 21:27:43 -0400
authorNick Mathewson <nickm@torproject.org>
Mon, 30 Apr 2007 01:27:47 +0000 (01:27 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 30 Apr 2007 01:27:47 +0000 (01:27 +0000)
 Correctly report win98se and win95osr2 versions.

svn:r10047

ChangeLog
src/common/compat.c

index c678be4d61200e5b2d09b7af25ea9856498becd3..6ff3ca1bb145e7e78ed19e75667c2c8d5a78d7fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,7 @@ Changes in version 0.2.0.1-alpha - 2007-??-??
       proposal 104.]
 
   o Minor features (other):
+    - Correctly report Windows 95 OSR2 and Windows 98 SE.
     - More unit tests.
 
   o Removed features:
index e9e46275efe76ae338623d3cef09981be16d9d8d..a55a7e9d4e3d398730dbd48ebebd5c665faef06d 100644 (file)
@@ -922,6 +922,7 @@ get_uname(void)
         int i;
         unsigned int leftover_mask;
         const char *plat = NULL;
+        const char *extra = NULL;
         static struct {
           unsigned major; unsigned minor; const char *version;
         } win_version_table[] = {
@@ -968,6 +969,10 @@ get_uname(void)
             plat = "Windows NT 4.0";
           else
             plat = "Windows 95";
+          if (info.szCSDVersion[1] == 'B')
+            extra = "OSR2 (B)";
+          else if (info.szCSDVersion[1] == 'C')
+            extra = "OSR2 (C)";
         } else {
           for (i=0; win_version_table[i].major>0; ++i) {
             if (win_version_table[i].major == info.dwMajorVersion &&
@@ -977,9 +982,17 @@ get_uname(void)
             }
           }
         }
+        if (plat && !strcmp(plat, "Windows 98")) {
+          if (info.szCSDVersion[1] == 'A')
+            extra = "SE (A)";
+          else if (info.szCSDVersion[1] == 'B')
+            extra = "SE (B)";
+        }
         if (plat) {
+          if (!extra)
+            extra = info.szCSDVersion;
           tor_snprintf(uname_result, sizeof(uname_result), "%s %s",
-                       plat, info.szCSDVersion);
+                       plat, extra);
         } else {
           if (info.dwMajorVersion > 6 ||
               (info.dwMajorVersion==6 && info.dwMinorVersion>0))