]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: Added support for Windows 7, Windows Server 2008 R2 and later
authorGuido Serassio <serassio@squid-cache.org>
Sun, 29 Mar 2009 10:36:30 +0000 (12:36 +0200)
committerGuido Serassio <serassio@squid-cache.org>
Sun, 29 Mar 2009 10:36:30 +0000 (12:36 +0200)
src/WinSvc.cc [changed mode: 0644->0755]
src/dns_internal.cc [changed mode: 0644->0755]
src/enums.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index aa7cc45..0643428
@@ -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)) {
old mode 100644 (file)
new mode 100755 (executable)
index 02e8516..c58db66
@@ -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 */
 
old mode 100644 (file)
new mode 100755 (executable)
index 1c7e290..e664928
@@ -521,7 +521,8 @@ enum {
     _WIN_OS_WIN2K,
     _WIN_OS_WINXP,
     _WIN_OS_WINNET,
-    _WIN_OS_WINLON
+    _WIN_OS_WINLON,
+    _WIN_OS_WIN7
 };
 
 #endif