[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10047: Correctly report win98se and win95osr2 versions. (in tor/trunk: . src/common)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r10047: Correctly report win98se and win95osr2 versions. (in tor/trunk: . src/common)
- From: nickm@xxxxxxxx
- Date: Sun, 29 Apr 2007 21:27:52 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 29 Apr 2007 21:28:03 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2007-04-29 21:27:47 -0400 (Sun, 29 Apr 2007)
New Revision: 10047
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/src/common/compat.c
Log:
r12546@catbus: nickm | 2007-04-29 21:27:43 -0400
Correctly report win98se and win95osr2 versions.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r12546] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-04-30 01:09:03 UTC (rev 10046)
+++ tor/trunk/ChangeLog 2007-04-30 01:27:47 UTC (rev 10047)
@@ -61,6 +61,7 @@
proposal 104.]
o Minor features (other):
+ - Correctly report Windows 95 OSR2 and Windows 98 SE.
- More unit tests.
o Removed features:
Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c 2007-04-30 01:09:03 UTC (rev 10046)
+++ tor/trunk/src/common/compat.c 2007-04-30 01:27:47 UTC (rev 10047)
@@ -922,6 +922,7 @@
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 @@
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 @@
}
}
}
+ 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))