summaryrefslogtreecommitdiff
path: root/dso
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-01-28 15:56:08 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-01-28 15:56:08 +0000
commita577de0569e027dbfba6c9eafaaca3a759855020 (patch)
treec5a1e5b740f156a02ed930c512fafbf23e31789d /dso
parent8ba2665ec4a2b9f0ebca405dc2afb701a0ebd37c (diff)
downloadlibapr-a577de0569e027dbfba6c9eafaaca3a759855020.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: http://svn.apache.org/repos/asf/apr/apr/trunk@62837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r--dso/win32/dso.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dso/win32/dso.c b/dso/win32/dso.c
index 974bf9775..56b31beaa 100644
--- a/dso/win32/dso.c
+++ b/dso/win32/dso.c
@@ -89,7 +89,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
UINT em;
#if APR_HAS_UNICODE_FS
- if (apr_os_level >= APR_WIN_NT)
+ IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wpath[APR_PATH_MAX];
if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
@@ -107,8 +107,9 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
rv = apr_get_os_error();
SetErrorMode(em);
}
- else
#endif
+#if APR_HAS_ANSI_FS
+ ELSE_WIN_OS_IS_ANSI
{
char fspec[APR_PATH_MAX], *p = fspec;
/* Must convert path from / to \ notation.
@@ -132,6 +133,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
rv = APR_SUCCESS;
SetErrorMode(em);
}
+#endif
*res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
(*res_handle)->cont = ctx;