diff options
author | Ryan Bloom <rbb@apache.org> | 2001-08-10 21:04:49 +0000 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2001-08-10 21:04:49 +0000 |
commit | 30939cddd74e3c78354e30a5c757abe8827b3c1e (patch) | |
tree | 2a0e1e4819381de7a0bacb68ba78c5ea5ae6c8de /time | |
parent | 3273cb90b4d65f94584c221344fba2ceefaff046 (diff) | |
download | apr-30939cddd74e3c78354e30a5c757abe8827b3c1e.tar.gz |
Wrap all APR functions in APR_DECLARE macro.
Submitted by: Sterling Hughes <sterling@designmultimedia.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62139 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r-- | time/unix/time.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index d20f34de0..5f46b5ff1 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -103,14 +103,15 @@ static apr_int32_t get_offset(struct tm *tm) #endif } -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; } /* NB NB NB NB This returns GMT!!!!!!!!!! */ -apr_time_t apr_time_now(void) +APR_DECLARE(apr_time_t) apr_time_now(void) { #ifdef NETWARE uint64_t usec; @@ -155,7 +156,7 @@ static void explode_time(apr_exploded_time_t *xt, apr_time_t t, xt->tm_gmtoff = get_offset(&tm); } -apr_status_t apr_explode_time(apr_exploded_time_t *result, apr_time_t input, +APR_DECLARE(apr_status_t) apr_explode_time(apr_exploded_time_t *result, apr_time_t input, apr_int32_t offs) { explode_time(result, input, offs, 0); @@ -163,12 +164,12 @@ apr_status_t apr_explode_time(apr_exploded_time_t *result, apr_time_t input, return APR_SUCCESS; } -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) { return apr_explode_time(result, input, 0); } -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) { #if defined(__EMX__) /* EMX gcc (OS/2) has a timezone global we can use */ @@ -179,7 +180,7 @@ apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input #endif /* __EMX__ */ } -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; @@ -210,7 +211,7 @@ apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt) return APR_SUCCESS; } -apr_status_t apr_implode_gmt(apr_time_t *t, apr_exploded_time_t *xt) +APR_DECLARE(apr_status_t) apr_implode_gmt(apr_time_t *t, apr_exploded_time_t *xt) { apr_status_t status = apr_implode_time(t, xt); if (status == APR_SUCCESS) @@ -218,15 +219,16 @@ apr_status_t apr_implode_gmt(apr_time_t *t, apr_exploded_time_t *xt) return status; } -apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime, apr_time_t *aprtime) +APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime, + apr_time_t *aprtime) { (*ostime)->tv_usec = *aprtime % APR_USEC_PER_SEC; (*ostime)->tv_sec = *aprtime / APR_USEC_PER_SEC; return APR_SUCCESS; } -apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime, - apr_exploded_time_t *aprtime) +APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime, + apr_exploded_time_t *aprtime) { (*ostime)->tm_sec = aprtime->tm_sec; (*ostime)->tm_min = aprtime->tm_min; @@ -245,15 +247,15 @@ apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime, return APR_SUCCESS; } -apr_status_t apr_os_imp_time_put(apr_time_t *aprtime, apr_os_imp_time_t **ostime, - apr_pool_t *cont) +APR_DECLARE(apr_status_t) apr_os_imp_time_put(apr_time_t *aprtime, apr_os_imp_time_t **ostime, + apr_pool_t *cont) { *aprtime = (*ostime)->tv_sec * APR_USEC_PER_SEC + (*ostime)->tv_usec; return APR_SUCCESS; } -apr_status_t apr_os_exp_time_put(apr_exploded_time_t *aprtime, - apr_os_exp_time_t **ostime, apr_pool_t *cont) +APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_exploded_time_t *aprtime, + apr_os_exp_time_t **ostime, apr_pool_t *cont) { aprtime->tm_sec = (*ostime)->tm_sec; aprtime->tm_min = (*ostime)->tm_min; @@ -272,7 +274,7 @@ apr_status_t apr_os_exp_time_put(apr_exploded_time_t *aprtime, return APR_SUCCESS; } -void apr_sleep(apr_interval_time_t t) +APR_DECLARE(void) apr_sleep(apr_interval_time_t t) { #ifdef OS2 DosSleep(t/1000); @@ -287,8 +289,8 @@ void apr_sleep(apr_interval_time_t t) } #ifdef OS2 -apr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date, - FTIME os2time) +APR_DECLARE(apr_status_t) apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date, + FTIME os2time) { struct tm tmpdate; |