summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-12-28 23:50:49 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-12-28 23:50:49 +0000
commit4e3d20f54305554d1469a63024b47824a37573e0 (patch)
treedb19fb3b04d25a636fb4becd5c38c8b1a47864ea /user
parent367467cffe8363cd2d669693a94396794da8a646 (diff)
downloadlibapr-4e3d20f54305554d1469a63024b47824a37573e0.tar.gz
Substantial optimization of the os_level semantic. Since this is entirely
for internal consumption, and apr_initialize must be called, resolve the situation once and use the static, shared value for the remainder of the program execution. Next step is to allow conditional builds [excluding older 9x paths] if the user has no interest in 9x support. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62675 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user')
-rw-r--r--user/win32/userinfo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c
index 66f9abb4a..10ced7d09 100644
--- a/user/win32/userinfo.c
+++ b/user/win32/userinfo.c
@@ -103,7 +103,6 @@ void get_sid_string(char *buf, int blen, apr_uid_t id)
*/
APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, const char *username, apr_pool_t *p)
{
- apr_oslevel_e os_level;
apr_status_t rv;
char regkey[MAX_PATH * 2];
char *fixch;
@@ -111,7 +110,7 @@ APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, const char *use
DWORD type;
HKEY key;
- if (apr_get_oslevel(p, &os_level) || os_level >= APR_WIN_NT) {
+ if (apr_os_level >= APR_WIN_NT) {
apr_uid_t uid;
apr_gid_t gid;
@@ -136,7 +135,7 @@ APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, const char *use
return APR_FROM_OS_ERROR(rv);
#if APR_HAS_UNICODE_FS
- if (apr_get_oslevel(p, &os_level) || os_level >= APR_WIN_NT) {
+ if (apr_os_level >= APR_WIN_NT) {
keylen = sizeof(regkey);
rv = RegQueryValueExW(key, L"ProfileImagePath", NULL, &type,