From: William A. Rowe Jr Date: Fri, 18 Feb 2005 00:00:37 +0000 (+0000) Subject: Fix some symbols which should -not- be exported, and decorate real_exit_code X-Git-Tag: 2.1.3~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc979108b02f360128821c78cc9cba4a6ed71c28;p=apache Fix some symbols which should -not- be exported, and decorate real_exit_code with ap_ (this symbol must be exported.) If the others were desired to be public, they should have been ap_xxx decorated. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154216 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 50ccb43ad1..8af907aa79 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -89,12 +89,15 @@ * 20050127.0 (2.1.3-dev) renamed regex_t->ap_regex_t, regmatch_t->ap_regmatch_t, * REG_*->AP_REG_*, removed reg* in place of ap_reg*; * added ap_regex.h + * 20050217.0 (2.1.3-dev) Axed find_child_by_pid, mpm_*_completion_context (winnt mpm) + * symbols from the public sector, and decorated real_exit_code + * with ap_ in the win32 os.h. */ #define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 20050127 +#define MODULE_MAGIC_NUMBER_MAJOR 20050217 #endif #define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ diff --git a/include/ap_release.h b/include/ap_release.h index f52646aa06..ec55fb35a2 100644 --- a/include/ap_release.h +++ b/include/ap_release.h @@ -17,6 +17,9 @@ #ifndef AP_RELEASE_H #define AP_RELEASE_H +/* The numeric compile-time version constants. These constants are the + * authoritative version numbers for APR. + */ /** Properly quote a value as a string in the C preprocessor */ #define AP_STRINGIFY(n) AP_STRINGIFY_HELPER(n) /** Helper macro for AP_STRINGIFY */ diff --git a/include/scoreboard.h b/include/scoreboard.h index 724cc315c4..141775581d 100644 --- a/include/scoreboard.h +++ b/include/scoreboard.h @@ -171,7 +171,7 @@ apr_status_t ap_cleanup_scoreboard(void *d); AP_DECLARE(void) ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t *p, int child_num, int thread_num); -AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid); +int find_child_by_pid(apr_proc_t *pid); AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r); AP_DECLARE(int) ap_update_child_status_from_indexes(int child_num, int thread_num, int status, request_rec *r); diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 2fe7ee8e7b..2699af9174 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -69,7 +69,7 @@ static HANDLE ThreadDispatchIOCP = NULL; static HANDLE qwait_event = NULL; -AP_DECLARE(void) mpm_recycle_completion_context(PCOMP_CONTEXT context) +void mpm_recycle_completion_context(PCOMP_CONTEXT context) { /* Recycle the completion context. * - clear the ptrans pool @@ -94,7 +94,7 @@ AP_DECLARE(void) mpm_recycle_completion_context(PCOMP_CONTEXT context) } } -AP_DECLARE(PCOMP_CONTEXT) mpm_get_completion_context(void) +PCOMP_CONTEXT mpm_get_completion_context(void) { apr_status_t rv; PCOMP_CONTEXT context = NULL; @@ -190,8 +190,8 @@ AP_DECLARE(PCOMP_CONTEXT) mpm_get_completion_context(void) return context; } -AP_DECLARE(apr_status_t) mpm_post_completion_context(PCOMP_CONTEXT context, - io_state_e state) +apr_status_t mpm_post_completion_context(PCOMP_CONTEXT context, + io_state_e state) { LPOVERLAPPED pOverlapped; if (context) diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 2f73edbf7f..e52986198e 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1109,7 +1109,7 @@ void winnt_rewrite_args(process_rec *process) parent_pid = (DWORD) atol(pid); /* Prevent holding open the (nonexistant) console */ - real_exit_code = 0; + ap_real_exit_code = 0; /* The parent is responsible for providing the * COMPLETE ARGUMENTS REQUIRED to the child. @@ -1182,11 +1182,11 @@ void winnt_rewrite_args(process_rec *process) switch (optbuf[1]) { /* Shortcuts; include the -w option to hold the window open on error. - * This must not be toggled once we reset real_exit_code to 0! + * This must not be toggled once we reset ap_real_exit_code to 0! */ case 'w': - if (real_exit_code) - real_exit_code = 2; + if (ap_real_exit_code) + ap_real_exit_code = 2; break; case 'n': diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h index f1b1ab7088..7332e74057 100644 --- a/server/mpm/winnt/mpm_winnt.h +++ b/server/mpm/winnt/mpm_winnt.h @@ -114,8 +114,8 @@ typedef enum { IOCP_SHUTDOWN = 4 } io_state_e; -AP_DECLARE(PCOMP_CONTEXT) mpm_get_completion_context(void); -AP_DECLARE(void) mpm_recycle_completion_context(PCOMP_CONTEXT pCompContext); -AP_DECLARE(apr_status_t) mpm_post_completion_context(PCOMP_CONTEXT pCompContext, io_state_e state); +PCOMP_CONTEXT mpm_get_completion_context(void); +void mpm_recycle_completion_context(PCOMP_CONTEXT pCompContext); +apr_status_t mpm_post_completion_context(PCOMP_CONTEXT pCompContext, io_state_e state); void hold_console_open_on_error(void); #endif /* APACHE_MPM_WINNT_H */ diff --git a/server/mpm/winnt/service.c b/server/mpm/winnt/service.c index 08f0487ee5..4d24891146 100644 --- a/server/mpm/winnt/service.c +++ b/server/mpm/winnt/service.c @@ -110,11 +110,11 @@ apr_status_t ap_registry_get_server_root(apr_pool_t *p, char **buf) * the service.h header, so we best assume it's an error to exit from * _any_ other module. * - * If real_exit_code is reset to 0, it will not be set or trigger this + * If ap_real_exit_code is reset to 0, it will not be set or trigger this * behavior on exit. All service and child processes are expected to * reset this flag to zero to avoid undesireable side effects. */ -AP_DECLARE_DATA int real_exit_code = 1; +AP_DECLARE_DATA int ap_real_exit_code = 1; void hold_console_open_on_error(void) { @@ -129,7 +129,7 @@ void hold_console_open_on_error(void) INPUT_RECORD in; char count[16]; - if (!real_exit_code) + if (!ap_real_exit_code) return; hConIn = GetStdHandle(STD_INPUT_HANDLE); hConErr = GetStdHandle(STD_ERROR_HANDLE); @@ -711,7 +711,7 @@ apr_status_t mpm_service_to_start(const char **display_name, apr_pool_t *p) HANDLE waitfor[2]; /* Prevent holding open the (hidden) console */ - real_exit_code = 0; + ap_real_exit_code = 0; /* GetCurrentThread returns a psuedo-handle, we need * a real handle for another thread to wait upon. diff --git a/server/scoreboard.c b/server/scoreboard.c index c7832fdcd4..6098837a4e 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -356,7 +356,7 @@ AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sb, request_rec *r) ws->conn_bytes += r->bytes_sent; } -AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid) +int find_child_by_pid(apr_proc_t *pid) { int i; int max_daemons_limit;