From: Amos Jeffries Date: Fri, 10 Apr 2009 09:10:33 +0000 (+1200) Subject: Author: Guido Serassio X-Git-Tag: SQUID_3_0_STABLE14~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f865a76592107f7761078c5012f9d422d24dfda;p=thirdparty%2Fsquid.git Author: Guido Serassio Windows port: Added support for Windows 7, Windows Server 2008 R2 and later --- diff --git a/doc/release-notes/release-3.0.sgml b/doc/release-notes/release-3.0.sgml index 23012b96b1..acd1675442 100644 --- a/doc/release-notes/release-3.0.sgml +++ b/doc/release-notes/release-3.0.sgml @@ -203,6 +203,7 @@ redirect_program c:/winnt/system32/cmd.exe /C c:/squid/libexec/redir.cmd When Squid runs in command line mode, the launching user account must have administrative privilege on the system "Start parameters" in the Windows 2000/XP/2003 Service applet cannot be used Building with MinGW, when the configure option --enable-truncate is used, Squid cannot run on Windows NT, only Windows 2000 and later are supported +On Windows Vista and later, User Account Control (UAC) must be disabled before running service installation diff --git a/src/WinSvc.cc b/src/WinSvc.cc old mode 100644 new mode 100755 index c53df697c0..aafa55fc24 --- a/src/WinSvc.cc +++ b/src/WinSvc.cc @@ -347,7 +347,21 @@ GetOSVersion() WIN32_OS_string = xstrdup("Windows Server 2008"); return _WIN_OS_WINLON; } - break; + if ((osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion == 1)) { + if (osvi.wProductType == VER_NT_WORKSTATION) + WIN32_OS_string = xstrdup("Windows 7"); + else + WIN32_OS_string = xstrdup("Windows Server 2008 R2"); + return _WIN_OS_WIN7; + } + if (((osvi.dwMajorVersion > 6)) || ((osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion > 1))) { + if (osvi.wProductType == VER_NT_WORKSTATION) + WIN32_OS_string = xstrdup("Unknown Windows version, assuming Windows 7 capabilities"); + else + WIN32_OS_string = xstrdup("Unknown Windows version, assuming Windows Server 2008 R2 capabilities"); + return _WIN_OS_WIN7; + } + break; case VER_PLATFORM_WIN32_WINDOWS: if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 0)) { WIN32_OS_string = xstrdup("Windows 95"); diff --git a/src/dns_internal.cc b/src/dns_internal.cc old mode 100644 new mode 100755 index 3e41419b37..db8440a79f --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -485,6 +485,8 @@ idnsParseWIN32Registry(void) case _WIN_OS_WINNET: case _WIN_OS_WINLON: + + case _WIN_OS_WIN7: /* get nameservers from the Windows 2000 registry */ /* search all interfaces for DNS server addresses */ diff --git a/src/enums.h b/src/enums.h old mode 100644 new mode 100755 index 2b68f67b53..6748079132 --- a/src/enums.h +++ b/src/enums.h @@ -545,7 +545,8 @@ enum { _WIN_OS_WIN2K, _WIN_OS_WINXP, _WIN_OS_WINNET, - _WIN_OS_WINLON + _WIN_OS_WINLON, + _WIN_OS_WIN7 }; #endif