From 8df4a0eb03595c95d35c0605c132e841a34ac86c Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sun, 1 Dec 2002 22:28:07 +0000 Subject: [PATCH] Although we consistently used apr_time() APIs, the declarations didn't match up. Nor did the indexes' types. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97720 13f79535-47bb-0310-9956-ffa450edef68 --- modules/experimental/util_ldap_cache.h | 10 +++++----- modules/experimental/util_ldap_cache_mgr.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/experimental/util_ldap_cache.h b/modules/experimental/util_ldap_cache.h index 6adeb99181..2a66069894 100644 --- a/modules/experimental/util_ldap_cache.h +++ b/modules/experimental/util_ldap_cache.h @@ -73,7 +73,7 @@ typedef struct util_cache_node_t { void *payload; /* Pointer to the payload */ - time_t add_time; /* Time node was added to cache */ + apr_time_t add_time; /* Time node was added to cache */ struct util_cache_node_t *next; } util_cache_node_t; @@ -82,16 +82,16 @@ typedef struct util_ald_cache_t { unsigned long maxentries; /* Maximum number of cache entries */ unsigned long numentries; /* Current number of cache entries */ unsigned long fullmark; /* Used to keep track of when cache becomes 3/4 full */ - time_t marktime; /* Time that the cache became 3/4 full */ + apr_time_t marktime; /* Time that the cache became 3/4 full */ unsigned long (*hash)(void *); /* Func to hash the payload */ int (*compare)(void *, void *); /* Func to compare two payloads */ void * (*copy)(void *); /* Func to alloc mem and copy payload to new mem */ - void (*free)(void *); /* Func to free mem used by the payload */ + void (*free)(void *); /* Func to free mem used by the payload */ util_cache_node_t **nodes; unsigned long numpurges; /* No. of times the cache has been purged */ - double avg_purgetime; /* Average time to purge the cache */ - time_t last_purge; /* Time of the last purge */ + double avg_purgetime; /* Average time to purge the cache */ + apr_time_t last_purge; /* Time of the last purge */ unsigned long npurged; /* Number of elements purged in last purge. This is not obvious: it won't be 3/4 the size of the cache if there were a lot of expired entries. */ diff --git a/modules/experimental/util_ldap_cache_mgr.c b/modules/experimental/util_ldap_cache_mgr.c index f2a65d9132..5d0765093f 100644 --- a/modules/experimental/util_ldap_cache_mgr.c +++ b/modules/experimental/util_ldap_cache_mgr.c @@ -73,7 +73,7 @@ /* here till malloc is gone */ #include -static const int primes[] = +static const unsigned long primes[] = { 11, 19, @@ -201,7 +201,7 @@ unsigned long util_ald_hash_string(int nstr, ...) */ void util_ald_cache_purge(util_ald_cache_t *cache) { - int i; + unsigned long i; util_cache_node_t *p, *q; apr_time_t t; @@ -287,7 +287,7 @@ util_ald_cache_t *util_ald_create_cache(unsigned long maxentries, void (*freefunc)(void *)) { util_ald_cache_t *cache; - int i; + unsigned long i; if (maxentries <= 0) return NULL; @@ -334,7 +334,7 @@ util_ald_cache_t *util_ald_create_cache(unsigned long maxentries, void util_ald_destroy_cache(util_ald_cache_t *cache) { - int i; + unsigned long i; util_cache_node_t *p, *q; if (cache == NULL) @@ -438,7 +438,7 @@ void util_ald_cache_remove(util_ald_cache_t *cache, void *payload) char *util_ald_cache_display_stats(apr_pool_t *p, util_ald_cache_t *cache, char *name) { - int i; + unsigned long i; int totchainlen = 0; int nchains = 0; double chainlen; @@ -501,7 +501,7 @@ char *util_ald_cache_display_stats(apr_pool_t *p, util_ald_cache_t *cache, char char *util_ald_cache_display(apr_pool_t *pool) { - int i; + unsigned long i; char *buf, *t1, *t2, *t3; if (!util_ldap_cache) { -- 2.40.0