From f2ea6479f9f52f775a956f281f13e8287bef7d38 Mon Sep 17 00:00:00 2001 From: mturk Date: Mon, 17 Jan 2005 12:26:58 +0000 Subject: Added detection for XP_SP1, XP_SP2 and 2003. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125411 13f79535-47bb-0310-9956-ffa450edef68 --- include/arch/win32/apr_arch_misc.h | 5 ++++- misc/win32/misc.c | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/arch/win32/apr_arch_misc.h b/include/arch/win32/apr_arch_misc.h index 171d8f7ca..c63d64eb0 100644 --- a/include/arch/win32/apr_arch_misc.h +++ b/include/arch/win32/apr_arch_misc.h @@ -99,7 +99,10 @@ typedef enum { APR_WIN_2000 = 50, APR_WIN_2000_SP1 = 51, APR_WIN_2000_SP2 = 52, - APR_WIN_XP = 60 + APR_WIN_XP = 60, + APR_WIN_XP_SP1 = 61, + APR_WIN_XP_SP2 = 62, + APR_WIN_2003 = 70 } apr_oslevel_e; extern APR_DECLARE_DATA apr_oslevel_e apr_os_level; diff --git a/misc/win32/misc.c b/misc/win32/misc.c index f86746214..743580944 100644 --- a/misc/win32/misc.c +++ b/misc/win32/misc.c @@ -79,8 +79,16 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level) else apr_os_level = APR_WIN_2000_SP2; } + else if (oslev.dwMinorVersion == 2) { + apr_os_level = APR_WIN_2003; + } else { - apr_os_level = APR_WIN_XP; + if (servpack < 1) + apr_os_level = APR_WIN_XP; + else if (servpack == 1) + apr_os_level = APR_WIN_XP_SP1; + else + apr_os_level = APR_WIN_XP_SP2; } } else { -- cgit v1.2.1