]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r536052, r556879, r557188 from trunk:
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 23 Aug 2007 01:24:46 +0000 (01:24 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 23 Aug 2007 01:24:46 +0000 (01:24 +0000)
Add detection for post XP operating systems.
Think this can be safely backported to 2.2 and 2.0 branches

ApacheMonitor valid OS is any WIN32_NT version.

Simplify OS detection. We are only interested in NT
and WIN2K+ (so we can use services.msc)
Submitted by: mturk
Reviewed by: wrowe, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@568791 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
support/win32/ApacheMonitor.c

diff --git a/CHANGES b/CHANGES
index 5de52591a5d15d22ca4a4a64f0c8d54c8a2fb79b..8104b96308086b9541f93ec83eff1a414ef68960 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
-                                                         -*- coding: utf-8 -*-
+                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.0.61
 
+  *) ApacheMonitor: Fix Windows Vista detection. [Mladen Turk]
 
 Changes with Apache 2.0.60
 
index 2fe10b996f668119365e96cdaafb0ebf078d7c02..084c79139e44d2ad3be856e5993fc1527fa582b6 100644 (file)
@@ -49,6 +49,7 @@
 #define OS_VERSION_WIN9X    1
 #define OS_VERSION_WINNT    2
 #define OS_VERSION_WIN2K    3
+
 /* Should be enough */
 #define MAX_APACHE_SERVICES 128
 #define MAX_APACHE_COMPUTERS 32
@@ -278,15 +279,10 @@ BOOL GetSystemOSVersion(LPDWORD dwVersion)
     switch (osvi.dwPlatformId)
     {
     case VER_PLATFORM_WIN32_NT:
-        if (osvi.dwMajorVersion <= 4) {
-            *dwVersion = OS_VERSION_WINNT;
-        }
-        else if (osvi.dwMajorVersion == 5) {
+        if (osvi.dwMajorVersion >= 5)
             *dwVersion = OS_VERSION_WIN2K;
-        }
-        else {
-            return FALSE;
-        }
+        else
+            *dwVersion = OS_VERSION_WINNT;            
         break;
 
     case VER_PLATFORM_WIN32_WINDOWS: