diff options
Diffstat (limited to 'file_io/unix/filestat.c')
-rw-r--r-- | file_io/unix/filestat.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/file_io/unix/filestat.c b/file_io/unix/filestat.c index 65918c212..4804aab71 100644 --- a/file_io/unix/filestat.c +++ b/file_io/unix/filestat.c @@ -69,7 +69,7 @@ static apr_filetype_e filetype_from_mode(mode_t mode) static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info, apr_int32_t wanted) -{ +{ finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK | APR_FINFO_OWNER | APR_FINFO_PROT; finfo->protection = apr_unix_mode2perms(info->st_mode); @@ -148,7 +148,7 @@ apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted, } } -APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, +APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted, apr_file_t *thefile) { @@ -171,7 +171,7 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, } } -APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname, +APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname, apr_fileperms_t perms) { mode_t mode = apr_unix_perms2mode(perms); @@ -252,12 +252,12 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname, #ifdef HAVE_UTIMES { struct timeval tvp[2]; - + tvp[0].tv_sec = apr_time_sec(finfo.atime); tvp[0].tv_usec = apr_time_usec(finfo.atime); tvp[1].tv_sec = apr_time_sec(mtime); tvp[1].tv_usec = apr_time_usec(mtime); - + if (utimes(fname, tvp) == -1) { return errno; } @@ -265,10 +265,10 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname, #elif defined(HAVE_UTIME) { struct utimbuf buf; - + buf.actime = (time_t) (finfo.atime / APR_USEC_PER_SEC); buf.modtime = (time_t) (mtime / APR_USEC_PER_SEC); - + if (utime(fname, &buf) == -1) { return errno; } @@ -281,8 +281,8 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname, } -APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, - const char *fname, +APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, + const char *fname, apr_int32_t wanted, apr_pool_t *pool) { struct_stat info; @@ -310,17 +310,17 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, * include files, APR cannot report a good reason why the stat() * of the file failed; there are cases where it can fail even though * the file exists. This opens holes in Apache, for example, because - * it becomes possible for someone to get a directory listing of a - * directory even though there is an index (eg. index.html) file in - * it. If you do not have a problem with this, delete the above + * it becomes possible for someone to get a directory listing of a + * directory even though there is an index (eg. index.html) file in + * it. If you do not have a problem with this, delete the above * #error lines and start the compile again. If you need to do this, * please submit a bug report to http://www.apache.org/bug_report.html - * letting us know that you needed to do this. Please be sure to + * letting us know that you needed to do this. Please be sure to * include the operating system you are using. */ /* WARNING: All errors will be handled as not found */ -#if !defined(ENOENT) +#if !defined(ENOENT) return APR_ENOENT; #else /* WARNING: All errors but not found will be handled as not directory |