From 14f85180125cae5629f13e08e0984eca432152dd Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Fri, 7 Jan 2000 15:52:21 +0000 Subject: [PATCH] Fix the rest of the modules to work with the new APR stat structure. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84403 13f79535-47bb-0310-9956-ffa450edef68 --- modules/mappers/mod_speling.c | 2 +- modules/metadata/mod_cern_meta.c | 4 ++-- modules/metadata/mod_expires.c | 6 +++--- modules/metadata/mod_mime_magic.c | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c index 41956b20df..71d8c0019c 100644 --- a/modules/mappers/mod_speling.c +++ b/modules/mappers/mod_speling.c @@ -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; } diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c index 23f93ecdfa..679d0e8af8 100644 --- a/modules/metadata/mod_cern_meta.c +++ b/modules/metadata/mod_cern_meta.c @@ -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; }; diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 9a48d9f368..c0f8ab3491 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -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': diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c index f237572ff3..bf48229402 100644 --- a/modules/metadata/mod_mime_magic.c +++ b/modules/metadata/mod_mime_magic.c @@ -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; } -- 2.40.0