From 45b321443b34f0a4625fb7b5986ec451670f9bc2 Mon Sep 17 00:00:00 2001 From: "Victor J. Orlikowski" Date: Mon, 30 Jul 2001 17:55:38 +0000 Subject: [PATCH] httpd.exp and lots of other export files are generated based on the AP[RU]_DECLARE macros. This commit gets mod_cgid working again as a DSO on AIX. However, this brings up the need to look for any functions that are available as part of the API, and AP[RU]_DECLAREing them, so things don't blow up in DSOs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89790 13f79535-47bb-0310-9956-ffa450edef68 --- include/http_log.h | 2 +- os/unix/unixd.c | 10 ++++++---- os/unix/unixd.h | 10 ++++++---- server/log.c | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/http_log.h b/include/http_log.h index 4c99390740..2e53b85fc3 100644 --- a/include/http_log.h +++ b/include/http_log.h @@ -220,7 +220,7 @@ AP_DECLARE(void) ap_error_log2stderr(server_rec *s); * @param p The pool to use for logging * @param fname The name of the file to log to */ -void ap_log_pid(apr_pool_t *p, const char *fname); +AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *fname); typedef struct piped_log piped_log; diff --git a/os/unix/unixd.c b/os/unix/unixd.c index 9cdbd7384f..0a9f4ab641 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -147,7 +147,7 @@ static int set_group_privs(void) } -int unixd_setup_child(void) +AP_DECLARE(int) unixd_setup_child(void) { if (set_group_privs()) { return -1; @@ -182,7 +182,8 @@ int unixd_setup_child(void) } -const char *unixd_set_user(cmd_parms *cmd, void *dummy, const char *arg) +AP_DECLARE(const char *) unixd_set_user(cmd_parms *cmd, void *dummy, + const char *arg) { const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL) { @@ -208,7 +209,8 @@ const char *unixd_set_user(cmd_parms *cmd, void *dummy, const char *arg) return NULL; } -const char *unixd_set_group(cmd_parms *cmd, void *dummy, const char *arg) +AP_DECLARE(const char *) unixd_set_group(cmd_parms *cmd, void *dummy, + const char *arg) { const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL) { @@ -220,7 +222,7 @@ const char *unixd_set_group(cmd_parms *cmd, void *dummy, const char *arg) return NULL; } -void unixd_pre_config(apr_pool_t *ptemp) +AP_DECLARE(void) unixd_pre_config(apr_pool_t *ptemp) { apr_finfo_t wrapper; diff --git a/os/unix/unixd.h b/os/unix/unixd.h index 344f5a7183..d1b5abdeec 100644 --- a/os/unix/unixd.h +++ b/os/unix/unixd.h @@ -101,10 +101,12 @@ typedef struct { } unixd_config_rec; extern unixd_config_rec unixd_config; -int unixd_setup_child(void); -void unixd_pre_config(apr_pool_t *ptemp); -const char *unixd_set_user(cmd_parms *cmd, void *dummy, const char *arg); -const char *unixd_set_group(cmd_parms *cmd, void *dummy, const char *arg); +AP_DECLARE(int) unixd_setup_child(void); +AP_DECLARE(void) unixd_pre_config(apr_pool_t *ptemp); +AP_DECLARE(const char *) unixd_set_user(cmd_parms *cmd, void *dummy, + const char *arg); +AP_DECLARE(const char *) unixd_set_group(cmd_parms *cmd, void *dummy, + const char *arg); #if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS) AP_DECLARE(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, const char *arg, const char * arg2, int type); diff --git a/server/log.c b/server/log.c index 9a43691570..0ef006d707 100644 --- a/server/log.c +++ b/server/log.c @@ -512,7 +512,7 @@ AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level, va_end(args); } -void ap_log_pid(apr_pool_t *p, const char *fname) +AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *fname) { apr_file_t *pid_file = NULL; apr_finfo_t finfo; -- 2.50.1