]> granicus.if.org Git - apache/commitdiff
Fix some APR-ization issues:
authorJeff Trawick <trawick@apache.org>
Sat, 3 Mar 2001 01:46:16 +0000 (01:46 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 3 Mar 2001 01:46:16 +0000 (01:46 +0000)
1) we're using an apr_time_t file mtime, but trying to fit it in
   a time_t entry in the cache and in parameters to the cache
   access routines; use apr_time_t everywhere

2) we need to use apr_fileperms_t instead of mode_t for APR
   file permissions

PR: 6980

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88443 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c
modules/mappers/mod_rewrite.h

index 8e1e77656c942be283835c2254e016204b2f5f52..4adddc50d0784778825a6a5ea45a2a045a1d5800 100644 (file)
@@ -3056,7 +3056,7 @@ static void open_rewritelog(server_rec *s, apr_pool_t *p)
     apr_status_t rc;
     piped_log *pl;
     int    rewritelog_flags = ( APR_WRITE | APR_APPEND | APR_CREATE );
-    mode_t rewritelog_mode  = ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD );
+    apr_fileperms_t rewritelog_mode  = ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD );
 
     conf = ap_get_module_config(s->module_config, &rewrite_module);
 
@@ -3626,7 +3626,7 @@ static cache *init_cache(apr_pool_t *p)
     return c;
 }
 
-static void set_cache_string(cache *c, const char *res, int mode, time_t t,
+static void set_cache_string(cache *c, const char *res, int mode, apr_time_t t,
                              char *key, char *value)
 {
     cacheentry ce;
@@ -3639,7 +3639,7 @@ static void set_cache_string(cache *c, const char *res, int mode, time_t t,
 }
 
 static char *get_cache_string(cache *c, const char *res, int mode,
-                              time_t t, char *key)
+                              apr_time_t t, char *key)
 {
     cacheentry *ce;
 
index 7d2ca24d06d7c127d78bdee804e9a211c19d7fad..f1398779784ca51d4fbd0b346f0228bd741c8fe4 100644 (file)
 
 #include "ap_config.h"
 
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-
     /* Include from the Apache server ... */
 #define CORE_PRIVATE
 #include "httpd.h"
@@ -304,7 +300,7 @@ typedef struct {
      * a 4-way hash apr_table_t with LRU functionality
      */
 typedef struct cacheentry {
-    time_t time;
+    apr_time_t time;
     char  *key;
     char  *value;
 } cacheentry;
@@ -452,9 +448,9 @@ static char *lookup_header(request_rec *r, const char *name);
 
     /* caching functions */
 static cache *init_cache(apr_pool_t *p);
-static char  *get_cache_string(cache *c, const char *res, int mode, time_t mtime,
+static char  *get_cache_string(cache *c, const char *res, int mode, apr_time_t mtime,
                                char *key);
-static void   set_cache_string(cache *c, const char *res, int mode, time_t mtime,
+static void   set_cache_string(cache *c, const char *res, int mode, apr_time_t mtime,
                                char *key, char *value);
 static cacheentry *retrieve_cache_string(cache *c, const char *res, char *key);
 static void   store_cache_string(cache *c, const char *res, cacheentry *ce);