From: Ryan Bloom Date: Thu, 19 Oct 2000 00:05:00 +0000 (+0000) Subject: Namespace protect the rest of the macros defined by ap_config.h X-Git-Tag: APACHE_2_0_ALPHA_8~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=140586d14fd06ad2208552d3ad3c5507eb42985c;p=apache Namespace protect the rest of the macros defined by ap_config.h git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86661 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index ebbce032e3..8807b0928d 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ Apache 2.0 STATUS: -Last modified at [$Date: 2000/10/18 23:11:48 $] +Last modified at [$Date: 2000/10/19 00:04:53 $] Release: @@ -147,9 +147,6 @@ RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP: decided to do. Status: Greg +1 (volunteers), Ryan +1 - * Go through ap_config.h and namespace-protect the symbols (e.g. USE_*). - Some symbols can/should move to mpm_common.h where possible. - * Explore use of a post-config hook for the code in http_main.c which calls ap_fixup_virutal_hosts(), ap_fini_vhost_config(), and ap_sort_hooks() [to reduce the logic in main()] diff --git a/include/ap_config.h b/include/ap_config.h index e09635ac7e..1d7df4cb30 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -180,21 +180,21 @@ #undef VERSION #if APR_HAS_MMAP -#define USE_MMAP_FILES 1 +#define AP_USE_MMAP_FILES 1 #else -#undef USE_MMAP_FILES +#undef AP_USE_MMAP_FILES #endif #if APR_FILE_BASED_SHM -#define USE_FILE_BASED_SCOREBOARD +#define AP_USE_FILE_BASED_SCOREBOARD #else -#define USE_MEM_BASED_SCOREBOARD +#define AP_USE_MEM_BASED_SCOREBOARD #endif /* If APR has OTHER_CHILD logic, use reliable piped logs. */ #if (APR_HAS_OTHER_CHILD) -#define HAVE_RELIABLE_PIPED_LOGS TRUE +#define AP_HAVE_RELIABLE_PIPED_LOGS TRUE #endif #if defined(CHARSET_EBCDIC) && !defined(APACHE_XLATE) diff --git a/include/http_log.h b/include/http_log.h index aecbed8c48..c35c6d37da 100644 --- a/include/http_log.h +++ b/include/http_log.h @@ -229,7 +229,7 @@ struct piped_log { apr_file_t *fds[2]; /* XXX - an #ifdef that needs to be eliminated from public view. Shouldn't * be hard */ -#ifdef HAVE_RELIABLE_PIPED_LOGS +#ifdef AP_HAVE_RELIABLE_PIPED_LOGS /** The name of the program the logging process is running */ char *program; /** The pid of the logging process */ diff --git a/modules/http/http_core.c b/modules/http/http_core.c index ad0b1ad295..4d1afb2e2b 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -94,7 +94,7 @@ #define MIN_SIZE_TO_WRITE 9000 /* Allow Apache to use ap_mmap */ -#ifdef USE_MMAP_FILES +#ifdef AP_USE_MMAP_FILES #include "apr_mmap.h" /* mmap support for static files based on ideas from John Heidemann's @@ -116,7 +116,7 @@ #ifndef MMAP_LIMIT #define MMAP_LIMIT (4*1024*1024) #endif -#endif /* USE_MMAP_FILES */ +#endif /* AP_USE_MMAP_FILES */ /* LimitXMLRequestBody handling */ #define AP_LIMIT_UNSET ((long) -1) @@ -2926,7 +2926,7 @@ static int default_handler(request_rec *r) int rangestatus, errstatus; apr_file_t *fd = NULL; apr_status_t status; -#ifdef USE_MMAP_FILES +#ifdef AP_USE_MMAP_FILES apr_mmap_t *mm = NULL; #endif /* XXX if/when somebody writes a content-md5 filter we either need to @@ -2985,7 +2985,7 @@ static int default_handler(request_rec *r) return errstatus; } -#ifdef USE_MMAP_FILES +#ifdef AP_USE_MMAP_FILES if ((r->finfo.size >= MMAP_THRESHOLD) && (r->finfo.size < MMAP_LIMIT) && (!r->header_only || bld_content_md5)) { @@ -3038,7 +3038,7 @@ static int default_handler(request_rec *r) } } -#ifdef USE_MMAP_FILES +#ifdef AP_USE_MMAP_FILES } else { unsigned char *addr; diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 0639ed1c1b..73c6f55938 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -2667,7 +2667,7 @@ AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of } #endif -#ifdef USE_MMAP_FILES +#ifdef AP_USE_MMAP_FILES /* The code writes MMAP_SEGMENT_SIZE bytes at a time. This is due to Apache's * timeout model, which is a timeout per-write rather than a time for the @@ -2700,7 +2700,7 @@ AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, return mm->size; /* XXX - change API to report apr_status_t? */ } -#endif /* USE_MMAP_FILES */ +#endif /* AP_USE_MMAP_FILES */ AP_DECLARE(int) ap_rputc(int c, request_rec *r) { diff --git a/server/log.c b/server/log.c index 5e5be7010f..33dfcd455e 100644 --- a/server/log.c +++ b/server/log.c @@ -553,7 +553,7 @@ AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine) /* piped log support */ -#ifdef HAVE_RELIABLE_PIPED_LOGS +#ifdef AP_HAVE_RELIABLE_PIPED_LOGS /* forward declaration */ static void piped_log_maintenance(int reason, void *data, apr_wait_t status); diff --git a/server/main.c b/server/main.c index 47df11db6e..9682eff875 100644 --- a/server/main.c +++ b/server/main.c @@ -95,18 +95,18 @@ static void show_compile_settings(void) #ifdef HAVE_SHMGET printf(" -D HAVE_SHMGET\n"); #endif -#ifdef USE_FILE_BASED_SCOREBOARD - printf(" -D USE_FILE_BASED_SCOREBOARD\n"); +#ifdef AP_USE_FILE_BASED_SCOREBOARD + printf(" -D AP_USE_FILE_BASED_SCOREBOARD\n"); #endif -#ifdef USE_MEM_BASED_SCOREBOARD - printf(" -D USE_MEM_BASED_SCOREBOARD\n"); +#ifdef AP_USE_MEM_BASED_SCOREBOARD + printf(" -D AP_USE_MEM_BASED_SCOREBOARD\n"); #endif -#ifdef USE_MMAP_FILES - printf(" -D USE_MMAP_FILES\n"); +#ifdef AP_USE_MMAP_FILES + printf(" -D AP_USE_MMAP_FILES\n"); #ifdef MMAP_SEGMENT_SIZE printf(" -D MMAP_SEGMENT_SIZE=%ld\n",(long)MMAP_SEGMENT_SIZE); #endif -#endif /*USE_MMAP_FILES*/ +#endif /*AP_USE_MMAP_FILES*/ #ifdef NO_WRITEV printf(" -D NO_WRITEV\n"); #endif @@ -134,8 +134,8 @@ static void show_compile_settings(void) #if APR_HAS_OTHER_CHILD printf(" -D APR_HAS_OTHER_CHILD\n"); #endif -#ifdef HAVE_RELIABLE_PIPED_LOGS - printf(" -D HAVE_RELIABLE_PIPED_LOGS\n"); +#ifdef AP_HAVE_RELIABLE_PIPED_LOGS + printf(" -D AP_HAVE_RELIABLE_PIPED_LOGS\n"); #endif #ifdef BUFFERED_LOGS printf(" -D BUFFERED_LOGS\n"); diff --git a/server/mpm/mpmt_pthread/scoreboard.h b/server/mpm/mpmt_pthread/scoreboard.h index b67b2ae33e..28b3796a83 100644 --- a/server/mpm/mpmt_pthread/scoreboard.h +++ b/server/mpm/mpmt_pthread/scoreboard.h @@ -73,7 +73,7 @@ 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_MEM_BASED_SCOREBOARD) +#if defined(AP_USE_MEM_BASED_SCOREBOARD) #define OPTIMIZE_TIMEOUTS #endif diff --git a/server/mpm/prefork/scoreboard.h b/server/mpm/prefork/scoreboard.h index 002a75e2c2..241dc3eb12 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_MEM_BASED_SCOREBOARD) +#if defined(AP_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 595172662c..d1d77e9c30 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_MEM_BASED_SCOREBOARD) +#if defined(AP_USE_MEM_BASED_SCOREBOARD) #define OPTIMIZE_TIMEOUTS #endif