diff options
Diffstat (limited to 'file_io/netware')
-rw-r--r-- | file_io/netware/filestat.c | 42 | ||||
-rw-r--r-- | file_io/netware/filesys.c | 2 | ||||
-rw-r--r-- | file_io/netware/flock.c | 4 | ||||
-rw-r--r-- | file_io/netware/pipe.c | 14 |
4 files changed, 31 insertions, 31 deletions
diff --git a/file_io/netware/filestat.c b/file_io/netware/filestat.c index 85d73c30d..a61d26d0e 100644 --- a/file_io/netware/filestat.c +++ b/file_io/netware/filestat.c @@ -55,8 +55,8 @@ 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 +{ + 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); @@ -104,7 +104,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) { @@ -128,7 +128,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); @@ -232,14 +232,14 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm and return */ if (!gPool) { char poolname[50]; - + if (apr_pool_create(&gPool, NULL) != APR_SUCCESS) { return getstat(ctx, path, buf, requestmap); } - + setGlobalPool(gPool); apr_pool_tag(gPool, apr_pstrdup(gPool, "cstat_mem_pool")); - + statCache = apr_hash_make(gPool); apr_pool_userdata_set ((void*)statCache, "STAT_CACHE", stat_cache_cleanup, gPool); @@ -254,7 +254,7 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm if (!gPool || !statCache || !rwlock) { return getstat(ctx, path, buf, requestmap); } - + for (x = 0,tr = path;*tr != '\0';tr++,x++) { if (*tr == '\\' || *tr == '/') { ptr = tr; @@ -265,7 +265,7 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm len = x; } } - + if (ptr) { ppath = apr_pstrndup (p, path, len); strlwr(ppath); @@ -283,7 +283,7 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm pinfo = apr_pstrdup (p, ptr); } } - + /* If we have a statCache then try to pull the information from the cache. Otherwise just stat the file and return.*/ if (statCache) { @@ -310,8 +310,8 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm } #endif -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; @@ -347,17 +347,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 @@ -388,12 +388,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; } @@ -401,10 +401,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; } diff --git a/file_io/netware/filesys.c b/file_io/netware/filesys.c index 05c44cecd..dac50745c 100644 --- a/file_io/netware/filesys.c +++ b/file_io/netware/filesys.c @@ -21,7 +21,7 @@ apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p) { /* See the Windows code to figure out what to do here. - It probably checks to make sure that the root exists + It probably checks to make sure that the root exists and case it correctly according to the file system. */ *rootpath = apr_pstrdup(p, root); diff --git a/file_io/netware/flock.c b/file_io/netware/flock.c index c083a0ed4..192e3307c 100644 --- a/file_io/netware/flock.c +++ b/file_io/netware/flock.c @@ -26,7 +26,7 @@ apr_status_t apr_file_lock(apr_file_t *thefile, int type) if(NXFileRangeLock(thefile->filedes,fc, 0, 0) == -1) return errno; - + return APR_SUCCESS; } @@ -34,6 +34,6 @@ apr_status_t apr_file_unlock(apr_file_t *thefile) { if(NXFileRangeUnlock(thefile->filedes,NX_RANGE_LOCK_CANCEL,0 , 0) == -1) return errno; - + return APR_SUCCESS; } diff --git a/file_io/netware/pipe.c b/file_io/netware/pipe.c index 1a3a5e879..eb9bfe163 100644 --- a/file_io/netware/pipe.c +++ b/file_io/netware/pipe.c @@ -102,7 +102,7 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file, apr_pool_t *pool) { int *dafile = thefile; - + (*file) = apr_pcalloc(pool, sizeof(apr_file_t)); (*file)->pool = pool; (*file)->eof_hit = 0; @@ -156,7 +156,7 @@ static apr_status_t file_pipe_create(apr_file_t **in, (*out)->flags = APR_INHERIT; (*in)->is_pipe = (*out)->is_pipe = 1; - (*out)->fname = + (*out)->fname = (*in)->fname = NULL; (*in)->buffered = (*out)->buffered = 0; @@ -200,8 +200,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, return file_pipe_create(in, out, APR_FULL_BLOCK, pool, pool); } -APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in, - apr_file_t **out, +APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in, + apr_file_t **out, apr_int32_t blocking, apr_pool_t *pool) { @@ -217,11 +217,11 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in, return file_pipe_create(in, out, blocking, pool_in, pool_out); } -APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, +APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *pool) { return APR_ENOTIMPL; -} +} + - |