summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2007-01-08 13:09:33 +0000
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2007-01-08 13:09:33 +0000
commitbd80bf67f4217e1935a5d73ae79b6e0699634910 (patch)
tree07142cd1bc20f5e2cda7d2e9a4e168fb5cc2546e
parentc5fcd6617286e84c4243912100681492c9084489 (diff)
downloadlibapr-bd80bf67f4217e1935a5d73ae79b6e0699634910.tar.gz
Add Windows Vista os version detection
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@494055 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/arch/win32/apr_arch_misc.h3
-rw-r--r--misc/win32/misc.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/include/arch/win32/apr_arch_misc.h b/include/arch/win32/apr_arch_misc.h
index 39f7c36ca..f34c7e65c 100644
--- a/include/arch/win32/apr_arch_misc.h
+++ b/include/arch/win32/apr_arch_misc.h
@@ -103,7 +103,8 @@ typedef enum {
APR_WIN_XP = 60,
APR_WIN_XP_SP1 = 61,
APR_WIN_XP_SP2 = 62,
- APR_WIN_2003 = 70
+ APR_WIN_2003 = 70,
+ APR_WIN_VISTA = 80
} 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 0d72823c2..97b294711 100644
--- a/misc/win32/misc.c
+++ b/misc/win32/misc.c
@@ -80,7 +80,7 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level)
apr_os_level = APR_WIN_2000_SP2;
}
else if (oslev.dwMinorVersion == 2) {
- apr_os_level = APR_WIN_2003;
+ apr_os_level = APR_WIN_2003;
}
else {
if (servpack < 1)
@@ -91,6 +91,9 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level)
apr_os_level = APR_WIN_XP_SP2;
}
}
+ else if (oslev.dwMajorVersion == 6) {
+ apr_os_level = APR_WIN_VISTA;
+ }
else {
apr_os_level = APR_WIN_XP;
}