--------------------- PatchSet 2776 Date: 2001/08/19 16:27:15 Author: serassio Branch: cygwin Tag: (none) Log: Changed GetOSVersion: now Windows Me is supported Members: src/defines.h:1.3.22.11->1.3.22.12 src/dns_internal.c:1.5.26.13->1.5.26.14 src/tools.c:1.7.2.16->1.7.2.17 src/win32.c:1.1.50.10->1.1.50.11 Index: squid/src/defines.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/defines.h,v retrieving revision 1.3.22.11 retrieving revision 1.3.22.12 diff -u -r1.3.22.11 -r1.3.22.12 --- squid/src/defines.h 15 Aug 2001 08:32:17 -0000 1.3.22.11 +++ squid/src/defines.h 19 Aug 2001 16:27:15 -0000 1.3.22.12 @@ -1,6 +1,6 @@ /* - * $Id: defines.h,v 1.3.22.11 2001/08/15 08:32:17 serassio Exp $ + * $Id: defines.h,v 1.3.22.12 2001/08/19 16:27:15 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -299,7 +299,8 @@ #define _WIN_OS_WIN32S 1 #define _WIN_OS_WIN95 2 #define _WIN_OS_WIN98 3 -#define _WIN_OS_WINNT 4 -#define _WIN_OS_WIN2K 5 -#define _WIN_OS_WINXP 6 +#define _WIN_OS_WINME 4 +#define _WIN_OS_WINNT 5 +#define _WIN_OS_WIN2K 6 +#define _WIN_OS_WINXP 7 #endif Index: squid/src/dns_internal.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v retrieving revision 1.5.26.13 retrieving revision 1.5.26.14 diff -u -r1.5.26.13 -r1.5.26.14 --- squid/src/dns_internal.c 15 Aug 2001 08:32:17 -0000 1.5.26.13 +++ squid/src/dns_internal.c 19 Aug 2001 16:27:15 -0000 1.5.26.14 @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.c,v 1.5.26.13 2001/08/15 08:32:17 serassio Exp $ + * $Id: dns_internal.c,v 1.5.26.14 2001/08/19 16:27:15 serassio Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -289,6 +289,7 @@ break; case _WIN_OS_WIN95: case _WIN_OS_WIN98: + case _WIN_OS_WINME: /* get nameservers from the Windows 9X registry */ if (RegOpenKey(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP", Index: squid/src/tools.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/tools.c,v retrieving revision 1.7.2.16 retrieving revision 1.7.2.17 diff -u -r1.7.2.16 -r1.7.2.17 --- squid/src/tools.c 19 Aug 2001 10:23:23 -0000 1.7.2.16 +++ squid/src/tools.c 19 Aug 2001 16:27:15 -0000 1.7.2.17 @@ -1,6 +1,6 @@ /* - * $Id: tools.c,v 1.7.2.16 2001/08/19 10:23:23 serassio Exp $ + * $Id: tools.c,v 1.7.2.17 2001/08/19 16:27:15 serassio Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -1032,6 +1032,7 @@ break; case _WIN_OS_WIN95: case _WIN_OS_WIN98: + case _WIN_OS_WINME: if ((systemroot=getenv("WINDIR")) != NULL) { strcpy(buf,systemroot); strcat(buf,"\\hosts"); Index: squid/src/win32.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/win32.c,v retrieving revision 1.1.50.10 retrieving revision 1.1.50.11 diff -u -r1.1.50.10 -r1.1.50.11 --- squid/src/win32.c 19 Aug 2001 10:23:23 -0000 1.1.50.10 +++ squid/src/win32.c 19 Aug 2001 16:27:15 -0000 1.1.50.11 @@ -48,30 +48,37 @@ WIN32_OS_string = xstrdup("Windows NT"); return _WIN_OS_WINNT; } + if ((osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion == 0)) { + WIN32_OS_string = xstrdup("Windows 2000"); + return _WIN_OS_WIN2K; + } if ((osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion == 1)) { WIN32_OS_string = xstrdup("Windows XP"); return _WIN_OS_WINXP; } - WIN32_OS_string = xstrdup("Windows 2000"); - return _WIN_OS_WIN2K; break; case VER_PLATFORM_WIN32_WINDOWS: - if ((osvi.dwMajorVersion > 4) || - ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion > 0))) { + if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 0)) { + WIN32_OS_string = xstrdup("Windows 95"); + return _WIN_OS_WIN95; + } + if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 10)) { WIN32_OS_string = xstrdup("Windows 98"); return _WIN_OS_WIN98; } - WIN32_OS_string = xstrdup("Windows 95"); - return _WIN_OS_WIN95; + if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 90)) { + WIN32_OS_string = xstrdup("Windows Me"); + return _WIN_OS_WINME; + } break; case VER_PLATFORM_WIN32s: WIN32_OS_string = xstrdup("Windows 3.1 with WIN32S"); return _WIN_OS_WIN32S; break; default: - return _WIN_OS_UNKNOWN; + break; } - WIN32_OS_string = xstrdup("Unknown"); + WIN32_OS_string=xstrdup("Unknown Windows system"); return _WIN_OS_UNKNOWN; }