]> granicus.if.org Git - apache/commitdiff
Although we consistently used apr_time() APIs, the declarations didn't
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 1 Dec 2002 22:28:07 +0000 (22:28 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 1 Dec 2002 22:28:07 +0000 (22:28 +0000)
  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
modules/experimental/util_ldap_cache_mgr.c

index 6adeb991819b4975e305a9772670934f23a1d801..2a66069894918ea8a83492087c22bca1e6037c87 100644 (file)
@@ -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. */
index f2a65d91326504684ab8c07c22ae71626dafe86b..5d0765093f3444c7033ac2f4f46611c06045e958 100644 (file)
@@ -73,7 +73,7 @@
 /* here till malloc is gone */
 #include <stdlib.h>
 
-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) {