You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mt...@apache.org on 2007/07/18 10:02:23 UTC

svn commit: r557188 - /httpd/httpd/trunk/support/win32/ApacheMonitor.c

Author: mturk
Date: Wed Jul 18 01:02:21 2007
New Revision: 557188

URL: http://svn.apache.org/viewvc?view=rev&rev=557188
Log:
Simplify OS detection. We are only interested in NT
and WIN2K+ (so we can use services.msc)

Modified:
    httpd/httpd/trunk/support/win32/ApacheMonitor.c

Modified: httpd/httpd/trunk/support/win32/ApacheMonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/win32/ApacheMonitor.c?view=diff&rev=557188&r1=557187&r2=557188
==============================================================================
--- httpd/httpd/trunk/support/win32/ApacheMonitor.c (original)
+++ httpd/httpd/trunk/support/win32/ApacheMonitor.c Wed Jul 18 01:02:21 2007
@@ -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 @@
     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;



Re: svn commit: r557188 - /httpd/httpd/trunk/support/win32/ApacheMonitor.c

Posted by Mladen Turk <mt...@apache.org>.
William A. Rowe, Jr. wrote:
> mturk@apache.org wrote:
>> Author: mturk
>> Date: Wed Jul 18 01:02:21 2007
>> New Revision: 557188
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=557188
>> Log:
>> Simplify OS detection. We are only interested in NT
>> and WIN2K+ (so we can use services.msc)
> 
> Can we assume that version Vista+1 is a superset of Vista?  I would
> presume as much.
> 

I think so. Anyhow the only need for OS detection is for
NT/9x detection and for WIN2K+ that have services.msc
(Including WIN2K, XP, WIN2K3, VISTA, and hopefully followers)

However if post VISTA will have something different then
services.msc we would need to have detection for that.

Regards,
Mladen.

Re: svn commit: r557188 - /httpd/httpd/trunk/support/win32/ApacheMonitor.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
mturk@apache.org wrote:
> Author: mturk
> Date: Wed Jul 18 01:02:21 2007
> New Revision: 557188
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=557188
> Log:
> Simplify OS detection. We are only interested in NT
> and WIN2K+ (so we can use services.msc)

Can we assume that version Vista+1 is a superset of Vista?  I would
presume as much.

Re: svn commit: r557188 - /httpd/httpd/trunk/support/win32/ApacheMonitor.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
mturk@apache.org wrote:
> Author: mturk
> Date: Wed Jul 18 01:02:21 2007
> New Revision: 557188
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=557188
> Log:
> Simplify OS detection. We are only interested in NT
> and WIN2K+ (so we can use services.msc)

Can we assume that version Vista+1 is a superset of Vista?  I would
presume as much.