summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-01-18 20:07:38 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-01-18 20:07:38 +0000
commit3c2bc464caefadbf493820130dd797c51cdd8bea (patch)
treea21755e522129a30298b67dc1e39a2e239cbf263 /time
parent298e2f33de5191cf40e0bb7c1c455e587d798385 (diff)
downloadapr-3c2bc464caefadbf493820130dd797c51cdd8bea.tar.gz
Add remaining APR_DECLARE()s to all headers. Conditionally added
APR_DECLARES() to the sources, based on compilation emits (there are many that should be changed eventually, but the compiler will emit errors if those sources are added for win32). This change also splits libapr from apr, so the two projects are compiled seperately. Both .dsp files must be kept up-to-date with source file revisions. Finally, libapr.def is no longer needed - so it is gone. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61072 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r--time/win32/time.c33
-rw-r--r--time/win32/timestr.c9
2 files changed, 25 insertions, 17 deletions
diff --git a/time/win32/time.c b/time/win32/time.c
index 3bbeadfd1..894a5db3c 100644
--- a/time/win32/time.c
+++ b/time/win32/time.c
@@ -123,14 +123,15 @@ void SystemTimeToAprExpTime(apr_exploded_time_t *xt, SYSTEMTIME *tm)
return;
}
-apr_status_t apr_ansi_time_to_apr_time(apr_time_t *result, time_t input)
+APR_DECLARE(apr_status_t) apr_ansi_time_to_apr_time(apr_time_t *result,
+ time_t input)
{
*result = (apr_time_t) input * APR_USEC_PER_SEC;
return APR_SUCCESS;
}
/* Return micro-seconds since the Unix epoch (jan. 1, 1970) UTC */
-apr_time_t apr_now(void)
+APR_DECLARE(apr_time_t) apr_now(void)
{
LONGLONG aprtime = 0;
FILETIME time;
@@ -139,7 +140,8 @@ apr_time_t apr_now(void)
return aprtime;
}
-apr_status_t apr_explode_gmt(apr_exploded_time_t *result, apr_time_t input)
+APR_DECLARE(apr_status_t) apr_explode_gmt(apr_exploded_time_t *result,
+ apr_time_t input)
{
FILETIME ft;
SYSTEMTIME st;
@@ -149,7 +151,8 @@ apr_status_t apr_explode_gmt(apr_exploded_time_t *result, apr_time_t input)
return APR_SUCCESS;
}
-apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input)
+APR_DECLARE(apr_status_t) apr_explode_localtime(apr_exploded_time_t *result,
+ apr_time_t input)
{
SYSTEMTIME st;
FILETIME ft, localft;
@@ -161,7 +164,8 @@ apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input
return APR_SUCCESS;
}
-apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt)
+APR_DECLARE(apr_status_t) apr_implode_time(apr_time_t *t,
+ apr_exploded_time_t *xt)
{
int year;
time_t days;
@@ -195,15 +199,16 @@ apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt)
return APR_SUCCESS;
}
-apr_status_t apr_get_os_imp_time(apr_os_imp_time_t **ostime, apr_time_t *aprtime)
+APR_DECLARE(apr_status_t) apr_get_os_imp_time(apr_os_imp_time_t **ostime,
+ apr_time_t *aprtime)
{
/* TODO: Consider not passing in pointer to apr_time_t (e.g., call by value) */
AprTimeToFileTime(*ostime, *aprtime);
return APR_SUCCESS;
}
-apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime,
- apr_exploded_time_t *aprexptime)
+APR_DECLARE(apr_status_t) apr_get_os_exp_time(apr_os_exp_time_t **ostime,
+ apr_exploded_time_t *aprexptime)
{
(*ostime)->wYear = aprexptime->tm_year + 1900;
(*ostime)->wMonth = aprexptime->tm_mon + 1;
@@ -216,21 +221,23 @@ apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime,
return APR_SUCCESS;
}
-apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime,
- apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_put_os_imp_time(apr_time_t *aprtime,
+ apr_os_imp_time_t **ostime,
+ apr_pool_t *cont)
{
FileTimeToAprTime(aprtime, *ostime);
return APR_SUCCESS;
}
-apr_status_t apr_put_os_exp_time(apr_exploded_time_t *aprtime,
- apr_os_exp_time_t **ostime, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_put_os_exp_time(apr_exploded_time_t *aprtime,
+ apr_os_exp_time_t **ostime,
+ apr_pool_t *cont)
{
SystemTimeToAprExpTime(aprtime, *ostime);
return APR_SUCCESS;
}
-void apr_sleep(apr_interval_time_t t)
+APR_DECLARE(void) apr_sleep(apr_interval_time_t t)
{
Sleep(t/1000);
}
diff --git a/time/win32/timestr.c b/time/win32/timestr.c
index 69db6fcd3..9c7cfc106 100644
--- a/time/win32/timestr.c
+++ b/time/win32/timestr.c
@@ -64,7 +64,7 @@ APR_DECLARE_DATA const char apr_day_snames[7][4] =
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
-apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
+APR_DECLARE(apr_status_t) apr_rfc822_date(char *date_str, apr_time_t t)
{
apr_exploded_time_t xt;
const char *s;
@@ -112,7 +112,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
return APR_SUCCESS;
}
-apr_status_t apr_ctime(char *date_str, apr_time_t t)
+APR_DECLARE(apr_status_t) apr_ctime(char *date_str, apr_time_t t)
{
apr_exploded_time_t xt;
const char *s;
@@ -154,8 +154,9 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t)
return APR_SUCCESS;
}
-apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max,
- const char *format, apr_exploded_time_t *xt)
+APR_DECLARE(apr_status_t) apr_strftime(char *s, apr_size_t *retsize,
+ apr_size_t max, const char *format,
+ apr_exploded_time_t *xt)
{
struct tm tm;
memset(&tm, 0, sizeof tm);