apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1080074 - in /apr/apr/branches: 0.9.x/threadproc/netware/ 0.9.x/threadproc/unix/ 1.3.x/threadproc/netware/ 1.3.x/threadproc/unix/ 1.4.x/threadproc/netware/ 1.4.x/threadproc/unix/ 1.5.x/threadproc/netware/ 1.5.x/threadproc/unix/
Date Thu, 10 Mar 2011 00:48:05 GMT
Author: fuankg
Date: Thu Mar 10 00:48:05 2011
New Revision: 1080074

URL: http://svn.apache.org/viewvc?rev=1080074&view=rev
Log:
Fixed compilation when APR_HAVE_STRUCT_RLIMIT=0.

Modified:
    apr/apr/branches/0.9.x/threadproc/netware/proc.c
    apr/apr/branches/0.9.x/threadproc/unix/proc.c
    apr/apr/branches/1.3.x/threadproc/netware/proc.c
    apr/apr/branches/1.3.x/threadproc/unix/proc.c
    apr/apr/branches/1.4.x/threadproc/netware/proc.c
    apr/apr/branches/1.4.x/threadproc/unix/proc.c
    apr/apr/branches/1.5.x/threadproc/netware/proc.c
    apr/apr/branches/1.5.x/threadproc/unix/proc.c

Modified: apr/apr/branches/0.9.x/threadproc/netware/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/threadproc/netware/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/threadproc/netware/proc.c (original)
+++ apr/apr/branches/0.9.x/threadproc/netware/proc.c Thu Mar 10 00:48:05 2011
@@ -407,8 +407,10 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
-APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,

-                          struct rlimit *limit)
+#if APR_HAVE_STRUCT_RLIMIT
+APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
+                                                 apr_int32_t what, 
+                                                 struct rlimit *limit)
 {
     switch(what) {
         case APR_LIMIT_CPU:
@@ -418,13 +420,15 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_NPROC:
 #ifdef RLIMIT_NPROC
             attr->limit_nproc = limit;
@@ -432,7 +436,17 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
+        case APR_LIMIT_NOFILE:
+#ifdef RLIMIT_NOFILE
+            attr->limit_nofile = limit;
+            break;
+#else
+            return APR_ENOTIMPL;
+#endif
+
     }
     return APR_SUCCESS;
 }  
+#endif /* APR_HAVE_STRUCT_RLIMIT */
 

Modified: apr/apr/branches/0.9.x/threadproc/unix/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/threadproc/unix/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/threadproc/unix/proc.c (original)
+++ apr/apr/branches/0.9.x/threadproc/unix/proc.c Thu Mar 10 00:48:05 2011
@@ -581,6 +581,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
+#if APR_HAVE_STRUCT_RLIMIT
 APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
                                                  apr_int32_t what,
                                                  struct rlimit *limit)
@@ -595,7 +596,7 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #endif
 
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
@@ -622,3 +623,5 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 
     return APR_SUCCESS;
 }
+#endif /* APR_HAVE_STRUCT_RLIMIT */
+

Modified: apr/apr/branches/1.3.x/threadproc/netware/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/threadproc/netware/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/threadproc/netware/proc.c (original)
+++ apr/apr/branches/1.3.x/threadproc/netware/proc.c Thu Mar 10 00:48:05 2011
@@ -448,8 +448,10 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
-APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,

-                          struct rlimit *limit)
+#if APR_HAVE_STRUCT_RLIMIT
+APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
+                                                 apr_int32_t what, 
+                                                 struct rlimit *limit)
 {
     switch(what) {
         case APR_LIMIT_CPU:
@@ -459,13 +461,15 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_NPROC:
 #ifdef RLIMIT_NPROC
             attr->limit_nproc = limit;
@@ -473,9 +477,19 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
+        case APR_LIMIT_NOFILE:
+#ifdef RLIMIT_NOFILE
+            attr->limit_nofile = limit;
+            break;
+#else
+            return APR_ENOTIMPL;
+#endif
+
     }
     return APR_SUCCESS;
 }  
+#endif /* APR_HAVE_STRUCT_RLIMIT */
 
 APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr, 
                                                 const char *username,

Modified: apr/apr/branches/1.3.x/threadproc/unix/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/threadproc/unix/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/threadproc/unix/proc.c (original)
+++ apr/apr/branches/1.3.x/threadproc/unix/proc.c Thu Mar 10 00:48:05 2011
@@ -667,6 +667,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
+#if APR_HAVE_STRUCT_RLIMIT
 APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
                                                  apr_int32_t what,
                                                  struct rlimit *limit)
@@ -681,7 +682,7 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #endif
 
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
@@ -708,3 +709,5 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 
     return APR_SUCCESS;
 }
+#endif /* APR_HAVE_STRUCT_RLIMIT */
+

Modified: apr/apr/branches/1.4.x/threadproc/netware/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/threadproc/netware/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/threadproc/netware/proc.c (original)
+++ apr/apr/branches/1.4.x/threadproc/netware/proc.c Thu Mar 10 00:48:05 2011
@@ -448,8 +448,10 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
-APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,

-                          struct rlimit *limit)
+#if APR_HAVE_STRUCT_RLIMIT
+APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
+                                                 apr_int32_t what, 
+                                                 struct rlimit *limit)
 {
     switch(what) {
         case APR_LIMIT_CPU:
@@ -459,13 +461,15 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_NPROC:
 #ifdef RLIMIT_NPROC
             attr->limit_nproc = limit;
@@ -473,9 +477,19 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
+        case APR_LIMIT_NOFILE:
+#ifdef RLIMIT_NOFILE
+            attr->limit_nofile = limit;
+            break;
+#else
+            return APR_ENOTIMPL;
+#endif
+
     }
     return APR_SUCCESS;
 }  
+#endif /* APR_HAVE_STRUCT_RLIMIT */
 
 APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr, 
                                                 const char *username,

Modified: apr/apr/branches/1.4.x/threadproc/unix/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/threadproc/unix/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/threadproc/unix/proc.c (original)
+++ apr/apr/branches/1.4.x/threadproc/unix/proc.c Thu Mar 10 00:48:05 2011
@@ -667,6 +667,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
+#if APR_HAVE_STRUCT_RLIMIT
 APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
                                                  apr_int32_t what,
                                                  struct rlimit *limit)
@@ -681,7 +682,7 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #endif
 
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
@@ -708,3 +709,5 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 
     return APR_SUCCESS;
 }
+#endif /* APR_HAVE_STRUCT_RLIMIT */
+

Modified: apr/apr/branches/1.5.x/threadproc/netware/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/threadproc/netware/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/threadproc/netware/proc.c (original)
+++ apr/apr/branches/1.5.x/threadproc/netware/proc.c Thu Mar 10 00:48:05 2011
@@ -448,8 +448,10 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
-APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,

-                          struct rlimit *limit)
+#if APR_HAVE_STRUCT_RLIMIT
+APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
+                                                 apr_int32_t what, 
+                                                 struct rlimit *limit)
 {
     switch(what) {
         case APR_LIMIT_CPU:
@@ -459,13 +461,15 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
             return APR_ENOTIMPL;
 #endif
+
         case APR_LIMIT_NPROC:
 #ifdef RLIMIT_NPROC
             attr->limit_nproc = limit;
@@ -473,9 +477,19 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #else
             return APR_ENOTIMPL;
 #endif
+
+        case APR_LIMIT_NOFILE:
+#ifdef RLIMIT_NOFILE
+            attr->limit_nofile = limit;
+            break;
+#else
+            return APR_ENOTIMPL;
+#endif
+
     }
     return APR_SUCCESS;
 }  
+#endif /* APR_HAVE_STRUCT_RLIMIT */
 
 APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr, 
                                                 const char *username,

Modified: apr/apr/branches/1.5.x/threadproc/unix/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/threadproc/unix/proc.c?rev=1080074&r1=1080073&r2=1080074&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/threadproc/unix/proc.c (original)
+++ apr/apr/branches/1.5.x/threadproc/unix/proc.c Thu Mar 10 00:48:05 2011
@@ -667,6 +667,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
     return errno;
 }
 
+#if APR_HAVE_STRUCT_RLIMIT
 APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
                                                  apr_int32_t what,
                                                  struct rlimit *limit)
@@ -681,7 +682,7 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 #endif
 
         case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
             attr->limit_mem = limit;
             break;
 #else
@@ -708,3 +709,5 @@ APR_DECLARE(apr_status_t) apr_procattr_l
 
     return APR_SUCCESS;
 }
+#endif /* APR_HAVE_STRUCT_RLIMIT */
+



Mime
View raw message