]> granicus.if.org Git - apache/commitdiff
allow non-Unix MPMs to use mpm_common.c by not automatically
authorJeff Trawick <trawick@apache.org>
Mon, 13 Aug 2001 15:44:00 +0000 (15:44 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 13 Aug 2001 15:44:00 +0000 (15:44 +0000)
building in Unix-specific code

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90137 13f79535-47bb-0310-9956-ffa450edef68

configure.in
include/mpm_common.h
server/mpm/beos/mpm.h
server/mpm/experimental/perchild/mpm.h
server/mpm/perchild/mpm.h
server/mpm/prefork/mpm.h
server/mpm/threaded/mpm.h
server/mpm/worker/mpm.h
server/mpm_common.c

index 769df57f2062bad5635145d12db043b59ebde43e..9ba565f5b5c6a4530274373973ad923b8713fc6d 100644 (file)
@@ -202,6 +202,8 @@ dnl ## Check for library functions
 dnl See Comment #Spoon
 
 AC_CHECK_FUNCS( \
+getpwnam \
+getgrnam \
 initgroups \
 bindprocessor \
 )
index 7c246d4085b0bb7cb075a29dc4300873d0f32f9e..35ac57c9ae91efa379f4afa81775ec46b4f5a793 100644 (file)
@@ -124,7 +124,9 @@ void ap_reclaim_child_processes(int terminate);
  * @param ret The process id of the process that died
  * @param p The pool to allocate out of
  */
+#ifdef AP_MPM_WANT_WAIT_OR_TIMEOUT
 void ap_wait_or_timeout(apr_wait_t *status, apr_proc_t *ret, apr_pool_t *p);
+#endif
 
 /**
  * Log why a child died to the error log, if the child died without the
@@ -132,7 +134,9 @@ void ap_wait_or_timeout(apr_wait_t *status, apr_proc_t *ret, apr_pool_t *p);
  * @param pid The child that has died
  * @param status The status returned from ap_wait_or_timeout
  */
+#ifdef AP_MPM_WANT_PROCESS_CHILD_STATUS
 void ap_process_child_status(apr_proc_t *pid, apr_wait_t status);
+#endif
 
 #if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF)
 /**
@@ -154,6 +158,7 @@ void ap_sock_disable_nagle(apr_socket_t *s);
  * @deffunc uid_t ap_uname2id(const char *name)
  */
 AP_DECLARE(uid_t) ap_uname2id(const char *name);
+
 /**
  * Convert a group name to a numeric ID
  * @param name The name to convert
index 98e31d5b915e473cb513ead77533ad6bb45ebd20..bdeb82ef8f30c1e4780701229b0188359bf6b09e 100644 (file)
@@ -68,6 +68,8 @@
 #define MPM_CHILD_PID(i) (ap_scoreboard_image->servers[0][i].tid)
 #define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
 
+#define AP_MPM_WANT_WAIT_OR_TIMEOUT
+#define AP_MPM_WANT_PROCESS_CHILD_STATUS
 #define AP_MPM_WANT_SET_PIDFILE
 #define AP_MPM_WANT_SET_SCOREBOARD
 #define AP_MPM_WANT_SET_MAX_REQUESTS
index cdaa46e37260031548636e51c1b61352bee8058d..0a8df316b96cee9da09ff92110854d189e8d24fc 100644 (file)
@@ -67,6 +67,8 @@
 
 #define MPM_NAME "Perchild"
 
+#define AP_MPM_WANT_WAIT_OR_TIMEOUT
+#define AP_MPM_WANT_PROCESS_CHILD_STATUS
 #define AP_MPM_WANT_SET_PIDFILE
 #define AP_MPM_WANT_SET_SCOREBOARD
 #define AP_MPM_WANT_SET_LOCKFILE
index cdaa46e37260031548636e51c1b61352bee8058d..0a8df316b96cee9da09ff92110854d189e8d24fc 100644 (file)
@@ -67,6 +67,8 @@
 
 #define MPM_NAME "Perchild"
 
+#define AP_MPM_WANT_WAIT_OR_TIMEOUT
+#define AP_MPM_WANT_PROCESS_CHILD_STATUS
 #define AP_MPM_WANT_SET_PIDFILE
 #define AP_MPM_WANT_SET_SCOREBOARD
 #define AP_MPM_WANT_SET_LOCKFILE
index 429c61f1cb61cd70dc40de5bd03c62bbc382b809..5dbac99c42763477e2bfd177a4c09e1160b37589 100644 (file)
@@ -68,6 +68,8 @@
 
 #define MPM_NAME "Prefork"
 
+#define AP_MPM_WANT_WAIT_OR_TIMEOUT
+#define AP_MPM_WANT_PROCESS_CHILD_STATUS
 #define AP_MPM_WANT_SET_PIDFILE
 #define AP_MPM_WANT_SET_SCOREBOARD
 #define AP_MPM_WANT_SET_LOCKFILE
index 3c58c70836505d494fd56ea20ab83d36179cbb50..49d01ecb7f59c042b5406e3611253080d422634c 100644 (file)
@@ -65,6 +65,8 @@
 
 #define MPM_NAME "Threaded"
 
+#define AP_MPM_WANT_WAIT_OR_TIMEOUT
+#define AP_MPM_WANT_PROCESS_CHILD_STATUS
 #define AP_MPM_WANT_SET_PIDFILE
 #define AP_MPM_WANT_SET_SCOREBOARD
 #define AP_MPM_WANT_SET_LOCKFILE
index 8611da09126286cba85b526ccfc6090f1d6ee456..571a00cc2b8c0e82eb33b3f5d58d9f3d71d331bf 100644 (file)
@@ -65,6 +65,8 @@
 
 #define MPM_NAME "Worker"
 
+#define AP_MPM_WANT_WAIT_OR_TIMEOUT
+#define AP_MPM_WANT_PROCESS_CHILD_STATUS
 #define AP_MPM_WANT_SET_PIDFILE
 #define AP_MPM_WANT_SET_SCOREBOARD
 #define AP_MPM_WANT_SET_LOCKFILE
index d8222060c726b3c8aacbdc6fd638f4281200b9df..a8240026fd423539d6402350b4feb68b657920e1 100644 (file)
@@ -186,7 +186,9 @@ void ap_reclaim_child_processes(int terminate)
         }
     }
 }
-#endif /* NEED_RECLAIM_CHILD_PROCESSES */
+#endif /* AP_MPM_NEEDS_RECLAIM_CHILD_PROCESSES */
+
+#ifdef AP_MPM_WANT_WAIT_OR_TIMEOUT
 
 /* number of calls to wait_or_timeout between writable probes */
 #ifndef INTERVAL_OF_WRITABLE_PROBES
@@ -219,7 +221,9 @@ void ap_wait_or_timeout(apr_wait_t *status, apr_proc_t *ret, apr_pool_t *p)
     ret->pid = -1;
     return;
 }
+#endif /* AP_MPM_WANT_WAIT_OR_TIMEOUT */
 
+#ifdef AP_MPM_WANT_PROCESS_CHILD_STATUS
 void ap_process_child_status(apr_proc_t *pid, apr_wait_t status)
 {
     int signum = WTERMSIG(status);
@@ -265,6 +269,7 @@ void ap_process_child_status(apr_proc_t *pid, apr_wait_t status)
         }
     }
 }
+#endif /* AP_MPM_WANT_PROCESS_CHILD_STATUS */
 
 #if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF)
 void ap_sock_disable_nagle(apr_socket_t *s)
@@ -287,6 +292,7 @@ void ap_sock_disable_nagle(apr_socket_t *s)
 }
 #endif
 
+#ifdef HAVE_GETPWNAM
 AP_DECLARE(uid_t) ap_uname2id(const char *name)
 {
     struct passwd *ent;
@@ -300,7 +306,9 @@ AP_DECLARE(uid_t) ap_uname2id(const char *name)
     }
     return (ent->pw_uid);
 }
+#endif
 
+#ifdef HAVE_GETGRNAM
 AP_DECLARE(gid_t) ap_gname2id(const char *name)
 {
     struct group *ent;
@@ -313,6 +321,7 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name)
     }
     return (ent->gr_gid);
 }
+#endif
 
 #ifndef HAVE_INITGROUPS
 int initgroups(const char *name, gid_t basegid)