diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2014-01-18 13:40:24 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2014-01-18 13:40:24 +0000 |
commit | 61af47be0f718ce40b4fc44dc30aaecbde262c53 (patch) | |
tree | 0f1da1740b5ddc2dd45536977f957f7582c6faf3 /file_io/unix | |
parent | 175f21cbd7bcde6be9921972eba733e9fcc13112 (diff) | |
download | libapr-61af47be0f718ce40b4fc44dc30aaecbde262c53.tar.gz |
stop using deprecated versions of APR_FOPEN_* and APR_FPROT_*
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1559343 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/unix')
-rw-r--r-- | file_io/unix/copy.c | 4 | ||||
-rw-r--r-- | file_io/unix/fileacc.c | 48 | ||||
-rw-r--r-- | file_io/unix/filestat.c | 24 | ||||
-rw-r--r-- | file_io/unix/mktemp.c | 2 | ||||
-rw-r--r-- | file_io/unix/open.c | 2 | ||||
-rw-r--r-- | file_io/unix/readwrite.c | 2 |
6 files changed, 41 insertions, 41 deletions
diff --git a/file_io/unix/copy.c b/file_io/unix/copy.c index df3a49c82..91e4f5508 100644 --- a/file_io/unix/copy.c +++ b/file_io/unix/copy.c @@ -29,12 +29,12 @@ static apr_status_t apr_file_transfer_contents(const char *from_path, apr_fileperms_t perms; /* Open source file. */ - status = apr_file_open(&s, from_path, APR_FOPEN_READ, APR_OS_DEFAULT, pool); + status = apr_file_open(&s, from_path, APR_FOPEN_READ, APR_FPROT_OS_DEFAULT, pool); if (status) return status; /* Maybe get its permissions. */ - if (to_perms == APR_FILE_SOURCE_PERMS) { + if (to_perms == APR_FPROT_FILE_SOURCE_PERMS) { status = apr_file_info_get(&finfo, APR_FINFO_PROT, s); if (status != APR_SUCCESS && status != APR_INCOMPLETE) { apr_file_close(s); /* toss any error */ diff --git a/file_io/unix/fileacc.c b/file_io/unix/fileacc.c index 437f3589f..d44e4e17b 100644 --- a/file_io/unix/fileacc.c +++ b/file_io/unix/fileacc.c @@ -36,33 +36,33 @@ mode_t apr_unix_perms2mode(apr_fileperms_t perms) { mode_t mode = 0; - if (perms & APR_USETID) + if (perms & APR_FPROT_USETID) mode |= S_ISUID; - if (perms & APR_UREAD) + if (perms & APR_FPROT_UREAD) mode |= S_IRUSR; - if (perms & APR_UWRITE) + if (perms & APR_FPROT_UWRITE) mode |= S_IWUSR; - if (perms & APR_UEXECUTE) + if (perms & APR_FPROT_UEXECUTE) mode |= S_IXUSR; - if (perms & APR_GSETID) + if (perms & APR_FPROT_GSETID) mode |= S_ISGID; - if (perms & APR_GREAD) + if (perms & APR_FPROT_GREAD) mode |= S_IRGRP; - if (perms & APR_GWRITE) + if (perms & APR_FPROT_GWRITE) mode |= S_IWGRP; - if (perms & APR_GEXECUTE) + if (perms & APR_FPROT_GEXECUTE) mode |= S_IXGRP; #ifdef S_ISVTX - if (perms & APR_WSTICKY) + if (perms & APR_FPROT_WSTICKY) mode |= S_ISVTX; #endif - if (perms & APR_WREAD) + if (perms & APR_FPROT_WREAD) mode |= S_IROTH; - if (perms & APR_WWRITE) + if (perms & APR_FPROT_WWRITE) mode |= S_IWOTH; - if (perms & APR_WEXECUTE) + if (perms & APR_FPROT_WEXECUTE) mode |= S_IXOTH; return mode; @@ -73,33 +73,33 @@ apr_fileperms_t apr_unix_mode2perms(mode_t mode) apr_fileperms_t perms = 0; if (mode & S_ISUID) - perms |= APR_USETID; + perms |= APR_FPROT_USETID; if (mode & S_IRUSR) - perms |= APR_UREAD; + perms |= APR_FPROT_UREAD; if (mode & S_IWUSR) - perms |= APR_UWRITE; + perms |= APR_FPROT_UWRITE; if (mode & S_IXUSR) - perms |= APR_UEXECUTE; + perms |= APR_FPROT_UEXECUTE; if (mode & S_ISGID) - perms |= APR_GSETID; + perms |= APR_FPROT_GSETID; if (mode & S_IRGRP) - perms |= APR_GREAD; + perms |= APR_FPROT_GREAD; if (mode & S_IWGRP) - perms |= APR_GWRITE; + perms |= APR_FPROT_GWRITE; if (mode & S_IXGRP) - perms |= APR_GEXECUTE; + perms |= APR_FPROT_GEXECUTE; #ifdef S_ISVTX if (mode & S_ISVTX) - perms |= APR_WSTICKY; + perms |= APR_FPROT_WSTICKY; #endif if (mode & S_IROTH) - perms |= APR_WREAD; + perms |= APR_FPROT_WREAD; if (mode & S_IWOTH) - perms |= APR_WWRITE; + perms |= APR_FPROT_WWRITE; if (mode & S_IXOTH) - perms |= APR_WEXECUTE; + perms |= APR_FPROT_WEXECUTE; return perms; } diff --git a/file_io/unix/filestat.c b/file_io/unix/filestat.c index 220efd086..65918c212 100644 --- a/file_io/unix/filestat.c +++ b/file_io/unix/filestat.c @@ -203,16 +203,16 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname, { if (attributes & APR_FILE_ATTR_READONLY) { - finfo.protection &= ~APR_UWRITE; - finfo.protection &= ~APR_GWRITE; - finfo.protection &= ~APR_WWRITE; + finfo.protection &= ~APR_FPROT_UWRITE; + finfo.protection &= ~APR_FPROT_GWRITE; + finfo.protection &= ~APR_FPROT_WWRITE; } else { /* ### umask this! */ - finfo.protection |= APR_UWRITE; - finfo.protection |= APR_GWRITE; - finfo.protection |= APR_WWRITE; + finfo.protection |= APR_FPROT_UWRITE; + finfo.protection |= APR_FPROT_GWRITE; + finfo.protection |= APR_FPROT_WWRITE; } } @@ -221,15 +221,15 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname, if (attributes & APR_FILE_ATTR_EXECUTABLE) { /* ### umask this! */ - finfo.protection |= APR_UEXECUTE; - finfo.protection |= APR_GEXECUTE; - finfo.protection |= APR_WEXECUTE; + finfo.protection |= APR_FPROT_UEXECUTE; + finfo.protection |= APR_FPROT_GEXECUTE; + finfo.protection |= APR_FPROT_WEXECUTE; } else { - finfo.protection &= ~APR_UEXECUTE; - finfo.protection &= ~APR_GEXECUTE; - finfo.protection &= ~APR_WEXECUTE; + finfo.protection &= ~APR_FPROT_UEXECUTE; + finfo.protection &= ~APR_FPROT_GEXECUTE; + finfo.protection &= ~APR_FPROT_WEXECUTE; } } diff --git a/file_io/unix/mktemp.c b/file_io/unix/mktemp.c index 28aaf90e2..89d9842d4 100644 --- a/file_io/unix/mktemp.c +++ b/file_io/unix/mktemp.c @@ -141,7 +141,7 @@ static int gettemp(char *path, apr_file_t **doopen, apr_int32_t flags, apr_pool_ for (;;) { if ((rv = apr_file_open(doopen, path, flags, - APR_UREAD | APR_UWRITE, p)) == APR_SUCCESS) + APR_FPROT_UREAD | APR_FPROT_UWRITE, p)) == APR_SUCCESS) return APR_SUCCESS; if (!APR_STATUS_IS_EEXIST(rv)) return rv; diff --git a/file_io/unix/open.c b/file_io/unix/open.c index 1e7b51183..770d438ae 100644 --- a/file_io/unix/open.c +++ b/file_io/unix/open.c @@ -170,7 +170,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, } #endif - if (perm == APR_OS_DEFAULT) { + if (perm == APR_FPROT_OS_DEFAULT) { fd = open(fname, oflags, 0666); } else { diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c index 98de9e0e1..dd424cd64 100644 --- a/file_io/unix/readwrite.c +++ b/file_io/unix/readwrite.c @@ -170,7 +170,7 @@ static apr_status_t do_rotating_check(apr_file_t *thefile, apr_time_t now) close(thefile->filedes); thefile->filedes = -1; - if (thefile->rotating->perm == APR_OS_DEFAULT) { + if (thefile->rotating->perm == APR_FPROT_OS_DEFAULT) { thefile->filedes = open(thefile->fname, thefile->rotating->oflags, 0666); |