summaryrefslogtreecommitdiff
path: root/time/win32
diff options
context:
space:
mode:
authorMladen Turk <mturk@apache.org>2021-12-02 21:21:18 +0000
committerMladen Turk <mturk@apache.org>2021-12-02 21:21:18 +0000
commit6487330c38e3c0430782a5ceca674b94398f347f (patch)
treeededff55d7051624a164926ea86ad603d6776026 /time/win32
parent2520ce23f2830c59cfc2786effbbe72903c49ad5 (diff)
downloadapr-6487330c38e3c0430782a5ceca674b94398f347f.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 'time/win32')
-rw-r--r--time/win32/time.c19
-rw-r--r--time/win32/timestr.c8
2 files changed, 3 insertions, 24 deletions
diff --git a/time/win32/time.c b/time/win32/time.c
index ac75b7b6f..b83b64eb5 100644
--- a/time/win32/time.c
+++ b/time/win32/time.c
@@ -91,13 +91,8 @@ APR_DECLARE(apr_time_t) apr_time_now(void)
{
LONGLONG aprtime = 0;
FILETIME time;
-#ifndef _WIN32_WCE
+
GetSystemTimeAsFileTime(&time);
-#else
- SYSTEMTIME st;
- GetSystemTime(&st);
- SystemTimeToFileTime(&st, &time);
-#endif
FileTimeToAprTime(&aprtime, &time);
return aprtime;
}
@@ -144,7 +139,7 @@ APR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result,
AprTimeToFileTime(&ft, input);
-#if APR_HAS_UNICODE_FS && !defined(_WIN32_WCE)
+#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
TIME_ZONE_INFORMATION *tz;
@@ -184,7 +179,7 @@ APR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result,
- (-(tz->Bias + tz->StandardBias) / 60);
}
#endif
-#if APR_HAS_ANSI_FS || defined(_WIN32_WCE)
+#if APR_HAS_ANSI_FS
ELSE_WIN_OS_IS_ANSI
{
TIME_ZONE_INFORMATION tz;
@@ -317,13 +312,6 @@ APR_DECLARE(void) apr_sleep(apr_interval_time_t t)
Sleep((DWORD)(t / 1000));
}
-#if defined(_WIN32_WCE)
-/* A noop on WinCE, like Unix implementation */
-APR_DECLARE(void) apr_time_clock_hires(apr_pool_t *p)
-{
- return;
-}
-#else
static apr_status_t clock_restore(void *unsetres)
{
ULONG newRes;
@@ -343,4 +331,3 @@ APR_DECLARE(void) apr_time_clock_hires(apr_pool_t *p)
apr_pool_cleanup_null);
}
}
-#endif
diff --git a/time/win32/timestr.c b/time/win32/timestr.c
index 138412352..4fbdf825f 100644
--- a/time/win32/timestr.c
+++ b/time/win32/timestr.c
@@ -122,8 +122,6 @@ APR_DECLARE(apr_status_t) apr_ctime(char *date_str, apr_time_t t)
}
-#ifndef _WIN32_WCE
-
static apr_size_t win32_strftime_extra(char *s, size_t max, const char *format,
const struct tm *tm)
{
@@ -193,16 +191,11 @@ static apr_size_t win32_strftime_extra(char *s, size_t max, const char *format,
return return_value;
}
-#endif
-
APR_DECLARE(apr_status_t) apr_strftime(char *s, apr_size_t *retsize,
apr_size_t max, const char *format,
apr_time_exp_t *xt)
{
-#ifdef _WIN32_WCE
- return APR_ENOTIMPL;
-#else
struct tm tm;
memset(&tm, 0, sizeof tm);
tm.tm_sec = xt->tm_sec;
@@ -216,5 +209,4 @@ APR_DECLARE(apr_status_t) apr_strftime(char *s, apr_size_t *retsize,
tm.tm_isdst = xt->tm_isdst;
(*retsize) = win32_strftime_extra(s, max, format, &tm);
return APR_SUCCESS;
-#endif
}