summaryrefslogtreecommitdiff
path: root/shmem
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 /shmem
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 'shmem')
-rw-r--r--shmem/win32/shm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/shmem/win32/shm.c b/shmem/win32/shm.c
index 3d619f6d8..41919ab4f 100644
--- a/shmem/win32/shm.c
+++ b/shmem/win32/shm.c
@@ -144,15 +144,17 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
}
#if APR_HAS_UNICODE_FS
- if (apr_os_level >= APR_WIN_NT)
+ IF_WIN_OS_IS_UNICODE
{
hMap = CreateFileMappingW(hFile, psec, PAGE_READWRITE, 0, size, mapkey);
}
- else
#endif
+#if APR_HAS_ANSI_FS
+ ELSE_WIN_OS_IS_ANSI
{
hMap = CreateFileMappingA(hFile, psec, PAGE_READWRITE, 0, size, mapkey);
}
+#endif
err = apr_get_os_error();
if (file) {
@@ -214,15 +216,17 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
}
#if APR_HAS_UNICODE_FS
- if (apr_os_level >= APR_WIN_NT)
+ IF_WIN_OS_IS_UNICODE
{
hMap = OpenFileMappingW(FILE_MAP_READ | FILE_MAP_WRITE, FALSE, mapkey);
}
- else
#endif
+#if APR_HAS_ANSI_FS
+ ELSE_WIN_OS_IS_ANSI
{
hMap = OpenFileMappingA(FILE_MAP_READ | FILE_MAP_WRITE, FALSE, mapkey);
}
+#endif
if (!hMap) {
return apr_get_os_error();