From: Ryan Bloom Date: Sat, 10 Jun 2000 16:15:08 +0000 (+0000) Subject: Cleanup more of the Apache configuration. This removes all of the shared X-Git-Tag: APACHE_2_0_ALPHA_5~387 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a9a5b90ac40b6daad5d4facc143d9fb3a9c9c00;p=apache Cleanup more of the Apache configuration. This removes all of the shared memory checks, because Apache relies completely on APR for shared memory support. In doing this, we also need to know how APR/MM are providing our shared memory (ie file or memory) that requires the change made to APR's configure script that was just committed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85501 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_config.h b/include/ap_config.h index 0b7298b8ee..d9b3394483 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -249,6 +249,12 @@ extern int strncasecmp(const char *, const char *, unsigned); #undef USE_MMAP_FILES #endif +#if APR_FILE_BASED_SHM +#define USE_FILE_BASED_SCOREBOARD +#else +#define USE_MEM_BASED_SCOREBOARD +#endif + #if defined(CHARSET_EBCDIC) && !defined(APACHE_XLATE) #define APACHE_XLATE #endif diff --git a/os/win32/os.h b/os/win32/os.h index a08ea5be0d..9258655c7f 100644 --- a/os/win32/os.h +++ b/os/win32/os.h @@ -104,7 +104,6 @@ #define NO_USE_SIGACTION /* #undef HAVE_TIMES */ #define USE_LONGJMP -#define USE_MMAP_SCOREBOARD #define HAVE_CANONICAL_FILENAME #define HAVE_DRIVE_LETTERS #define HAVE_SENDFILE diff --git a/server/main.c b/server/main.c index 07968ffea6..ddd9530a9e 100644 --- a/server/main.c +++ b/server/main.c @@ -93,17 +93,11 @@ static void show_compile_settings(void) #ifdef HAVE_SHMGET printf(" -D HAVE_SHMGET\n"); #endif -#ifdef USE_MMAP_SCOREBOARD - printf(" -D USE_MMAP_SCOREBOARD\n"); +#ifdef USE_FILE_BASED_SCOREBOARD + printf(" -D USE_FILE_BASED_SCOREBOARD\n"); #endif -#ifdef USE_SHMGET_SCOREBOARD - printf(" -D USE_SHMGET_SCOREBOARD\n"); -#endif -#ifdef USE_OS2_SCOREBOARD - printf(" -D USE_OS2_SCOREBOARD\n"); -#endif -#ifdef USE_POSIX_SCOREBOARD - printf(" -D USE_POSIX_SCOREBOARD\n"); +#ifdef USE_MEM_BASED_SCOREBOARD + printf(" -D USE_MEM_BASED_SCOREBOARD\n"); #endif #ifdef USE_MMAP_FILES printf(" -D USE_MMAP_FILES\n"); diff --git a/server/mpm/config.m4 b/server/mpm/config.m4 index 41de19fd13..97cddbfb3e 100644 --- a/server/mpm/config.m4 +++ b/server/mpm/config.m4 @@ -40,24 +40,6 @@ MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la APACHE_SUBST(MPM_NAME) MODLIST="$MODLIST mpm_${MPM_NAME}" -dnl All the unix MPMs use shared memory; save a little duplication -AC_DEFUN(APACHE_MPM_CHECK_SHMEM, [ - AC_CHECK_FUNCS(shmget mmap) - - AC_MSG_CHECKING(which shared memory mechanism to use) - if test "$ac_cv_func_shmget" = "yes" ; then - AC_DEFINE(USE_SHMGET_SCOREBOARD,, - [Define if MPMs should use shmget to implement their shared memory]) - AC_MSG_RESULT(shmget) - elif test "$ac_cv_func_mmap" = "yes" ; then - AC_DEFINE(USE_MMAP_SCOREBOARD,, - [Define if MPMs should use mmap to implement their shared memory]) - AC_MSG_RESULT(mmap) - else - AC_MSG_ERROR(No known shared memory system) - fi -]) - dnl Check for pthreads and attempt to support it AC_DEFUN(APACHE_MPM_PTHREAD, [ if test "$pthreads_working" != "yes"; then diff --git a/server/mpm/dexter/scoreboard.h b/server/mpm/dexter/scoreboard.h index 2c9d0b7061..c68531225a 100644 --- a/server/mpm/dexter/scoreboard.h +++ b/server/mpm/dexter/scoreboard.h @@ -73,10 +73,6 @@ extern "C" { /* The generic shared memory chunk code */ void reinit_scoreboard(ap_pool_t *p); -#if defined(USE_OS2_SCOREBOARD) -caddr_t create_shared_heap(const char *name, size_t size); -caddr_t get_shared_heap(const char *Name); -#endif API_EXPORT(void) reopen_scoreboard(ap_pool_t *p); diff --git a/server/mpm/mpmt_pthread/scoreboard.h b/server/mpm/mpmt_pthread/scoreboard.h index 214fef12f7..a1a9f46843 100644 --- a/server/mpm/mpmt_pthread/scoreboard.h +++ b/server/mpm/mpmt_pthread/scoreboard.h @@ -72,9 +72,8 @@ extern "C" { #include "mpm_default.h" /* For HARD_.*_LIMIT */ -/* The optimized timeout code only works if we're not using a scoreboard file - */ -#if (defined (USE_MMAP_SCOREBOARD) || defined (USE_SHMGET_SCOREBOARD)) +/*The optimized timeout code only works if we're not using a scoreboard file*/ +#if defined(USE_MEM_BASED_SCOREBOARD) #define OPTIMIZE_TIMEOUTS #endif @@ -216,14 +215,6 @@ void cleanup_scoreboard(void); API_EXPORT(void) ap_sync_scoreboard_image(void); void ap_mpmt_pthread_force_reset_connection_status(long conn_id); - -#if defined(USE_OS2_SCOREBOARD) -caddr_t create_shared_heap(const char *name, size_t size); -caddr_t get_shared_heap(const char *Name); -#elif defined(USE_POSIX_SCOREBOARD) -static void cleanup_shared_mem(void *d); -#endif - API_EXPORT(void) reopen_scoreboard(ap_pool_t *p); ap_inline void ap_sync_scoreboard_image(void); @@ -234,7 +225,6 @@ int ap_update_child_status(int child_num, int thread_num, int status, request_re void ap_time_process_request(int child_num, int thread_num, int status); - API_VAR_EXPORT extern scoreboard *ap_scoreboard_image; API_VAR_EXPORT extern ap_generation_t volatile ap_my_generation; diff --git a/server/mpm/prefork/scoreboard.h b/server/mpm/prefork/scoreboard.h index e687fb6c0c..d66c606d34 100644 --- a/server/mpm/prefork/scoreboard.h +++ b/server/mpm/prefork/scoreboard.h @@ -75,7 +75,7 @@ extern "C" { /* The optimized timeout code only works if we're not using a scoreboard file */ -#if (defined (USE_MMAP_SCOREBOARD) || defined (USE_SHMGET_SCOREBOARD)) +#if defined(USE_MEM_BASED_SCOREBOARD) #define OPTIMIZE_TIMEOUTS #endif diff --git a/server/mpm/spmt_os2/scoreboard.h b/server/mpm/spmt_os2/scoreboard.h index 4b7360554a..41e594b888 100644 --- a/server/mpm/spmt_os2/scoreboard.h +++ b/server/mpm/spmt_os2/scoreboard.h @@ -69,7 +69,7 @@ extern "C" { /* The optimized timeout code only works if we're not using a scoreboard file */ -#if (defined (USE_MMAP_SCOREBOARD) || defined (USE_SHMGET_SCOREBOARD)) +#if defined(USE_MEM_BASED_SCOREBOARD) #define OPTIMIZE_TIMEOUTS #endif