diff options
author | mturk <mturk@13f79535-47bb-0310-9956-ffa450edef68> | 2021-12-02 21:21:18 +0000 |
---|---|---|
committer | mturk <mturk@13f79535-47bb-0310-9956-ffa450edef68> | 2021-12-02 21:21:18 +0000 |
commit | b25d6e804e6a8a6297fe50bcf172633f6fc62a65 (patch) | |
tree | ededff55d7051624a164926ea86ad603d6776026 /misc | |
parent | b3a1666add26881edbb7fe9a94f38a33da9c355c (diff) | |
download | libapr-b25d6e804e6a8a6297fe50bcf172633f6fc62a65.tar.gz |
Stage 3 in dismantling _WIN32_WCE ... cleanup code
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895508 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r-- | misc/unix/errorcodes.c | 26 | ||||
-rw-r--r-- | misc/win32/charset.c | 4 | ||||
-rw-r--r-- | misc/win32/env.c | 14 | ||||
-rw-r--r-- | misc/win32/misc.c | 19 | ||||
-rw-r--r-- | misc/win32/start.c | 6 |
5 files changed, 2 insertions, 67 deletions
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c index f106cde28..08c7a31b7 100644 --- a/misc/unix/errorcodes.c +++ b/misc/unix/errorcodes.c @@ -267,7 +267,6 @@ static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode apr_size_t len=0, i; #ifndef NETWARE -#ifndef _WIN32_WCE len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, @@ -276,25 +275,6 @@ static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode buf, (DWORD)bufsize, NULL); -#else /* _WIN32_WCE speaks unicode */ - LPTSTR msg = (LPTSTR) buf; - len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - errcode, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ - msg, - (DWORD) (bufsize/sizeof(TCHAR)), - NULL); - /* in-place convert to US-ASCII, substituting '?' for non ASCII */ - for(i = 0; i <= len; i++) { - if (msg[i] < 0x80 && msg[i] >= 0) { - buf[i] = (char) msg[i]; - } else { - buf[i] = '?'; - } - } -#endif #endif if (!len) { @@ -410,11 +390,6 @@ static char *native_strerror(apr_status_t statcode, char *buf, static char *native_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) { -#ifdef _WIN32_WCE - static char err[32]; - sprintf(err, "Native Error #%d", statcode); - return stuffbuffer(buf, bufsize, err); -#else const char *err = strerror(statcode); if (err) { return stuffbuffer(buf, bufsize, err); @@ -422,7 +397,6 @@ static char *native_strerror(apr_status_t statcode, char *buf, return stuffbuffer(buf, bufsize, "APR does not understand this error code"); } -#endif } #endif diff --git a/misc/win32/charset.c b/misc/win32/charset.c index 41135b25d..a09914a00 100644 --- a/misc/win32/charset.c +++ b/misc/win32/charset.c @@ -30,11 +30,7 @@ APR_DECLARE(const char*) apr_os_locale_encoding (apr_pool_t *pool) #ifdef _UNICODE int i; #endif -#if defined(_WIN32_WCE) - LCID locale = GetUserDefaultLCID(); -#else LCID locale = GetThreadLocale(); -#endif int len = GetLocaleInfo(locale, LOCALE_IDEFAULTANSICODEPAGE, NULL, 0); char *cp = apr_palloc(pool, (len * sizeof(TCHAR)) + 2); if (0 < GetLocaleInfo(locale, LOCALE_IDEFAULTANSICODEPAGE, (TCHAR*) (cp + 2), len)) diff --git a/misc/win32/env.c b/misc/win32/env.c index 39af0878e..3712309b9 100644 --- a/misc/win32/env.c +++ b/misc/win32/env.c @@ -24,7 +24,7 @@ #include "apr_pools.h" #include "apr_strings.h" -#if APR_HAS_UNICODE_FS && !defined(_WIN32_WCE) +#if APR_HAS_UNICODE_FS static apr_status_t widen_envvar_name (apr_wchar_t *buffer, apr_size_t bufflen, const char *envvar) @@ -46,9 +46,6 @@ APR_DECLARE(apr_status_t) apr_env_get(char **value, const char *envvar, apr_pool_t *pool) { -#if defined(_WIN32_WCE) - return APR_ENOTIMPL; -#else char *val = NULL; DWORD size; @@ -114,7 +111,6 @@ APR_DECLARE(apr_status_t) apr_env_get(char **value, *value = val; return APR_SUCCESS; -#endif } @@ -122,9 +118,6 @@ APR_DECLARE(apr_status_t) apr_env_set(const char *envvar, const char *value, apr_pool_t *pool) { -#if defined(_WIN32_WCE) - return APR_ENOTIMPL; -#else #if APR_HAS_UNICODE_FS IF_WIN_OS_IS_UNICODE { @@ -156,15 +149,11 @@ APR_DECLARE(apr_status_t) apr_env_set(const char *envvar, #endif return APR_SUCCESS; -#endif } APR_DECLARE(apr_status_t) apr_env_delete(const char *envvar, apr_pool_t *pool) { -#if defined(_WIN32_WCE) - return APR_ENOTIMPL; -#else #if APR_HAS_UNICODE_FS IF_WIN_OS_IS_UNICODE { @@ -188,5 +177,4 @@ APR_DECLARE(apr_status_t) apr_env_delete(const char *envvar, apr_pool_t *pool) #endif return APR_SUCCESS; -#endif } diff --git a/misc/win32/misc.c b/misc/win32/misc.c index 5631d2c9e..295a08fb0 100644 --- a/misc/win32/misc.c +++ b/misc/win32/misc.c @@ -104,17 +104,6 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level) apr_os_level = APR_WIN_10; } } -#ifdef _WIN32_WCE - else if (oslev.dwPlatformId == VER_PLATFORM_WIN32_CE) - { - if (oslev.dwMajorVersion < 3) { - apr_os_level = APR_WIN_UNSUP; - } - else { - apr_os_level = APR_WIN_CE_3; - } - } -#endif else { apr_os_level = APR_WIN_UNSUP; } @@ -187,19 +176,11 @@ FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char* fnName, int ordinal) return NULL; } -#if defined(_WIN32_WCE) - if (ordinal) - return GetProcAddressA(cached_dll_handle, - (const char *) (apr_ssize_t)ordinal); - else - return GetProcAddressA(cached_dll_handle, fnName); -#else if (ordinal) return GetProcAddress(cached_dll_handle, (const char *) (apr_ssize_t)ordinal); else return GetProcAddress(cached_dll_handle, fnName); -#endif } DWORD apr_wait_for_single_object(HANDLE handle, apr_interval_time_t timeout) diff --git a/misc/win32/start.c b/misc/win32/start.c index df60283e1..1def000ae 100644 --- a/misc/win32/start.c +++ b/misc/win32/start.c @@ -30,7 +30,6 @@ */ int APR_DECLARE_DATA apr_app_init_complete = 0; -#if !defined(_WIN32_WCE) /* Used by apr_app_initialize to reprocess the environment * * An internal apr function to convert a double-null terminated set @@ -91,7 +90,6 @@ static int warrsztoastr(const char * const * *retarr, return args; } -#endif /* Reprocess the arguments to main() for a completely apr-ized application */ @@ -106,9 +104,7 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, return rv; } -#if defined(_WIN32_WCE) - apr_app_init_complete = 1; -#elif APR_HAS_UNICODE_FS +#if APR_HAS_UNICODE_FS IF_WIN_OS_IS_UNICODE { apr_wchar_t **wstrs; |