linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #02607
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2315: remove getOsVersion - the dwt one is more up-to-date
------------------------------------------------------------
revno: 2315
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-12-01 17:03:18 +0100
message:
remove getOsVersion - the dwt one is more up-to-date
modified:
dcpp/Util.cpp
dcpp/Util.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/Util.cpp'
--- dcpp/Util.cpp 2010-08-13 03:13:16 +0000
+++ dcpp/Util.cpp 2010-12-01 16:03:18 +0000
@@ -894,73 +894,6 @@
return y;
}
-string Util::getOsVersion() {
- string os;
-
-#ifdef _WIN32
-
- OSVERSIONINFOEX ver;
- memset(&ver, 0, sizeof(OSVERSIONINFOEX));
- ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
- if(!GetVersionEx((OSVERSIONINFO*)&ver)) {
- ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- if(!GetVersionEx((OSVERSIONINFO*)&ver)) {
- os = "Windows (version unknown)";
- }
- }
-
- if(os.empty()) {
- if(ver.dwPlatformId != VER_PLATFORM_WIN32_NT) {
- os = "Win9x/ME/Junk";
- } else if(ver.dwMajorVersion == 4) {
- os = "WinNT4";
- } else if(ver.dwMajorVersion == 5) {
- if(ver.dwMinorVersion == 0) {
- os = "Win2000";
- } else if(ver.dwMinorVersion == 1) {
- os = "WinXP";
- } else if(ver.dwMinorVersion == 2) {
- os = "Win2003";
- } else {
- os = "Unknown WinNT5";
- }
-
- if(ver.wProductType & VER_NT_WORKSTATION)
- os += " Pro";
- else if(ver.wProductType & VER_NT_SERVER)
- os += " Server";
- else if(ver.wProductType & VER_NT_DOMAIN_CONTROLLER)
- os += " DC";
- } else if(ver.dwMajorVersion == 6) {
- os = "WinVista";
- }
-
- if(ver.wServicePackMajor != 0) {
- os += "SP";
- os += Util::toString(ver.wServicePackMajor);
- if(ver.wServicePackMinor != 0) {
- os += '.';
- os += Util::toString(ver.wServicePackMinor);
- }
- }
- }
-
-
-#else // _WIN32
- struct utsname n;
-
- if(uname(&n) != 0) {
- os = "unix (unknown version)";
- } else {
- os = Text::toUtf8(string(n.sysname) + " " + n.release + " (" + n.machine + ")");
- }
-
-#endif // _WIN32
-
- return os;
-}
-
/* getIpCountry
This function returns the country(Abbreviation) of an ip
for exemple: it returns "PT", whitch standards for "Portugal"
=== modified file 'dcpp/Util.h'
--- dcpp/Util.h 2010-08-30 14:01:53 +0000
+++ dcpp/Util.h 2010-12-01 16:03:18 +0000
@@ -412,8 +412,6 @@
static int stricmp(const wstring& a, const wstring& b) { return stricmp(a.c_str(), b.c_str()); }
static int strnicmp(const wstring& a, const wstring& b, size_t n) { return strnicmp(a.c_str(), b.c_str(), n); }
- static string getOsVersion();
-
static string getIpCountry (string IP);
static bool getAway() { return away; }