summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-04-30 01:27:47 +0000
committerNick Mathewson <nickm@torproject.org>2007-04-30 01:27:47 +0000
commit105d7821098b823c9ff75f6833a861eb313f2289 (patch)
tree86a52ed1e37633ab72bb8f7663692c85682d98a7 /src
parente0b0c2a4d20f2992d6a2d1c80ff751c54a0897ce (diff)
downloadtor-105d7821098b823c9ff75f6833a861eb313f2289.tar.gz
tor-105d7821098b823c9ff75f6833a861eb313f2289.zip
r12546@catbus: nickm | 2007-04-29 21:27:43 -0400
Correctly report win98se and win95osr2 versions. svn:r10047
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index e9e46275ef..a55a7e9d4e 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -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))