You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by iv...@apache.org on 2019/06/11 17:22:46 UTC

svn commit: r1861054 - in /apr/apr/trunk: CHANGES include/arch/win32/apr_arch_misc.h misc/win32/misc.c

Author: ivan
Date: Tue Jun 11 17:22:46 2019
New Revision: 1861054

URL: http://svn.apache.org/viewvc?rev=1861054&view=rev
Log:
Fix problem that apr_get_oslevel() was returning APR_WIN_XP on Windows 10.

* include/arch/win32/apr_arch_misc.h
  (enum apr_oslevel_e): Add APR_WIN_10.

* misc/win32/misc.c
  (apr_get_oslevel): Return APR_WIN_10 when dwMajorVersion is greater than 6.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/include/arch/win32/apr_arch_misc.h
    apr/apr/trunk/misc/win32/misc.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1861054&r1=1861053&r2=1861054&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Tue Jun 11 17:22:46 2019
@@ -1,6 +1,8 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) Fixed: apr_get_oslevel() was returning APR_WIN_XP on Windows 10
+
   *) Windows platform: Use the native XML parser implementation (XmlLite)
      by default instead of libxml2 and expat. [Ivan Zhakov]
 

Modified: apr/apr/trunk/include/arch/win32/apr_arch_misc.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/win32/apr_arch_misc.h?rev=1861054&r1=1861053&r2=1861054&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/win32/apr_arch_misc.h (original)
+++ apr/apr/trunk/include/arch/win32/apr_arch_misc.h Tue Jun 11 17:22:46 2019
@@ -111,7 +111,8 @@ typedef enum {
         APR_WIN_VISTA =    80,
         APR_WIN_7  =       90,
         APR_WIN_8  =       100,
-        APR_WIN_8_1 =      110
+        APR_WIN_8_1 =      110,
+        APR_WIN_10 =       120
 } apr_oslevel_e;
 
 extern APR_DECLARE_DATA apr_oslevel_e apr_os_level;

Modified: apr/apr/trunk/misc/win32/misc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/win32/misc.c?rev=1861054&r1=1861053&r2=1861054&view=diff
==============================================================================
--- apr/apr/trunk/misc/win32/misc.c (original)
+++ apr/apr/trunk/misc/win32/misc.c Tue Jun 11 17:22:46 2019
@@ -97,7 +97,7 @@ apr_status_t apr_get_oslevel(apr_oslevel
                     apr_os_level = APR_WIN_8_1;
             }
             else {
-                apr_os_level = APR_WIN_XP;
+                apr_os_level = APR_WIN_10;
             }
         }
 #ifdef _WIN32_WCE