From: Ian Holsman Date: Wed, 6 Mar 2002 17:55:38 +0000 (+0000) Subject: apr-utils rename apr_ansi_time_to_apr_time and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8efdc648d1b3fd49b165cbdb15d222fd3b23d0b4;p=apache apr-utils rename apr_ansi_time_to_apr_time and apr_exploded_time_t. PR: Obtained from: Submitted by: Thom May Reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93733 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index cdd28bc058..1f059e7fc9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.33-dev + *) rename apr_exploded_time_t to apr_time_exp_t (as per renames pending) + [Thom May ] + *) Change mod_ssl to always do a full startup/teardown on restarts. this allows mod_ssl to be added to a server that is already running and makes it possible to add/change certs/keys after the diff --git a/include/util_time.h b/include/util_time.h index 704d0e02d5..7117ee6e8b 100644 --- a/include/util_time.h +++ b/include/util_time.h @@ -83,9 +83,8 @@ extern "C" { * that need to explode the current time multiple times per second, * like loggers. * @return APR_SUCCESS iff successful - * @deffunc apr_status_t ap_explode_recent_localtime(apr_exploded_time_t *tm, apr_time_t t); */ -AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_exploded_time_t *tm, +AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_time_exp_t *tm, apr_time_t t); /** @@ -98,9 +97,8 @@ AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_exploded_time_t *tm, * that need to explode the current time multiple times per second, * like loggers. * @return APR_SUCCESS iff successful - * @deffunc apr_status_t ap_explode_recent_gmt(apr_exploded_time_t *tm, apr_time_t t); */ -AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_exploded_time_t *tm, +AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t *tm, apr_time_t t); diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c index 190a048138..9a880de737 100644 --- a/modules/dav/fs/repos.c +++ b/modules/dav/fs/repos.c @@ -303,7 +303,7 @@ dav_error * dav_fs_dir_file_name( /* NOTE: buf must be at least DAV_TIMEBUF_SIZE chars in size */ static void dav_format_time(int style, apr_time_t sec, char *buf) { - apr_exploded_time_t tms; + apr_time_exp_t tms; /* ### what to do if fails? */ (void) apr_explode_gmt(&tms, sec); diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 70962b5fa5..3a841509bd 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1657,7 +1657,7 @@ static void output_directories(struct ent **ar, int n, if (!(autoindex_opts & SUPPRESS_LAST_MOD)) { if (ar[x]->lm != -1) { char time_str[MAX_STRING_LEN]; - apr_exploded_time_t ts; + apr_time_exp_t ts; apr_explode_localtime(&ts, ar[x]->lm); apr_strftime(time_str, &rv, MAX_STRING_LEN, "%d-%b-%Y %H:%M ", &ts); @@ -1740,7 +1740,7 @@ static void output_directories(struct ent **ar, int n, if (!(autoindex_opts & SUPPRESS_LAST_MOD)) { if (ar[x]->lm != -1) { char time_str[MAX_STRING_LEN]; - apr_exploded_time_t ts; + apr_time_exp_t ts; apr_explode_localtime(&ts, ar[x]->lm); apr_strftime(time_str, &rv, MAX_STRING_LEN, "%d-%b-%Y %H:%M ", &ts); diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 71ba616ec8..6981232901 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -447,7 +447,7 @@ static const char *log_cookie(request_rec *r, char *a) } static const char *log_request_time_custom(request_rec *r, char *a, - apr_exploded_time_t *xt) + apr_time_exp_t *xt) { apr_size_t retcode; char tstr[MAX_STRING_LEN]; @@ -457,7 +457,7 @@ static const char *log_request_time_custom(request_rec *r, char *a, static const char *log_request_time(request_rec *r, char *a) { - apr_exploded_time_t xt; + apr_time_exp_t xt; /* hi. i think getting the time again at the end of the request diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 8c776c5088..281d140474 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -3229,7 +3229,7 @@ static void rewritelog(request_rec *r, int level, const char *text, ...) static char *current_logtime(request_rec *r) { - apr_exploded_time_t t; + apr_time_exp_t t; char tstr[80]; apr_size_t len; @@ -3413,7 +3413,7 @@ static char *lookup_variable(request_rec *r, char *var) { const char *result; char resultbuf[LONG_STRING_LEN]; - apr_exploded_time_t tm; + apr_time_exp_t tm; request_rec *rsub; result = NULL; diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c index a5aa13ab50..56946eb868 100644 --- a/modules/metadata/mod_usertrack.c +++ b/modules/metadata/mod_usertrack.c @@ -155,7 +155,7 @@ static void make_cookie(request_rec *r) dcfg->cookie_name, cookiebuf); if ((dcfg->style == CT_UNSET) || (dcfg->style == CT_NETSCAPE)) { - apr_exploded_time_t tms; + apr_time_exp_t tms; apr_explode_gmt(&tms, r->request_time + cls->expires * APR_USEC_PER_SEC); new_cookie = apr_psprintf(r->pool, diff --git a/modules/ssl/ssl_engine_log.c b/modules/ssl/ssl_engine_log.c index f367ccb695..223671782f 100644 --- a/modules/ssl/ssl_engine_log.c +++ b/modules/ssl/ssl_engine_log.c @@ -170,7 +170,7 @@ void ssl_log(server_rec *s, int level, const char *msg, ...) char str[1024]; char *nstr; apr_size_t len; - apr_exploded_time_t t; + apr_time_exp_t t; va_list ap; int add; int i; diff --git a/server/util.c b/server/util.c index 2fe95d1fe7..8814d54a07 100644 --- a/server/util.c +++ b/server/util.c @@ -142,7 +142,7 @@ AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int apr_size_t retcode; char ts[MAX_STRING_LEN]; char tf[MAX_STRING_LEN]; - apr_exploded_time_t xt; + apr_time_exp_t xt; if (gmt) { const char *f; diff --git a/server/util_time.c b/server/util_time.c index f13b6f2ce8..67072c4d86 100644 --- a/server/util_time.c +++ b/server/util_time.c @@ -60,7 +60,7 @@ struct exploded_time_cache_element { apr_int64_t t; - apr_exploded_time_t xt; + apr_time_exp_t xt; apr_int64_t t_validate; /* please see comments in cached_explode() */ }; @@ -71,7 +71,7 @@ static struct exploded_time_cache_element exploded_cache_localtime[TIME_CACHE_SI static struct exploded_time_cache_element exploded_cache_gmt[TIME_CACHE_SIZE]; -static apr_status_t cached_explode(apr_exploded_time_t *xt, apr_time_t t, +static apr_status_t cached_explode(apr_time_exp_t *xt, apr_time_t t, struct exploded_time_cache_element *cache, int use_gmt) { @@ -86,7 +86,7 @@ static apr_status_t cached_explode(apr_exploded_time_t *xt, apr_time_t t, * exploded time for the current second (vs the time * 'now - AP_TIME_RECENT_THRESHOLD' seconds ago). If the * cached value is for the current time, we use it. Otherwise, - * we compute the apr_exploded_time_t and store it in this + * we compute the apr_time_exp_t and store it in this * cache element. Note that the timestamp in the cache * element is updated only after the exploded time. Thus * if two threads hit this cache element simultaneously @@ -139,7 +139,7 @@ static apr_status_t cached_explode(apr_exploded_time_t *xt, apr_time_t t, else { /* Valid snapshot */ memcpy(xt, &(cache_element_snapshot.xt), - sizeof(apr_exploded_time_t)); + sizeof(apr_time_exp_t)); } } else { @@ -154,7 +154,7 @@ static apr_status_t cached_explode(apr_exploded_time_t *xt, apr_time_t t, return r; } cache_element->t = seconds; - memcpy(&(cache_element->xt), xt, sizeof(apr_exploded_time_t)); + memcpy(&(cache_element->xt), xt, sizeof(apr_time_exp_t)); cache_element->t_validate = seconds; } xt->tm_usec = (int)(t % APR_USEC_PER_SEC); @@ -162,13 +162,13 @@ static apr_status_t cached_explode(apr_exploded_time_t *xt, apr_time_t t, } -AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_exploded_time_t * tm, +AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_time_exp_t * tm, apr_time_t t) { return cached_explode(tm, t, exploded_cache_localtime, 0); } -AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_exploded_time_t * tm, +AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t * tm, apr_time_t t) { return cached_explode(tm, t, exploded_cache_gmt, 1); diff --git a/support/rotatelogs.c b/support/rotatelogs.c index 5c407c3013..0fc0026d3f 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -161,7 +161,7 @@ int main (int argc, char *argv[]) int tLogStart = (now / tRotation) * tRotation; if (use_strftime) { apr_time_t tNow = tLogStart * APR_USEC_PER_SEC; - apr_exploded_time_t e; + apr_time_exp_t e; apr_size_t rs; apr_explode_gmt(&e, tNow);