File 12485.patch of Package squid

---------------------
PatchSet 12485 
Date: 2009/06/25 22:48:37
Author: hno
Branch: SQUID_2_7
Tag: (none) 
Log:
Author: serassio
MFC: Windows port: Added support for Windows 7, Windows Server 2008 R2 and later

Members: 
	src/dns_internal.c:1.63.2.7->1.63.2.8 
	src/enums.h:1.245.2.3->1.245.2.4 
	src/win32.c:1.18.2.6->1.18.2.7 

Index: squid/src/dns_internal.c
===================================================================
RCS file: /cvsroot/squid/squid/src/dns_internal.c,v
retrieving revision 1.63.2.7
retrieving revision 1.63.2.8
diff -u -r1.63.2.7 -r1.63.2.8
--- squid/src/dns_internal.c	27 Jun 2008 20:56:26 -0000	1.63.2.7
+++ squid/src/dns_internal.c	25 Jun 2009 22:48:37 -0000	1.63.2.8
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.c,v 1.63.2.7 2008/06/27 20:56:26 hno Exp $
+ * $Id: dns_internal.c,v 1.63.2.8 2009/06/25 22:48:37 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -417,6 +417,7 @@
     case _WIN_OS_WINXP:
     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 */
 	if (RegOpenKey(HKEY_LOCAL_MACHINE,
Index: squid/src/enums.h
===================================================================
RCS file: /cvsroot/squid/squid/src/enums.h,v
retrieving revision 1.245.2.3
retrieving revision 1.245.2.4
diff -u -r1.245.2.3 -r1.245.2.4
--- squid/src/enums.h	25 Sep 2008 02:33:37 -0000	1.245.2.3
+++ squid/src/enums.h	25 Jun 2009 22:48:37 -0000	1.245.2.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.245.2.3 2008/09/25 02:33:37 hno Exp $
+ * $Id: enums.h,v 1.245.2.4 2009/06/25 22:48:37 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -773,7 +773,8 @@
     _WIN_OS_WIN2K,
     _WIN_OS_WINXP,
     _WIN_OS_WINNET,
-    _WIN_OS_WINLON
+    _WIN_OS_WINLON,
+    _WIN_OS_WIN7
 };
 
 #endif
Index: squid/src/win32.c
===================================================================
RCS file: /cvsroot/squid/squid/src/win32.c,v
retrieving revision 1.18.2.6
retrieving revision 1.18.2.7
diff -u -r1.18.2.6 -r1.18.2.7
--- squid/src/win32.c	25 Jun 2009 22:47:57 -0000	1.18.2.6
+++ squid/src/win32.c	25 Jun 2009 22:48:37 -0000	1.18.2.7
@@ -1,6 +1,6 @@
 
 /*
- * $Id: win32.c,v 1.18.2.6 2009/06/25 22:47:57 hno Exp $
+ * $Id: win32.c,v 1.18.2.7 2009/06/25 22:48:37 hno Exp $
  *
  * Windows support
  * AUTHOR: Guido Serassio <serassio@squid-cache.org>
@@ -280,6 +280,20 @@
 		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)) {
openSUSE Build Service is sponsored by