From: Amos Jeffries Date: Fri, 10 Apr 2009 06:19:15 +0000 (+1200) Subject: Author: Guido Serassio X-Git-Tag: SQUID_3_1_0_8~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cadc487409eaf5604e46bc8b8b03a1615f8d1713;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 6b9861026b..1961b4e93c 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/doc/release-notes/release-3.1.sgml b/doc/release-notes/release-3.1.sgml index 9f84bde665..7910242d45 100644 --- a/doc/release-notes/release-3.1.sgml +++ b/doc/release-notes/release-3.1.sgml @@ -338,6 +338,7 @@ format (CR+LF) and the full Windows path must be specified, for example: 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 +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 aa7cc45da6..0643428a9b --- a/src/WinSvc.cc +++ b/src/WinSvc.cc @@ -347,6 +347,20 @@ GetOSVersion() WIN32_OS_string = xstrdup("Windows Server 2008"); return _WIN_OS_WINLON; } + 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)) { diff --git a/src/dns_internal.cc b/src/dns_internal.cc old mode 100644 new mode 100755 index 5b49ec01f7..91afc58357 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -484,6 +484,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 1c7e2900b2..e6649288c7 --- a/src/enums.h +++ b/src/enums.h @@ -521,7 +521,8 @@ enum { _WIN_OS_WIN2K, _WIN_OS_WINXP, _WIN_OS_WINNET, - _WIN_OS_WINLON + _WIN_OS_WINLON, + _WIN_OS_WIN7 }; #endif