From: Mladen Turk <mturk@apache.org>
Date: Wed, 18 Jul 2007 08:02:21 +0000 (+0000)
Subject: Simplify OS detection. We are only interested in NT
X-Git-Tag: 2.3.0~1713
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08355e91d3dd607f6c76e8bfaeed65434e3b846b;p=apache

Simplify OS detection. We are only interested in NT
and WIN2K+ (so we can use services.msc)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@557188 13f79535-47bb-0310-9956-ffa450edef68
---

diff --git a/support/win32/ApacheMonitor.c b/support/win32/ApacheMonitor.c
index 54e936f241..128d9cc287 100644
--- a/support/win32/ApacheMonitor.c
+++ b/support/win32/ApacheMonitor.c
@@ -49,8 +49,7 @@
 #define OS_VERSION_WIN9X    1
 #define OS_VERSION_WINNT    2
 #define OS_VERSION_WIN2K    3
-#define OS_VERSION_WINXP    4
-#define OS_VERSION_VISTA    5
+
 /* Should be enough */
 #define MAX_APACHE_SERVICES 128
 #define MAX_APACHE_COMPUTERS 32
@@ -280,15 +279,8 @@ BOOL GetSystemOSVersion(LPDWORD dwVersion)
     switch (osvi.dwPlatformId)
     {
     case VER_PLATFORM_WIN32_NT:
-        if (osvi.dwMajorVersion == 5) {
-            if (osvi.dwMinorVersion == 1)
-                *dwVersion = OS_VERSION_WINXP;
-            else
-                *dwVersion = OS_VERSION_WIN2K;
-        }
-        else if (osvi.dwMajorVersion == 6) {
-            *dwVersion = OS_VERSION_VISTA;
-        }
+        if (osvi.dwMajorVersion >= 5)
+            *dwVersion = OS_VERSION_WIN2K;
         else
             *dwVersion = OS_VERSION_WINNT;            
         break;