summaryrefslogtreecommitdiff
path: root/shmem
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 /shmem
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 'shmem')
-rw-r--r--shmem/unix/shm.c24
-rw-r--r--shmem/win32/shm.c6
2 files changed, 15 insertions, 15 deletions
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c
index 27a29e67c..d93a98bea 100644
--- a/shmem/unix/shm.c
+++ b/shmem/unix/shm.c
@@ -122,8 +122,8 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
new_m->filename = NULL;
#if APR_USE_SHMEM_MMAP_ZERO
- status = apr_file_open(&file, "/dev/zero", APR_READ | APR_WRITE,
- APR_OS_DEFAULT, pool);
+ status = apr_file_open(&file, "/dev/zero", APR_FOPEN_READ | APR_FOPEN_WRITE,
+ APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
return status;
}
@@ -231,10 +231,10 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
status = APR_SUCCESS;
#if APR_USE_SHMEM_MMAP_TMP
- /* FIXME: Is APR_OS_DEFAULT sufficient? */
+ /* FIXME: Is APR_FPROT_OS_DEFAULT sufficient? */
status = apr_file_open(&file, filename,
- APR_READ | APR_WRITE | APR_CREATE | APR_EXCL,
- APR_OS_DEFAULT, pool);
+ APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
+ APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
return status;
}
@@ -269,7 +269,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
}
status = apr_os_file_put(&file, &tmpfd,
- APR_READ | APR_WRITE | APR_CREATE | APR_EXCL,
+ APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
pool);
if (status != APR_SUCCESS) {
return status;
@@ -304,10 +304,10 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
#elif APR_USE_SHMEM_SHMGET
new_m->realsize = reqsize;
- /* FIXME: APR_OS_DEFAULT is too permissive, switch to 600 I think. */
+ /* FIXME: APR_FPROT_OS_DEFAULT is too permissive, switch to 600 I think. */
status = apr_file_open(&file, filename,
APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
- APR_OS_DEFAULT, pool);
+ APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
return status;
}
@@ -399,7 +399,7 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
#elif APR_USE_SHMEM_SHMGET
/* Presume that the file already exists; just open for writing */
status = apr_file_open(&file, filename, APR_FOPEN_WRITE,
- APR_OS_DEFAULT, pool);
+ APR_FPROT_OS_DEFAULT, pool);
if (status) {
return status;
}
@@ -491,8 +491,8 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
new_m->filename = apr_pstrdup(pool, filename);
status = apr_file_open(&file, filename,
- APR_READ | APR_WRITE,
- APR_OS_DEFAULT, pool);
+ APR_FOPEN_READ | APR_FOPEN_WRITE,
+ APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
return status;
}
@@ -544,7 +544,7 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
new_m = apr_palloc(pool, sizeof(apr_shm_t));
status = apr_file_open(&file, filename,
- APR_FOPEN_READ, APR_OS_DEFAULT, pool);
+ APR_FOPEN_READ, APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
return status;
}
diff --git a/shmem/win32/shm.c b/shmem/win32/shm.c
index af0115e44..28ce9406b 100644
--- a/shmem/win32/shm.c
+++ b/shmem/win32/shm.c
@@ -158,13 +158,13 @@ APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
int global;
/* Do file backed, which is not an inherited handle
- * While we could open APR_EXCL, it doesn't seem that Unix
+ * While we could open APR_FOPEN_EXCL, it doesn't seem that Unix
* ever did. Ignore that error here, but fail later when
* we discover we aren't the creator of the file map object.
*/
rv = apr_file_open(&f, file,
- APR_READ | APR_WRITE | APR_BINARY | APR_CREATE,
- APR_UREAD | APR_UWRITE, pool);
+ APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_BINARY | APR_FOPEN_CREATE,
+ APR_FPROT_UREAD | APR_FPROT_UWRITE, pool);
if ((rv != APR_SUCCESS)
|| ((rv = apr_os_file_get(&hFile, f)) != APR_SUCCESS)) {
return rv;