apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r920004 - in /apr/apr/branches/1.4.x: ./ include/arch/unix/apr_arch_inherit.h locks/unix/proc_mutex.c shmem/unix/shm.c
Date Sun, 07 Mar 2010 14:47:11 GMT
Author: minfrin
Date: Sun Mar  7 14:47:11 2010
New Revision: 920004

URL: http://svn.apache.org/viewvc?rev=920004&view=rev
Log:
Backport 917837:
Use the APR_FOPEN_* constants instead of the deprecated APR_* constants
within code outside the file_io code.

Modified:
    apr/apr/branches/1.4.x/   (props changed)
    apr/apr/branches/1.4.x/include/arch/unix/apr_arch_inherit.h
    apr/apr/branches/1.4.x/locks/unix/proc_mutex.c
    apr/apr/branches/1.4.x/shmem/unix/shm.c

Propchange: apr/apr/branches/1.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Mar  7 14:47:11 2010
@@ -1 +1 @@
-/apr/apr/trunk:733052,747990,748361,748371,748565,748888,748902,748988,749810,760443,782838,783398,783958,784633,784773,788588,793192,794118,794485,795267,799497,800627,809745,809854,810472,811455,813063,821306,829490,831641,835607,905040,908427,910419
+/apr/apr/trunk:733052,747990,748361,748371,748565,748888,748902,748988,749810,760443,782838,783398,783958,784633,784773,788588,793192,794118,794485,795267,799497,800627,809745,809854,810472,811455,813063,821306,829490,831641,835607,905040,908427,910419,917837

Modified: apr/apr/branches/1.4.x/include/arch/unix/apr_arch_inherit.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/arch/unix/apr_arch_inherit.h?rev=920004&r1=920003&r2=920004&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/arch/unix/apr_arch_inherit.h (original)
+++ apr/apr/branches/1.4.x/include/arch/unix/apr_arch_inherit.h Sun Mar  7 14:47:11 2010
@@ -24,7 +24,7 @@
 #define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \
 apr_status_t apr_##name##_inherit_set(apr_##name##_t *the##name)    \
 {                                                                   \
-    if (the##name->flag & APR_FILE_NOCLEANUP)                       \
+    if (the##name->flag & APR_FOPEN_NOCLEANUP)                      \
         return APR_EINVAL;                                          \
     if (!(the##name->flag & APR_INHERIT)) {                         \
         int flags = fcntl(the##name->name##des, F_GETFD);           \
@@ -44,7 +44,7 @@
 #define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \
 apr_status_t apr_##name##_inherit_unset(apr_##name##_t *the##name)  \
 {                                                                   \
-    if (the##name->flag & APR_FILE_NOCLEANUP)                       \
+    if (the##name->flag & APR_FOPEN_NOCLEANUP)                      \
         return APR_EINVAL;                                          \
     if (the##name->flag & APR_INHERIT) {                            \
         int flags;                                                  \

Modified: apr/apr/branches/1.4.x/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/locks/unix/proc_mutex.c?rev=920004&r1=920003&r2=920004&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/locks/unix/proc_mutex.c (original)
+++ apr/apr/branches/1.4.x/locks/unix/proc_mutex.c Sun Mar  7 14:47:11 2010
@@ -547,14 +547,14 @@
     if (fname) {
         new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
         rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
-                           APR_CREATE | APR_WRITE | APR_EXCL, 
+                           APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
                            APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD,
                            new_mutex->pool);
     }
     else {
         new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");
         rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,
-                             APR_CREATE | APR_WRITE | APR_EXCL,
+                             APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
                              new_mutex->pool);
     }
  
@@ -667,14 +667,14 @@
     if (fname) {
         new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
         rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
-                           APR_CREATE | APR_WRITE | APR_EXCL, 
+                           APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
                            APR_UREAD | APR_UWRITE,
                            new_mutex->pool);
     }
     else {
         new_mutex->fname = apr_pstrdup(new_mutex->pool, "/tmp/aprXXXXXX");
         rv = apr_file_mktemp(&new_mutex->interproc, new_mutex->fname,
-                             APR_CREATE | APR_WRITE | APR_EXCL,
+                             APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
                              new_mutex->pool);
     }
  
@@ -750,7 +750,7 @@
     }
     new_mutex->fname = apr_pstrdup(pool, fname);
     rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
-                       APR_WRITE, 0, new_mutex->pool);
+                       APR_FOPEN_WRITE, 0, new_mutex->pool);
     if (rv != APR_SUCCESS) {
         return rv;
     }

Modified: apr/apr/branches/1.4.x/shmem/unix/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/shmem/unix/shm.c?rev=920004&r1=920003&r2=920004&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/shmem/unix/shm.c (original)
+++ apr/apr/branches/1.4.x/shmem/unix/shm.c Sun Mar  7 14:47:11 2010
@@ -304,7 +304,7 @@
 
         /* FIXME: APR_OS_DEFAULT is too permissive, switch to 600 I think. */
         status = apr_file_open(&file, filename, 
-                               APR_WRITE | APR_CREATE | APR_EXCL,
+                               APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
                                APR_OS_DEFAULT, pool);
         if (status != APR_SUCCESS) {
             return status;
@@ -378,7 +378,7 @@
     return APR_SUCCESS;
 #elif APR_USE_SHMEM_SHMGET
     /* Presume that the file already exists; just open for writing */    
-    status = apr_file_open(&file, filename, APR_WRITE,
+    status = apr_file_open(&file, filename, APR_FOPEN_WRITE,
                            APR_OS_DEFAULT, pool);
     if (status) {
         return status;
@@ -522,7 +522,7 @@
         new_m = apr_palloc(pool, sizeof(apr_shm_t));
 
         status = apr_file_open(&file, filename, 
-                               APR_READ, APR_OS_DEFAULT, pool);
+                               APR_FOPEN_READ, APR_OS_DEFAULT, pool);
         if (status != APR_SUCCESS) {
             return status;
         }



Mime
View raw message