summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2014-01-18 13:40:24 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2014-01-18 13:40:24 +0000
commit61af47be0f718ce40b4fc44dc30aaecbde262c53 (patch)
tree0f1da1740b5ddc2dd45536977f957f7582c6faf3 /file_io
parent175f21cbd7bcde6be9921972eba733e9fcc13112 (diff)
downloadlibapr-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')
-rw-r--r--file_io/netware/filestat.c24
-rw-r--r--file_io/netware/mktemp.c2
-rw-r--r--file_io/unix/copy.c4
-rw-r--r--file_io/unix/fileacc.c48
-rw-r--r--file_io/unix/filestat.c24
-rw-r--r--file_io/unix/mktemp.c2
-rw-r--r--file_io/unix/open.c2
-rw-r--r--file_io/unix/readwrite.c2
-rw-r--r--file_io/win32/filestat.c18
9 files changed, 63 insertions, 63 deletions
diff --git a/file_io/netware/filestat.c b/file_io/netware/filestat.c
index 662795128..85d73c30d 100644
--- a/file_io/netware/filestat.c
+++ b/file_io/netware/filestat.c
@@ -160,16 +160,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;
}
}
@@ -178,15 +178,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/netware/mktemp.c b/file_io/netware/mktemp.c
index 4f78226e6..f37cab85b 100644
--- a/file_io/netware/mktemp.c
+++ b/file_io/netware/mktemp.c
@@ -40,7 +40,7 @@ APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_i
*/
close(fd);
if ((rv = apr_file_open(fp, template, flags|APR_FOPEN_NOCLEANUP,
- APR_UREAD | APR_UWRITE, p)) == APR_SUCCESS) {
+ APR_FPROT_UREAD | APR_FPROT_UWRITE, p)) == APR_SUCCESS) {
if (!(flags & APR_FOPEN_NOCLEANUP)) {
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);
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c
index 79193bdcc..20397d22a 100644
--- a/file_io/win32/filestat.c
+++ b/file_io/win32/filestat.c
@@ -80,11 +80,11 @@ static apr_fileperms_t convert_prot(ACCESS_MASK acc, prot_scope_e scope)
*/
apr_fileperms_t prot = 0;
if (acc & FILE_EXECUTE)
- prot |= APR_WEXECUTE;
+ prot |= APR_FPROT_WEXECUTE;
if (acc & FILE_WRITE_DATA)
- prot |= APR_WWRITE;
+ prot |= APR_FPROT_WWRITE;
if (acc & FILE_READ_DATA)
- prot |= APR_WREAD;
+ prot |= APR_FPROT_WREAD;
return (prot << scope);
}
@@ -157,7 +157,7 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0)
| ((wanted & (APR_FINFO_PROT | APR_FINFO_OWNER))
? APR_READCONTROL : 0),
- APR_OS_DEFAULT, pool)) == APR_SUCCESS) {
+ APR_FPROT_OS_DEFAULT, pool)) == APR_SUCCESS) {
rv = apr_file_info_get(finfo, wanted, thefile);
finfo->filehand = NULL;
apr_file_close(thefile);
@@ -169,7 +169,7 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
*/
if ((rv = apr_file_open(&thefile, fname, APR_OPENINFO
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0),
- APR_OS_DEFAULT, pool)) == APR_SUCCESS) {
+ APR_FPROT_OS_DEFAULT, pool)) == APR_SUCCESS) {
rv = apr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
| APR_FINFO_OWNER),
thefile);
@@ -197,10 +197,10 @@ static apr_status_t guess_protection_bits(apr_finfo_t *finfo,
* The same holds on NT if a file doesn't have a DACL (e.g., on FAT)
*/
if (finfo->protection & APR_FREADONLY) {
- finfo->protection |= APR_WREAD | APR_WEXECUTE;
+ finfo->protection |= APR_FPROT_WREAD | APR_FPROT_WEXECUTE;
}
else {
- finfo->protection |= APR_WREAD | APR_WEXECUTE | APR_WWRITE;
+ finfo->protection |= APR_FPROT_WREAD | APR_FPROT_WEXECUTE | APR_FPROT_WWRITE;
}
finfo->protection |= (finfo->protection << prot_scope_group)
| (finfo->protection << prot_scope_user);
@@ -590,7 +590,7 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
finfo->pool = pool;
finfo->filetype = 0;
finfo->mtime = apr_time_now();
- finfo->protection |= APR_WREAD | APR_WEXECUTE | APR_WWRITE;
+ finfo->protection |= APR_FPROT_WREAD | APR_FPROT_WEXECUTE | APR_FPROT_WWRITE;
finfo->protection |= (finfo->protection << prot_scope_group)
| (finfo->protection << prot_scope_user);
finfo->valid |= APR_FINFO_TYPE | APR_FINFO_PROT
@@ -782,7 +782,7 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
rv = apr_file_open(&thefile, fname,
APR_FOPEN_READ | APR_WRITEATTRS,
- APR_OS_DEFAULT, pool);
+ APR_FPROT_OS_DEFAULT, pool);
if (!rv)
{
FILETIME file_ctime;