summaryrefslogtreecommitdiff
path: root/threadproc/win32/proc.c
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 /threadproc/win32/proc.c
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 'threadproc/win32/proc.c')
-rw-r--r--threadproc/win32/proc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index bd831759b..10ea0f850 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -386,7 +386,8 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
++iEnvBlockLen;
#if APR_HAS_UNICODE_FS
- if (apr_os_level >= APR_WIN_NT) {
+ IF_WIN_OS_IS_UNICODE
+ {
apr_wchar_t *pNext;
pEnvBlock = (char *)apr_palloc(cont, iEnvBlockLen * 2);
dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
@@ -407,8 +408,9 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
*(pNext++) = L'\0';
*pNext = L'\0';
}
- else
#endif /* APR_HAS_UNICODE_FS */
+#if APR_HAS_ANSI_FS
+ ELSE_WIN_OS_IS_ANSI
{
char *pNext;
pEnvBlock = (char *)apr_palloc(cont, iEnvBlockLen);
@@ -424,10 +426,11 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
*(pNext++) = '\0';
*pNext = '\0';
}
+#endif /* APR_HAS_ANSI_FS */
}
#if APR_HAS_UNICODE_FS
- if (apr_os_level >= APR_WIN_NT)
+ IF_WIN_OS_IS_UNICODE
{
STARTUPINFOW si;
apr_size_t nprg = strlen(progname) + 1;
@@ -482,8 +485,10 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
wcwd, /* Current directory name */
&si, &pi);
}
- else {
#endif /* APR_HAS_UNICODE_FS */
+#if APR_HAS_ANSI_FS
+ ELSE_WIN_OS_IS_ANSI
+ {
STARTUPINFOA si;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
@@ -512,6 +517,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
attr->currdir, /* Current directory name */
&si, &pi);
}
+#endif /* APR_HAS_ANSI_FS */
/* Check CreateProcess result
*/