summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2002-01-28 15:56:08 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2002-01-28 15:56:08 +0000
commit48ac2e0f5774f5efa34bb6492a4d1a91cba143b2 (patch)
treec5a1e5b740f156a02ed930c512fafbf23e31789d /user
parentc33e1fe26d428e10aa60ed8c694bc590acd06b01 (diff)
downloadapr-48ac2e0f5774f5efa34bb6492a4d1a91cba143b2.tar.gz
Mladen Turk's <mturk@mappingsoft.com> WinCE port.
Nearly, the apr.hw patch needs some review. In short, several quite standard ansi headers (e.g. time.h) aren't present in the WinCT port, but these changes require corresponding changes to apr.h.in. I changed Mladen's #define'd symbol names for the macro blocks to IF_WIN_OS_IS_UNICODE and ELSE_WIN_OS_IS_ANSI to make the code a bit more readable, and drop the global apr_os_level from each macro invocation. Also, I changed the scope of his APR_HAS_ANSI_FS to local scope, since it has no application in the public headers. Mladen's patch helps NT as well, allowing the /D WINNT flag to define NT-only compilations. With WINNT defined, all UNICODE/ANSI os version tests drop out entirely. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user')
-rw-r--r--user/win32/userinfo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c
index 10ced7d09..54ba7e9cb 100644
--- a/user/win32/userinfo.c
+++ b/user/win32/userinfo.c
@@ -135,7 +135,8 @@ 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_os_level >= APR_WIN_NT) {
+ IF_WIN_OS_IS_UNICODE
+ {
keylen = sizeof(regkey);
rv = RegQueryValueExW(key, L"ProfileImagePath", NULL, &type,
@@ -162,8 +163,9 @@ APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, const char *use
else
return APR_ENOENT;
}
- else
-#endif /* APR_HAS_UNICODE_FS */
+#endif
+#if APR_HAS_ANSI_FS
+ ELSE_WIN_OS_IS_ANSI
{
keylen = sizeof(regkey);
rv = RegQueryValueEx(key, "ProfileImagePath", NULL, &type,
@@ -182,6 +184,7 @@ APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, const char *use
else
return APR_ENOENT;
}
+#endif /* APR_HAS_ANSI_FS */
for (fixch = *dirname; *fixch; ++fixch)
if (*fixch == '\\')
*fixch = '/';