You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Victor J. Orlikowski" <v....@gte.net> on 2000/08/24 20:38:25 UTC

[PATCH] Fixes to setrlimit patch

The #if's created by the setrlimit patch were
syntactically incorrect, according to xlC . Here's a quick
fix.

Index: src/lib/apr/threadproc/unix/proc.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/threadproc/unix/proc.c,v
retrieving revision 1.37
diff -u -r1.37 proc.c
--- proc.c	2000/08/23 23:28:49	1.37
+++ proc.c	2000/08/24 18:35:48
@@ -227,7 +227,7 @@
 
 static apr_status_t limit_proc(apr_procattr_t *attr)
 {
-#if APR_HAVE_STRUCT_RLIMIT && APR_HAVE_SETRLIMIT
+#if defined(APR_HAVE_STRUCT_RLIMIT) && defined(APR_HAVE_SETRLIMIT)
 #ifdef RLIMIT_CPU
     if (attr->limit_cpu != NULL) {
         if ((setrlimit(RLIMIT_CPU, attr->limit_cpu)) != 0) {
Index: src/os/unix/unixd.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/os/unix/unixd.c,v
retrieving revision 1.24
diff -u -r1.24 unixd.c
--- unixd.c	2000/08/23 23:28:54	1.24
+++ unixd.c	2000/08/24 18:35:51
@@ -342,7 +342,7 @@
 API_EXPORT(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, 
                            const char *arg, const char * arg2, int type)
 {
-#if (defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS)) && APR_HAVE_STRUCT_RLIMIT && APR_HAVE_GETRLIMIT
+#if (defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS)) && defined(APR_HAVE_STRUCT_RLIMIT) && defined(APR_HAVE_GETRLIMIT)
     char *str;
     struct rlimit *limit;
     /* If your platform doesn't define rlim_t then typedef it in ap_config.h */

-- 
Victor J. Orlikowski
======================
v.j.orlikowski@gte.net
vjo@raleigh.ibm.com
vjo@us.ibm.com