]> granicus.if.org Git - apache/commitdiff
Fix the rest of the modules to work with the new APR stat structure.
authorRyan Bloom <rbb@apache.org>
Fri, 7 Jan 2000 15:52:21 +0000 (15:52 +0000)
committerRyan Bloom <rbb@apache.org>
Fri, 7 Jan 2000 15:52:21 +0000 (15:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84403 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_speling.c
modules/metadata/mod_cern_meta.c
modules/metadata/mod_expires.c
modules/metadata/mod_mime_magic.c

index 41956b20df2b2ae1518dea0a124c433943a571ef..71d8c0019c14bbdffc3a41bda554e172d2877b98 100644 (file)
@@ -244,7 +244,7 @@ static int check_speling(request_rec *r)
     }
 
     /* We've already got a file of some kind or another */
-    if (r->proxyreq || (r->finfo.st_mode != 0)) {
+    if (r->proxyreq || (r->finfo.protection != 0)) {
         return DECLINED;
     }
 
index 23f93ecdfa2b1f3c8c05ec22da789ab4db2b57d3..679d0e8af8d2131bfc2647fe9c6d52d04eb3fd9c 100644 (file)
@@ -309,12 +309,12 @@ static int add_cern_meta_data(request_rec *r)
 
     /* if ./.web/$1.meta exists then output 'asis' */
 
-    if (r->finfo.st_mode == 0) {
+    if (r->finfo.protection == 0) {
        return DECLINED;
     };
 
     /* is this a directory? */
-    if (S_ISDIR(r->finfo.st_mode) || r->uri[strlen(r->uri) - 1] == '/') {
+    if (S_ISDIR(r->finfo.protection) || r->uri[strlen(r->uri) - 1] == '/') {
        return DECLINED;
     };
 
index 9a48d9f3682f352ca4da4a1a9881884477277d0d..c0f8ab349193d1b5d9a8204cf05824a4407aeba4 100644 (file)
@@ -403,7 +403,7 @@ static int add_expires(request_rec *r)
     expires_dir_config *conf;
     char *code;
     char *timestr = NULL;
-    ap_int64_t base;
+    ap_ansi_time_t base;
     time_t additional;
     time_t expires;
     ap_time_t *finaltime = NULL;
@@ -453,13 +453,13 @@ static int add_expires(request_rec *r)
 
     switch (code[0]) {
     case 'M':
-       if (r->finfo.st_mode == 0) { 
+       if (r->finfo.protection == 0) { 
            /* file doesn't exist on disk, so we can't do anything based on
             * modification time.  Note that this does _not_ log an error.
             */
            return DECLINED;
        }
-        base = r->finfo.st_mtime;
+        ap_get_ansitime(r->finfo.mtime, &base);
         additional = atoi(&code[1]);
         break;
     case 'A':
index f237572ff3db15bd732d209511ed0b5f9dd33428..bf48229402e8b4553809e6257c637c189cb686e7 100644 (file)
@@ -1448,7 +1448,7 @@ static int hextoint(int c)
  */
 static int fsmagic(request_rec *r, const char *fn)
 {
-    switch (r->finfo.st_mode & S_IFMT) {
+    switch (r->finfo.protection & S_IFMT) {
     case S_IFDIR:
        magic_rsl_puts(r, DIR_MAGIC_TYPE);
        return DONE;
@@ -1497,14 +1497,14 @@ static int fsmagic(request_rec *r, const char *fn)
        break;
     default:
        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
-                   MODNAME ": invalid mode 0%o.", (unsigned int)r->finfo.st_mode);
+                   MODNAME ": invalid mode 0%o.", (unsigned int)r->finfo.protection);
        return HTTP_INTERNAL_SERVER_ERROR;
     }
 
     /*
      * regular file, check next possibility
      */
-    if (r->finfo.st_size == 0) {
+    if (r->finfo.size == 0) {
        magic_rsl_puts(r, MIME_TEXT_UNKNOWN);
        return DONE;
     }
@@ -2448,7 +2448,7 @@ static int magic_find_ct(request_rec *r)
     magic_server_config_rec *conf;
 
     /* the file has to exist */
-    if (r->finfo.st_mode == 0 || !r->filename) {
+    if (r->finfo.protection == 0 || !r->filename) {
        return DECLINED;
     }