httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Getting rid of HARD_LIMIT_FILE
Date Sun, 06 Aug 2000 03:20:26 GMT

I was just looking through mpm_common.h, and I found the define of
APACHE_MPM_DIR.  The purpose of this macro is so that the mpm can
easily print the path to the mpm_default.h file.  Each MPM should have
it's own mpm_default.h, but there is nothing saying that it must be called
mpm_default.h.

The patch in this e-mail removes this macro and asks the MPM to actually
print out the correct path and file.  I am trying to make it as easy as
possible for MPM authors.  We never document the APACHE_MPM_MACRO, and it
can get confusing, because any platform that uses autoconf can ignore this
macro, but non-autoconf platforms need to define it.

I am posting the patch because somebody may have a good reason to
do it the old way.  Anyway, here's the patch:

Ryan


Index: configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/configure.in,v
retrieving revision 1.73
diff -u -d -b -w -u -r1.73 configure.in
--- configure.in	2000/07/23 12:32:17	1.73
+++ configure.in	2000/08/06 03:05:54
@@ -213,7 +213,6 @@
 echo "#define HTTPD_ROOT \"$prefix\"" >> ${path_h}.new
 echo "#define SUEXEC_BIN \"$bindir/suexec\"" >> ${path_h}.new
 echo "#define SERVER_CONFIG_FILE \"conf/$progname.conf\"" >> ${path_h}.new
-echo "#define APACHE_MPM_DIR \"$mpmdir\"" >> ${path_h}.new
 
 cmp ${path_h}.new ${path_h} >/dev/null 2>&1
 if test $? -ne 0 ; then
Index: include/mpm_common.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/mpm_common.h,v
retrieving revision 1.8
diff -u -d -b -w -u -r1.8 mpm_common.h
--- include/mpm_common.h	2000/08/06 02:21:06	1.8
+++ include/mpm_common.h	2000/08/06 03:05:55
@@ -128,9 +128,6 @@
 #define ap_sock_disable_nagle(s)        /* NOOP */
 #endif
 
-
-#define AP_MPM_HARD_LIMITS_FILE "src/" APACHE_MPM_DIR "/mpm_default.h"
-
 #ifdef __cplusplus
 }
 #endif
Index: main/mpm_common.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/mpm_common.c,v
retrieving revision 1.31
diff -u -d -b -w -u -r1.31 mpm_common.c
Index: modules/mpm/beos/beos.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/beos/beos.c,v
retrieving revision 1.18
diff -u -d -b -w -u -r1.18 beos.c
--- modules/mpm/beos/beos.c	2000/08/02 14:44:37	1.18
+++ modules/mpm/beos/beos.c	2000/08/06 03:06:03
@@ -999,7 +999,8 @@
                      " lowering ThreadsPerChild to %d. To increase, please"
                      "see the", HARD_THREAD_LIMIT);
         ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                     " HARD_THREAD_LIMIT define in %s", AP_MPM_HARD_LIMITS_FILE);
+                     " HARD_THREAD_LIMIT define in "
+                     "src/modules/mpm/beos/mpm_default.h");
     }
     else if (ap_threads_per_child < 1) {
 	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
Index: modules/mpm/dexter/dexter.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
retrieving revision 1.122
diff -u -d -b -w -u -r1.122 dexter.c
--- modules/mpm/dexter/dexter.c	2000/08/02 14:44:40	1.122
+++ modules/mpm/dexter/dexter.c	2000/08/06 03:06:03
@@ -1231,8 +1231,8 @@
                     " lowering NumServers to %d.  To increase, please "
                     "see the", HARD_SERVER_LIMIT);
        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                    " HARD_SERVER_LIMIT define in %s.",
-                    AP_MPM_HARD_LIMITS_FILE);
+                    " HARD_SERVER_LIMIT define in "
+                    "src/modules/mpm/dexter/mpm_defaults.h.");
        num_daemons = HARD_SERVER_LIMIT;
     } 
     else if (num_daemons < 1) {
@@ -1260,8 +1260,8 @@
                      " lowering StartThreads to %d. To increase, please"
                      " see the", HARD_THREAD_LIMIT);
         ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                     " HARD_THREAD_LIMIT define in %s.",
-                     AP_MPM_HARD_LIMITS_FILE);
+                     " HARD_THREAD_LIMIT define in "
+                     src/modules/mpm/dexter/mpm_default.h.");
     }
     else if (threads_to_start < 1) {
 	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
Index: modules/mpm/mpmt_beos/mpmt_beos.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
retrieving revision 1.46
diff -u -d -b -w -u -r1.46 mpmt_beos.c
--- modules/mpm/mpmt_beos/mpmt_beos.c	2000/08/02 05:27:05	1.46
+++ modules/mpm/mpmt_beos/mpmt_beos.c	2000/08/06 03:06:04
@@ -964,8 +964,8 @@
                     " lowering MaxClients to %d.  To increase, please "
                     "see the", HARD_SERVER_LIMIT);
        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                    " HARD_SERVER_LIMIT define in %s.",
-                    AP_MPM_HARD_LIMITS_FILE);
+                    " HARD_SERVER_LIMIT define in "
+                    "src/modules/mpm/mpmt_beos/mpm_default.h.");
        ap_daemons_limit = HARD_SERVER_LIMIT;
     } 
     else if (ap_daemons_limit < 1) {
@@ -993,8 +993,8 @@
                      " lowering ThreadsPerChild to %d. To increase, please"
                      "see the", HARD_THREAD_LIMIT);
         ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                     " HARD_THREAD_LIMIT define in %s.",
-                     AP_MPM_HARD_LIMITS_FILE);
+                     " HARD_THREAD_LIMIT define in "
+                     "src/modules/mpm/mpmt_beos/mpm_default.h.");
     }
     else if (ap_threads_per_child < 1) {
 	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
Index: modules/mpm/mpmt_pthread/mpmt_pthread.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
retrieving revision 1.117
diff -u -d -b -w -u -r1.117 mpmt_pthread.c
--- modules/mpm/mpmt_pthread/mpmt_pthread.c	2000/08/02 05:27:06	1.117
+++ modules/mpm/mpmt_pthread/mpmt_pthread.c	2000/08/06 03:06:04
@@ -1316,8 +1316,8 @@
                     " lowering MaxClients to %d.  To increase, please "
                     "see the", HARD_SERVER_LIMIT);
        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                    " HARD_SERVER_LIMIT define in %s.",
-                    AP_MPM_HARD_LIMITS_FILE);
+                    " HARD_SERVER_LIMIT define in "
+                    "src/modules/mpm/mpmt_pthread/mpm_default.h.");
        ap_daemons_limit = HARD_SERVER_LIMIT;
     } 
     else if (ap_daemons_limit < 1) {
@@ -1345,8 +1345,8 @@
                      " lowering ThreadsPerChild to %d. To increase, please"
                      " see the", HARD_THREAD_LIMIT);
         ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                     " HARD_THREAD_LIMIT define in %s.",
-                     AP_MPM_HARD_LIMITS_FILE);
+                     " HARD_THREAD_LIMIT define in "
+                     src/modules/mpm/mpmt_pthread/mpm_default.h.");
     }
     else if (ap_threads_per_child < 1) {
 	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
Index: modules/mpm/perchild/perchild.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/perchild/perchild.c,v
retrieving revision 1.16
diff -u -d -b -w -u -r1.16 perchild.c
--- modules/mpm/perchild/perchild.c	2000/08/04 07:07:33	1.16
+++ modules/mpm/perchild/perchild.c	2000/08/06 03:06:04
@@ -1531,8 +1531,8 @@
                     " lowering NumServers to %d.  To increase, please "
                     "see the", HARD_SERVER_LIMIT);
        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                    " HARD_SERVER_LIMIT define in %s.",
-                    AP_MPM_HARD_LIMITS_FILE);
+                    " HARD_SERVER_LIMIT define in "
+                    " src/modules/mpm/perchild/mpm_default.h.");
        num_daemons = HARD_SERVER_LIMIT;
     } 
     else if (num_daemons < 1) {
@@ -1560,8 +1560,8 @@
                      " lowering StartThreads to %d. To increase, please"
                      " see the", HARD_THREAD_LIMIT);
         ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                     " HARD_THREAD_LIMIT define in %s.",
-                     AP_MPM_HARD_LIMITS_FILE);
+                     " HARD_THREAD_LIMIT define in "
+                     " src/modules/mpm/perchild/mpm_default.h.");
     }
     else if (threads_to_start < 1) {
 	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
Index: modules/mpm/prefork/prefork.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
retrieving revision 1.124
diff -u -d -b -w -u -r1.124 prefork.c
--- modules/mpm/prefork/prefork.c	2000/08/02 14:44:46	1.124
+++ modules/mpm/prefork/prefork.c	2000/08/06 03:06:04
@@ -1666,8 +1666,8 @@
                     " lowering MaxClients to %d.  To increase, please "
                     "see the", HARD_SERVER_LIMIT);
        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
-                    " HARD_SERVER_LIMIT define in %s.",
-                    AP_MPM_HARD_LIMITS_FILE);
+                    " HARD_SERVER_LIMIT define in "
+                    "src/modules/mpm/prefork/mpm_default.h.");
        ap_daemons_limit = HARD_SERVER_LIMIT;
     } 
     else if (ap_daemons_limit < 1) {
Index: modules/mpm/spmt_os2/spmt_os2.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
retrieving revision 1.59
diff -u -d -b -w -u -r1.59 spmt_os2.c
--- modules/mpm/spmt_os2/spmt_os2.c	2000/08/02 14:44:50	1.59
+++ modules/mpm/spmt_os2/spmt_os2.c	2000/08/06 03:06:04
@@ -1506,8 +1506,8 @@
                     " lowering MaxClients to %d.  To increase, please "
                     "see the", HARD_SERVER_LIMIT);
        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
-                    " HARD_SERVER_LIMIT define in %s.",
-                    AP_MPM_HARD_LIMITS_FILE);
+                    " HARD_SERVER_LIMIT define in "
+                    "src/modules/mpm/spmt_os2/mpm_default.h.");
        ap_daemons_limit = HARD_SERVER_LIMIT;
     } 
     else if (ap_daemons_limit < 1) {
Index: modules/mpm/winnt/mpm_winnt.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/mpm_winnt.c,v
retrieving revision 1.94
diff -u -d -b -w -u -r1.94 mpm_winnt.c
--- modules/mpm/winnt/mpm_winnt.c	2000/08/02 14:44:51	1.94
+++ modules/mpm/winnt/mpm_winnt.c	2000/08/06 03:06:05
@@ -2253,7 +2253,8 @@
                      HARD_THREAD_LIMIT);
         ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
                      " lowering ThreadsPerChild to %d. To increase, please"
-                     " see the  HARD_THREAD_LIMIT define in %s.", 
+                     " see the  HARD_THREAD_LIMIT define in"
+                     " src/modules/mpm/winnt/mpm_default.h.",  
                      HARD_THREAD_LIMIT, AP_MPM_HARD_LIMITS_FILE);
         ap_threads_per_child = HARD_THREAD_LIMIT;
     }
Index: os/win32/os.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/os/win32/os.h,v
retrieving revision 1.39
diff -u -d -b -w -u -r1.39 os.h
--- os/win32/os.h	2000/08/02 05:27:30	1.39
+++ os/win32/os.h	2000/08/06 03:06:06
@@ -130,7 +130,6 @@
 #define O_RDWR _O_RDWR
 /* Seems Windows is not a subgenius */
 #define NO_SLACK
-#define APACHE_MPM_DIR  "modules/mpm/winnt" /* generated on unix */
 
 #include <stddef.h>
 

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message