diff options
Diffstat (limited to 'server')
33 files changed, 214 insertions, 214 deletions
diff --git a/server/buildmark.c b/server/buildmark.c index e82f31ba0f..1727bb64fe 100644 --- a/server/buildmark.c +++ b/server/buildmark.c @@ -61,7 +61,7 @@ static const char server_built[] = __DATE__ " " __TIME__; static const char server_built[] = "unknown"; #endif -API_EXPORT(const char *) ap_get_server_built() +AP_DECLARE(const char *) ap_get_server_built() { return server_built; } diff --git a/server/config.c b/server/config.c index 51fe37a14d..cb6d8ef081 100644 --- a/server/config.c +++ b/server/config.c @@ -93,13 +93,13 @@ #include <strings.h> #endif -API_VAR_EXPORT const char *ap_server_argv0; +AP_DECLARE_DATA const char *ap_server_argv0; -API_VAR_EXPORT const char *ap_server_root; +AP_DECLARE_DATA const char *ap_server_root; -API_VAR_EXPORT apr_array_header_t *ap_server_pre_read_config; -API_VAR_EXPORT apr_array_header_t *ap_server_post_read_config; -API_VAR_EXPORT apr_array_header_t *ap_server_config_defines; +AP_DECLARE_DATA apr_array_header_t *ap_server_pre_read_config; +AP_DECLARE_DATA apr_array_header_t *ap_server_post_read_config; +AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines; AP_HOOK_STRUCT( AP_HOOK_LINK(header_parser) @@ -138,8 +138,8 @@ static int total_modules = 0; * than DYNAMIC_MODULE_LIMIT. */ static int dynamic_modules = 0; -API_VAR_EXPORT module *top_module = NULL; -API_VAR_EXPORT module **ap_loaded_modules=NULL; +AP_DECLARE_DATA module *top_module = NULL; +AP_DECLARE_DATA module **ap_loaded_modules=NULL; typedef int (*handler_func) (request_rec *); typedef void *(*dir_maker_func) (apr_pool_t *, char *); @@ -157,7 +157,7 @@ typedef void *(*merger_func) (apr_pool_t *, void *, void *); */ #ifndef ap_get_module_config -API_EXPORT(void *) ap_get_module_config(void *conf_vector, module *m) +AP_DECLARE(void *) ap_get_module_config(void *conf_vector, module *m) { void **confv = (void **) conf_vector; return confv[m->module_index]; @@ -165,7 +165,7 @@ API_EXPORT(void *) ap_get_module_config(void *conf_vector, module *m) #endif #ifndef ap_set_module_config -API_EXPORT(void) ap_set_module_config(void *conf_vector, module *m, void *val) +AP_DECLARE(void) ap_set_module_config(void *conf_vector, module *m, void *val) { void **confv = (void **) conf_vector; confv[m->module_index] = val; @@ -259,7 +259,7 @@ void *ap_create_conn_config(apr_pool_t *p) return create_empty_config(p); } -CORE_EXPORT(void *) ap_create_per_dir_config(apr_pool_t *p) +AP_CORE_DECLARE(void *) ap_create_per_dir_config(apr_pool_t *p) { return create_empty_config(p); } @@ -379,7 +379,7 @@ int ap_invoke_handler(request_rec *r) return HTTP_INTERNAL_SERVER_ERROR; } -API_EXPORT(int) ap_method_is_limited(cmd_parms *cmd, const char *method) { +AP_DECLARE(int) ap_method_is_limited(cmd_parms *cmd, const char *method) { int methnum; int i; char **xmethod; @@ -407,7 +407,7 @@ API_EXPORT(int) ap_method_is_limited(cmd_parms *cmd, const char *method) { return 0; } -API_EXPORT(void) ap_register_hooks(module *m) +AP_DECLARE(void) ap_register_hooks(module *m) { if(m->register_hooks) { @@ -423,7 +423,7 @@ API_EXPORT(void) ap_register_hooks(module *m) /* One-time setup for precompiled modules --- NOT to be done on restart */ -API_EXPORT(void) ap_add_module(module *m) +AP_DECLARE(void) ap_add_module(module *m) { /* This could be called from an AddModule httpd.conf command, * after the file has been linked and the module structure within it @@ -488,7 +488,7 @@ API_EXPORT(void) ap_add_module(module *m) * all our current data. I.e. when doing a restart. */ -API_EXPORT(void) ap_remove_module(module *m) +AP_DECLARE(void) ap_remove_module(module *m) { module *modp; @@ -523,7 +523,7 @@ API_EXPORT(void) ap_remove_module(module *m) total_modules--; } -API_EXPORT(void) ap_add_loaded_module(module *mod) +AP_DECLARE(void) ap_add_loaded_module(module *mod) { module **m; @@ -546,7 +546,7 @@ API_EXPORT(void) ap_add_loaded_module(module *mod) *m = NULL; } -API_EXPORT(void) ap_remove_loaded_module(module *mod) +AP_DECLARE(void) ap_remove_loaded_module(module *mod) { module **m; module **m2; @@ -575,7 +575,7 @@ API_EXPORT(void) ap_remove_loaded_module(module *mod) *m = NULL; } -API_EXPORT(void) ap_setup_prelinked_modules(process_rec *process) +AP_DECLARE(void) ap_setup_prelinked_modules(process_rec *process) { module **m; module **m2; @@ -611,12 +611,12 @@ API_EXPORT(void) ap_setup_prelinked_modules(process_rec *process) ap_sort_hooks(); } -API_EXPORT(const char *) ap_find_module_name(module *m) +AP_DECLARE(const char *) ap_find_module_name(module *m) { return m->name; } -API_EXPORT(module *) ap_find_linked_module(const char *name) +AP_DECLARE(module *) ap_find_linked_module(const char *name) { module *modp; @@ -628,7 +628,7 @@ API_EXPORT(module *) ap_find_linked_module(const char *name) } /* Add a named module. Returns 1 if module found, 0 otherwise. */ -API_EXPORT(int) ap_add_named_module(const char *name) +AP_DECLARE(int) ap_add_named_module(const char *name) { module *modp; int i = 0; @@ -647,7 +647,7 @@ API_EXPORT(int) ap_add_named_module(const char *name) } /* Clear the internal list of modules, in preparation for starting over. */ -API_EXPORT(void) ap_clear_module_list() +AP_DECLARE(void) ap_clear_module_list() { module **m = &top_module; module **next_m; @@ -823,7 +823,7 @@ static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms, } } -CORE_EXPORT(const command_rec *) ap_find_command(const char *name, const command_rec *cmds) +AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name, const command_rec *cmds) { while (cmds->name) if (!strcasecmp(name, cmds->name)) @@ -834,7 +834,7 @@ CORE_EXPORT(const command_rec *) ap_find_command(const char *name, const command return NULL; } -CORE_EXPORT(const command_rec *) ap_find_command_in_modules(const char *cmd_name, module **mod) +AP_CORE_DECLARE(const command_rec *) ap_find_command_in_modules(const char *cmd_name, module **mod) { const command_rec *cmdp; module *modp; @@ -848,7 +848,7 @@ CORE_EXPORT(const command_rec *) ap_find_command_in_modules(const char *cmd_name return NULL; } -CORE_EXPORT(void *) ap_set_config_vectors(cmd_parms *parms, void *config, module *mod) +AP_CORE_DECLARE(void *) ap_set_config_vectors(cmd_parms *parms, void *config, module *mod) { void *mconfig = ap_get_module_config(config, mod); void *sconfig = ap_get_module_config(parms->server->module_config, mod); @@ -1052,7 +1052,7 @@ static const char *ap_walk_config_sub(const ap_directive_t *current, /* NOTREACHED */ } -API_EXPORT(const char *) ap_walk_config(ap_directive_t *current, +AP_DECLARE(const char *) ap_walk_config(ap_directive_t *current, cmd_parms *parms, void *config) { void *oldconfig = parms->context; @@ -1079,7 +1079,7 @@ API_EXPORT(const char *) ap_walk_config(ap_directive_t *current, } -API_EXPORT(const char *) ap_build_config(cmd_parms *parms, +AP_DECLARE(const char *) ap_build_config(cmd_parms *parms, apr_pool_t *p, apr_pool_t *temp_pool, ap_directive_t **conftree) { @@ -1130,7 +1130,7 @@ API_EXPORT(const char *) ap_build_config(cmd_parms *parms, * Generic command functions... */ -API_EXPORT_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd, +AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char *arg) { @@ -1141,7 +1141,7 @@ API_EXPORT_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd, return NULL; } -API_EXPORT_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd, +AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd, void *struct_ptr, const char *arg_) { @@ -1154,7 +1154,7 @@ API_EXPORT_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd, return NULL; } -API_EXPORT_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, +AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, void *struct_ptr_v, int arg) { /* This one's pretty generic too... */ @@ -1165,7 +1165,7 @@ API_EXPORT_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, return NULL; } -API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_ptr, +AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_ptr, const char *arg) { /* Prepend server_root to relative arg. @@ -1189,14 +1189,14 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_pt static cmd_parms default_parms = {NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; -API_EXPORT(const char *) ap_server_root_relative(apr_pool_t *p, const char *file) +AP_DECLARE(const char *) ap_server_root_relative(apr_pool_t *p, const char *file) { if(ap_os_is_path_absolute(file)) return file; return ap_make_full_path(p, ap_server_root, file); } -API_EXPORT(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive) +AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive) { char l[MAX_STRING_LEN]; const char *args; @@ -1433,7 +1433,7 @@ void ap_process_resource_config(server_rec *s, const char *fname, ap_cfg_closefile(cfp); } -API_EXPORT(void)ap_process_config_tree(server_rec *s, ap_directive_t *conftree, +AP_DECLARE(void)ap_process_config_tree(server_rec *s, ap_directive_t *conftree, apr_pool_t *p, apr_pool_t *ptemp) { const char *errmsg; @@ -1536,7 +1536,7 @@ int ap_parse_htaccess(void **result, request_rec *r, int override, return OK; } -CORE_EXPORT(const char *) ap_init_virtual_host(apr_pool_t *p, const char *hostname, +AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p, const char *hostname, server_rec *main_server, server_rec **ps) { server_rec *s = (server_rec *) apr_pcalloc(p, sizeof(server_rec)); @@ -1578,7 +1578,7 @@ CORE_EXPORT(const char *) ap_init_virtual_host(apr_pool_t *p, const char *hostna } -API_EXPORT(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server) +AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server) { server_rec *virt; @@ -1656,7 +1656,7 @@ static server_rec *init_server_config(process_rec *process, apr_pool_t *p) } -API_EXPORT(server_rec*) ap_read_config(process_rec *process, apr_pool_t *ptemp, +AP_DECLARE(server_rec*) ap_read_config(process_rec *process, apr_pool_t *ptemp, const char *confname, ap_directive_t **conftree) { @@ -1688,7 +1688,7 @@ void ap_single_module_configure(apr_pool_t *p, server_rec *s, module *m) (*m->create_dir_config)(p, NULL)); } -API_EXPORT(void) ap_run_rewrite_args(process_rec *process) +AP_DECLARE(void) ap_run_rewrite_args(process_rec *process) { module *m; @@ -1697,7 +1697,7 @@ API_EXPORT(void) ap_run_rewrite_args(process_rec *process) (*m->rewrite_args) (process); } -API_EXPORT(void) ap_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) +AP_DECLARE(void) ap_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { ap_run_post_config(pconf,plog,ptemp,s); init_handlers(pconf); @@ -1789,7 +1789,7 @@ static void show_overrides(const command_rec *pc, module *pm) * the directive arguments, in what module they are handled, and in * what parts of the configuration they are allowed. Used for httpd -h. */ -API_EXPORT(void) ap_show_directives() +AP_DECLARE(void) ap_show_directives() { const command_rec *pc; int n; @@ -1804,7 +1804,7 @@ API_EXPORT(void) ap_show_directives() } /* Show the preloaded module names. Used for httpd -l. */ -API_EXPORT(void) ap_show_modules() +AP_DECLARE(void) ap_show_modules() { int n; diff --git a/server/connection.c b/server/connection.c index 92a4d22cf3..5fa3c530fb 100644 --- a/server/connection.c +++ b/server/connection.c @@ -204,7 +204,7 @@ void ap_lingering_close(conn_rec *c) ap_bclose(c->client); } -CORE_EXPORT(void) ap_process_connection(conn_rec *c) +AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c) { ap_update_vhost_given_ip(c); diff --git a/server/log.c b/server/log.c index bb27ad94ad..fcf2acce49 100644 --- a/server/log.c +++ b/server/log.c @@ -311,7 +311,7 @@ void ap_open_logs(server_rec *s_main, apr_pool_t *p) } } -API_EXPORT(void) ap_error_log2stderr(server_rec *s) { +AP_DECLARE(void) ap_error_log2stderr(server_rec *s) { apr_file_t *errfile = NULL; apr_open_stderr(&errfile, s->process->pool); @@ -444,7 +444,7 @@ static void log_error_core(const char *file, int line, int level, #endif } -API_EXPORT(void) ap_log_error(const char *file, int line, int level, +AP_DECLARE(void) ap_log_error(const char *file, int line, int level, apr_status_t status, const server_rec *s, const char *fmt, ...) { @@ -455,7 +455,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level, va_end(args); } -API_EXPORT(void) ap_log_perror(const char *file, int line, int level, +AP_DECLARE(void) ap_log_perror(const char *file, int line, int level, apr_status_t status, apr_pool_t *p, const char *fmt, ...) { @@ -466,7 +466,7 @@ API_EXPORT(void) ap_log_perror(const char *file, int line, int level, va_end(args); } -API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, +AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level, apr_status_t status, const request_rec *r, const char *fmt, ...) { @@ -535,7 +535,7 @@ void ap_log_pid(apr_pool_t *p, const char *fname) saved_pid = mypid; } -API_EXPORT(void) ap_log_assert(const char *szExp, const char *szFile, int nLine) +AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine) { char time_str[APR_CTIME_LEN]; @@ -675,7 +675,7 @@ static apr_status_t piped_log_cleanup_for_exec(void *data) return APR_SUCCESS; } -API_EXPORT(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program) +AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program) { piped_log *pl; @@ -708,7 +708,7 @@ static apr_status_t piped_log_cleanup(void *data) return APR_SUCCESS; } -API_EXPORT(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program) +AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program) { piped_log *pl; apr_file_t *dummy = NULL; @@ -733,7 +733,7 @@ API_EXPORT(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program) #endif -API_EXPORT(void) ap_close_piped_log(piped_log *pl) +AP_DECLARE(void) ap_close_piped_log(piped_log *pl) { apr_run_cleanup(pl->p, pl, piped_log_cleanup); } diff --git a/server/mpm/beos/beos.c b/server/mpm/beos/beos.c index f99d14a4d4..0be3d47cda 100644 --- a/server/mpm/beos/beos.c +++ b/server/mpm/beos/beos.c @@ -97,7 +97,7 @@ static int min_spare_threads=0; static int max_spare_threads=0; static int ap_thread_limit=0; static time_t ap_restart_time=0; -API_VAR_EXPORT int ap_extended_status = 0; +AP_DECLARE_DATA int ap_extended_status = 0; static int num_listening_sockets = 0; /* set by open_listeners in ap_mpm_run */ static apr_socket_t ** listening_sockets; apr_lock_t *accept_mutex = NULL; @@ -140,7 +140,7 @@ static int one_process = 0; int raise_sigstop_flags; #endif -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return ap_max_child_assigned; } @@ -1069,7 +1069,7 @@ AP_INIT_TAKE1( "CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, { NULL } }; -module MODULE_VAR_EXPORT mpm_beos_module = { +module AP_MODULE_DECLARE_DATA mpm_beos_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/beos/scoreboard.c b/server/mpm/beos/scoreboard.c index c7907f47e2..e11eb0dd84 100644 --- a/server/mpm/beos/scoreboard.c +++ b/server/mpm/beos/scoreboard.c @@ -89,7 +89,7 @@ void cleanup_scoreboard(void) ap_scoreboard_image = NULL; } -API_EXPORT(int) ap_exists_scoreboard_image(void) +AP_DECLARE(int) ap_exists_scoreboard_image(void) { return (ap_scoreboard_image ? 1 : 0); } diff --git a/server/mpm/beos/scoreboard.h b/server/mpm/beos/scoreboard.h index 53d869d252..a024c1795e 100644 --- a/server/mpm/beos/scoreboard.h +++ b/server/mpm/beos/scoreboard.h @@ -66,14 +66,14 @@ extern "C" { #include <sys/times.h> #include "mpm_default.h" /* For HARD_.*_LIMIT */ -API_EXPORT(int) ap_exists_scoreboard_image(void); +AP_DECLARE(int) ap_exists_scoreboard_image(void); void reinit_scoareboard(apr_pool_t *p); void cleanup_scoreboard(void); void ap_beos_set_maintain_connection_status(int flag); void ap_beos_force_reset_connection_status(long conn_id); void reinit_scoreboard(apr_pool_t *p); void update_scoreboard_global(void); -API_EXPORT(int) find_child_by_pid(int pid); +AP_DECLARE(int) find_child_by_pid(int pid); int ap_update_child_status(int child_num, int thread_num, int status, request_rec *r); void ap_time_process_request(int child_num, int thread_num, int status); diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index 006435c8cc..37240bd71a 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -99,7 +99,7 @@ static int max_spare_threads = 0; static int max_threads = 0; static int max_requests_per_child = 0; static const char *ap_pid_fname=NULL; -API_VAR_EXPORT const char *ap_scoreboard_fname=NULL; +AP_DECLARE_DATA const char *ap_scoreboard_fname=NULL; static int num_daemons=0; static int workers_may_exit = 0; static int requests_this_child; @@ -173,7 +173,7 @@ static apr_lock_t *process_accept_mutex; static const char *lock_fname; static pthread_mutex_t thread_accept_mutex = PTHREAD_MUTEX_INITIALIZER; -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return ap_max_daemons_limit; } @@ -1397,7 +1397,7 @@ AP_INIT_TAKE1("CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, { NULL } }; -module MODULE_VAR_EXPORT mpm_dexter_module = { +module AP_MODULE_DECLARE_DATA mpm_dexter_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/dexter/scoreboard.h b/server/mpm/dexter/scoreboard.h index 7106f350c6..cda8b6ed90 100644 --- a/server/mpm/dexter/scoreboard.h +++ b/server/mpm/dexter/scoreboard.h @@ -74,7 +74,7 @@ extern "C" { /* The generic shared memory chunk code */ void reinit_scoreboard(apr_pool_t *p); -API_EXPORT(void) reopen_scoreboard(apr_pool_t *p); +AP_DECLARE(void) reopen_scoreboard(apr_pool_t *p); /* The stuff for Dexter's status table */ @@ -98,7 +98,7 @@ typedef struct { #define SCOREBOARD_SIZE sizeof(scoreboard) -API_VAR_EXPORT extern const char *ap_scoreboard_fname; +AP_DECLARE_DATA extern const char *ap_scoreboard_fname; apr_status_t ap_cleanup_shared_mem(void *d); diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index f62b737873..dc77a38434 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -107,7 +107,7 @@ static int max_spare_threads = 0; static int max_threads = 0; static int max_requests_per_child = 0; static const char *ap_pid_fname=NULL; -API_VAR_EXPORT const char *ap_scoreboard_fname=NULL; +AP_DECLARE_DATA const char *ap_scoreboard_fname=NULL; static int num_daemons=0; static int curr_child_num=0; static int workers_may_exit = 0; @@ -153,7 +153,7 @@ int ap_max_daemons_limit = -1; char ap_coredump_dir[MAX_STRING_LEN]; -module MODULE_VAR_EXPORT mpm_perchild_module; +module AP_MODULE_DECLARE_DATA mpm_perchild_module; static apr_file_t *pipe_of_death_in = NULL; static apr_file_t *pipe_of_death_out = NULL; @@ -208,7 +208,7 @@ static apr_lock_t *process_accept_mutex; static const char *lock_fname; static pthread_mutex_t thread_accept_mutex = PTHREAD_MUTEX_INITIALIZER; -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return ap_max_daemons_limit; } @@ -1754,7 +1754,7 @@ static void *perchild_create_config(apr_pool_t *p, server_rec *s) return c; } -module MODULE_VAR_EXPORT mpm_perchild_module = { +module AP_MODULE_DECLARE_DATA mpm_perchild_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/mpmt_beos/mpmt_beos.c b/server/mpm/mpmt_beos/mpmt_beos.c index 20431f376c..8711b40014 100644 --- a/server/mpm/mpmt_beos/mpmt_beos.c +++ b/server/mpm/mpmt_beos/mpmt_beos.c @@ -92,7 +92,7 @@ static int min_spare_threads=0; static int max_spare_threads=0; static int ap_daemons_limit=0; static time_t ap_restart_time=0; -API_VAR_EXPORT int ap_extended_status = 0; +AP_DECLARE_DATA int ap_extended_status = 0; static int workers_may_exit = 0; static int requests_this_child; static int num_listenfds = 0; @@ -140,7 +140,7 @@ static int one_process = 0; int raise_sigstop_flags; #endif -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return ap_max_daemons_limit; } @@ -1055,7 +1055,7 @@ LISTEN_COMMANDS { NULL } }; -module MODULE_VAR_EXPORT mpm_mpmt_beos_module = { +module AP_MODULE_DECLARE_DATA mpm_mpmt_beos_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/mpmt_beos/scoreboard.c b/server/mpm/mpmt_beos/scoreboard.c index da7b6d2ad3..f52bf27c08 100644 --- a/server/mpm/mpmt_beos/scoreboard.c +++ b/server/mpm/mpmt_beos/scoreboard.c @@ -90,7 +90,7 @@ void cleanup_scoreboard(void) ap_scoreboard_image = NULL; } -API_EXPORT(int) ap_exists_scoreboard_image(void) +AP_DECLARE(int) ap_exists_scoreboard_image(void) { return (ap_scoreboard_image ? 1 : 0); } diff --git a/server/mpm/mpmt_beos/scoreboard.h b/server/mpm/mpmt_beos/scoreboard.h index cf1bbce14c..084fb9b3a8 100644 --- a/server/mpm/mpmt_beos/scoreboard.h +++ b/server/mpm/mpmt_beos/scoreboard.h @@ -66,14 +66,14 @@ extern "C" { #include <sys/times.h> #include "mpm_default.h" /* For HARD_.*_LIMIT */ -API_EXPORT(int) ap_exists_scoreboard_image(void); +AP_DECLARE(int) ap_exists_scoreboard_image(void); void reinit_scoareboard(apr_pool_t *p); void cleanup_scoreboard(void); void ap_mpmt_beos_set_maintain_connection_status(int flag); void ap_mpmt_beos_force_reset_connection_status(long conn_id); void reinit_scoreboard(apr_pool_t *p); void update_scoreboard_global(void); -API_EXPORT(int) find_child_by_pid(int pid); +AP_DECLARE(int) find_child_by_pid(int pid); int ap_update_child_status(int child_num, int thread_num, int status, request_rec *r); void ap_time_process_request(int child_num, int thread_num, int status); diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index c3c2652850..83e933603f 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -94,13 +94,13 @@ int ap_threads_per_child=0; /* Worker threads per child */ int ap_max_requests_per_child=0; static const char *ap_pid_fname=NULL; -API_VAR_EXPORT const char *ap_scoreboard_fname=NULL; +AP_DECLARE_DATA const char *ap_scoreboard_fname=NULL; static int ap_daemons_to_start=0; static int min_spare_threads=0; static int max_spare_threads=0; static int ap_daemons_limit=0; static time_t ap_restart_time=0; -API_VAR_EXPORT int ap_extended_status = 0; +AP_DECLARE_DATA int ap_extended_status = 0; static int workers_may_exit = 0; static int requests_this_child; static int num_listensocks = 0; @@ -168,7 +168,7 @@ static const char *lock_fname; #define SAFE_ACCEPT(stmt) (stmt) #endif -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return ap_max_daemons_limit; } @@ -1411,7 +1411,7 @@ AP_INIT_TAKE1("CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, { NULL } }; -module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = { +module AP_MODULE_DECLARE_DATA mpm_mpmt_pthread_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/mpmt_pthread/scoreboard.c b/server/mpm/mpmt_pthread/scoreboard.c index 72ee596674..62cd5c905c 100644 --- a/server/mpm/mpmt_pthread/scoreboard.c +++ b/server/mpm/mpmt_pthread/scoreboard.c @@ -157,7 +157,7 @@ apr_inline void ap_sync_scoreboard_image(void) { } -API_EXPORT(int) ap_exists_scoreboard_image(void) +AP_DECLARE(int) ap_exists_scoreboard_image(void) { return (ap_scoreboard_image ? 1 : 0); } @@ -206,7 +206,7 @@ void increment_counts(int child_num, int thread_num, request_rec *r) } -API_EXPORT(int) find_child_by_pid(apr_proc_t *pid) +AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid) { int i; int max_daemons_limit = ap_get_max_daemons(); diff --git a/server/mpm/mpmt_pthread/scoreboard.h b/server/mpm/mpmt_pthread/scoreboard.h index ee57443f1c..b67b2ae33e 100644 --- a/server/mpm/mpmt_pthread/scoreboard.h +++ b/server/mpm/mpmt_pthread/scoreboard.h @@ -209,26 +209,26 @@ typedef struct { #define SCOREBOARD_FRAMES SCOREBOARD_SIZE/4095 + 1 #endif -API_EXPORT(int) ap_exists_scoreboard_image(void); +AP_DECLARE(int) ap_exists_scoreboard_image(void); void reinit_scoreboard(apr_pool_t *p); apr_status_t ap_cleanup_shared_mem(void *d); -API_EXPORT(void) ap_sync_scoreboard_image(void); +AP_DECLARE(void) ap_sync_scoreboard_image(void); void ap_mpmt_pthread_force_reset_connection_status(long conn_id); -API_EXPORT(void) reopen_scoreboard(apr_pool_t *p); +AP_DECLARE(void) reopen_scoreboard(apr_pool_t *p); apr_inline void ap_sync_scoreboard_image(void); void increment_counts(int child_num, int thread_num, request_rec *r); void update_scoreboard_global(void); -API_EXPORT(int) find_child_by_pid(apr_proc_t *pid); +AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid); int ap_update_child_status(int child_num, int thread_num, int status, request_rec *r); 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 const char *ap_scoreboard_fname; +AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image; +AP_DECLARE_DATA extern const char *ap_scoreboard_fname; -API_VAR_EXPORT extern ap_generation_t volatile ap_my_generation; +AP_DECLARE_DATA extern ap_generation_t volatile ap_my_generation; /* for time_process_request() in http_main.c */ #define START_PREQUEST 1 diff --git a/server/mpm/perchild/perchild.c b/server/mpm/perchild/perchild.c index f62b737873..dc77a38434 100644 --- a/server/mpm/perchild/perchild.c +++ b/server/mpm/perchild/perchild.c @@ -107,7 +107,7 @@ static int max_spare_threads = 0; static int max_threads = 0; static int max_requests_per_child = 0; static const char *ap_pid_fname=NULL; -API_VAR_EXPORT const char *ap_scoreboard_fname=NULL; +AP_DECLARE_DATA const char *ap_scoreboard_fname=NULL; static int num_daemons=0; static int curr_child_num=0; static int workers_may_exit = 0; @@ -153,7 +153,7 @@ int ap_max_daemons_limit = -1; char ap_coredump_dir[MAX_STRING_LEN]; -module MODULE_VAR_EXPORT mpm_perchild_module; +module AP_MODULE_DECLARE_DATA mpm_perchild_module; static apr_file_t *pipe_of_death_in = NULL; static apr_file_t *pipe_of_death_out = NULL; @@ -208,7 +208,7 @@ static apr_lock_t *process_accept_mutex; static const char *lock_fname; static pthread_mutex_t thread_accept_mutex = PTHREAD_MUTEX_INITIALIZER; -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return ap_max_daemons_limit; } @@ -1754,7 +1754,7 @@ static void *perchild_create_config(apr_pool_t *p, server_rec *s) return c; } -module MODULE_VAR_EXPORT mpm_perchild_module = { +module AP_MODULE_DECLARE_DATA mpm_perchild_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/perchild/scoreboard.h b/server/mpm/perchild/scoreboard.h index ded7cdce72..a610f19e40 100644 --- a/server/mpm/perchild/scoreboard.h +++ b/server/mpm/perchild/scoreboard.h @@ -74,7 +74,7 @@ extern "C" { /* The generic shared memory chunk code */ void reinit_scoreboard(apr_pool_t *p); -API_EXPORT(void) reopen_scoreboard(apr_pool_t *p); +AP_DECLARE(void) reopen_scoreboard(apr_pool_t *p); /* The stuff for perchild's status table */ @@ -98,7 +98,7 @@ typedef struct { #define SCOREBOARD_SIZE sizeof(scoreboard) -API_VAR_EXPORT extern const char *ap_scoreboard_fname; +AP_DECLARE_DATA extern const char *ap_scoreboard_fname; apr_status_t ap_cleanup_shared_mem(void *d); #ifdef __cplusplus diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 0977392bb3..fb47243472 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -190,7 +190,7 @@ int tpf_child = 0; char tpf_server_name[INETD_SERVNAME_LENGTH+1]; #endif /* TPF */ -API_VAR_EXPORT scoreboard *ap_scoreboard_image = NULL; +AP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL; static new_scoreboard *ap_new_scoreboard_image = NULL; #ifdef GPROF @@ -381,12 +381,12 @@ apr_inline void ap_sync_scoreboard_image(void) #endif } -API_EXPORT(int) ap_exists_scoreboard_image(void) +AP_DECLARE(int) ap_exists_scoreboard_image(void) { return (ap_scoreboard_image ? 1 : 0); } -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return ap_max_daemons_limit; } @@ -1855,7 +1855,7 @@ AP_INIT_TAKE1("CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, { NULL } }; -module MODULE_VAR_EXPORT mpm_prefork_module = { +module AP_MODULE_DECLARE_DATA mpm_prefork_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/prefork/scoreboard.h b/server/mpm/prefork/scoreboard.h index 97ed8e8413..002a75e2c2 100644 --- a/server/mpm/prefork/scoreboard.h +++ b/server/mpm/prefork/scoreboard.h @@ -206,12 +206,12 @@ typedef struct { #define SCOREBOARD_FRAMES SCOREBOARD_SIZE/4095 + 1 #endif -API_EXPORT(void) ap_sync_scoreboard_image(void); -API_EXPORT(int) ap_exists_scoreboard_image(void); +AP_DECLARE(void) ap_sync_scoreboard_image(void); +AP_DECLARE(int) ap_exists_scoreboard_image(void); -API_VAR_EXPORT extern scoreboard *ap_scoreboard_image; +AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image; -API_VAR_EXPORT extern ap_generation_t volatile ap_my_generation; +AP_DECLARE_DATA extern ap_generation_t volatile ap_my_generation; /* for time_process_request() in http_main.c */ #define START_PREQUEST 1 diff --git a/server/mpm/spmt_os2/scoreboard.h b/server/mpm/spmt_os2/scoreboard.h index 5ef4c4d1fe..595172662c 100644 --- a/server/mpm/spmt_os2/scoreboard.h +++ b/server/mpm/spmt_os2/scoreboard.h @@ -188,9 +188,9 @@ typedef struct { #define SCOREBOARD_FRAMES SCOREBOARD_SIZE/4095 + 1 #endif -API_EXPORT(int) ap_exists_scoreboard_image(void); +AP_DECLARE(int) ap_exists_scoreboard_image(void); -API_VAR_EXPORT extern scoreboard *ap_scoreboard_image; +AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image; /* for time_process_request() in http_main.c */ diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index 33fa3f6e74..6dffe0c1be 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -234,12 +234,12 @@ static void accept_mutex_off(void) #define SAFE_ACCEPT(stmt) do {stmt;} while(0) #endif -API_EXPORT(int) ap_exists_scoreboard_image(void) +AP_DECLARE(int) ap_exists_scoreboard_image(void) { return (ap_scoreboard_image ? 1 : 0); } -API_EXPORT(int) ap_get_max_daemons(void) +AP_DECLARE(int) ap_get_max_daemons(void) { return max_daemons_limit; } @@ -685,7 +685,7 @@ static void set_signals(void) * Child process main loop. */ -API_EXPORT(void) ap_child_terminate(request_rec *r) +AP_DECLARE(void) ap_child_terminate(request_rec *r) { r->connection->keepalive = 0; ap_scoreboard_image->parent[THREAD_GLOBAL(child_num)].deferred_die = 1; @@ -1541,13 +1541,13 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) /* Stub functions until this MPM supports the connection status API */ -API_EXPORT(void) ap_update_connection_status(long conn_id, const char *key, \ +AP_DECLARE(void) ap_update_connection_status(long conn_id, const char *key, \ const char *value) { /* NOP */ } -API_EXPORT(void) ap_reset_connection_status(long conn_id) +AP_DECLARE(void) ap_reset_connection_status(long conn_id) { /* NOP */ } @@ -1571,7 +1571,7 @@ LISTEN_COMMANDS { NULL } }; -module MODULE_VAR_EXPORT mpm_spmt_os2_module = { +module AP_MODULE_DECLARE_DATA mpm_spmt_os2_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index f75653c49b..6b34a3609a 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -331,17 +331,17 @@ void signal_parent(int type) static int volatile is_graceful = 0; -API_EXPORT(int) ap_graceful_stop_signalled(void) +AP_DECLARE(int) ap_graceful_stop_signalled(void) { return is_graceful; } -API_EXPORT(void) ap_start_shutdown(void) +AP_DECLARE(void) ap_start_shutdown(void) { signal_parent(0); } -API_EXPORT(void) ap_start_restart(int gracefully) +AP_DECLARE(void) ap_start_restart(int gracefully) { is_graceful = gracefully; signal_parent(1); @@ -2182,7 +2182,7 @@ static void winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *p } } -API_EXPORT(int) ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s ) +AP_DECLARE(int) ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s ) { static int restart = 0; /* Default is "not a restart" */ @@ -2307,18 +2307,18 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) /* Stub functions until this MPM supports the connection status API */ -API_EXPORT(void) ap_update_connection_status(long conn_id, const char *key, \ +AP_DECLARE(void) ap_update_connection_status(long conn_id, const char *key, \ const char *value) { /* NOP */ } -API_EXPORT(void) ap_reset_connection_status(long conn_id) +AP_DECLARE(void) ap_reset_connection_status(long conn_id) { /* NOP */ } -API_EXPORT(apr_array_header_t *) ap_get_status_table(apr_pool_t *p) +AP_DECLARE(apr_array_header_t *) ap_get_status_table(apr_pool_t *p) { /* NOP */ return NULL; @@ -2337,7 +2337,7 @@ LISTEN_COMMANDS { NULL } }; -MODULE_VAR_EXPORT module mpm_winnt_module = { +AP_MODULE_DECLARE_DATA module mpm_winnt_module = { MPM20_MODULE_STUFF, winnt_rewrite_args, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h index ac39d24796..8f9d1eb741 100644 --- a/server/mpm/winnt/mpm_winnt.h +++ b/server/mpm/winnt/mpm_winnt.h @@ -119,8 +119,8 @@ extern int ap_max_requests_per_child; extern int ap_extended_status; extern void clean_child_exit(int); -API_EXPORT(void) ap_start_shutdown(void); -API_EXPORT(void) ap_start_restart(int gracefully); +AP_DECLARE(void) ap_start_shutdown(void); +AP_DECLARE(void) ap_start_restart(int gracefully); void setup_signal_names(char *prefix); void signal_parent(int type); diff --git a/server/util.c b/server/util.c index 6f102fd848..115d8b2f27 100644 --- a/server/util.c +++ b/server/util.c @@ -126,7 +126,7 @@ * Examine a field value (such as a media-/content-type) string and return * it sans any parameters; e.g., strip off any ';charset=foo' and the like. */ -API_EXPORT(char *) ap_field_noparam(apr_pool_t *p, const char *intype) +AP_DECLARE(char *) ap_field_noparam(apr_pool_t *p, const char *intype) { const char *semi; @@ -144,7 +144,7 @@ API_EXPORT(char *) ap_field_noparam(apr_pool_t *p, const char *intype) } } -API_EXPORT(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt) +AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt) { apr_size_t retcode; char ts[MAX_STRING_LEN]; @@ -209,7 +209,7 @@ API_EXPORT(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int * Based loosely on sections of wildmat.c by Rich Salz * Hmmm... shouldn't this really go component by component? */ -API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp) +AP_DECLARE(int) ap_strcmp_match(const char *str, const char *exp) { int x, y; @@ -233,7 +233,7 @@ API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp) return (str[x] != '\0'); } -API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp) +AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *exp) { int x, y; @@ -257,7 +257,7 @@ API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp) return (str[x] != '\0'); } -API_EXPORT(int) ap_is_matchexp(const char *str) +AP_DECLARE(int) ap_is_matchexp(const char *str) { register int x; @@ -281,7 +281,7 @@ static apr_status_t regex_cleanup(void *preg) return APR_SUCCESS; } -API_EXPORT(regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern, +AP_DECLARE(regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern, int cflags) { regex_t *preg = apr_palloc(p, sizeof(regex_t)); @@ -295,7 +295,7 @@ API_EXPORT(regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern, return preg; } -API_EXPORT(void) ap_pregfree(apr_pool_t *p, regex_t * reg) +AP_DECLARE(void) ap_pregfree(apr_pool_t *p, regex_t * reg) { regfree(reg); apr_kill_cleanup(p, (void *) reg, regex_cleanup); @@ -305,7 +305,7 @@ API_EXPORT(void) ap_pregfree(apr_pool_t *p, regex_t * reg) * Similar to standard strstr() but we ignore case in this version. * Based on the strstr() implementation further below. */ -API_EXPORT(char *) ap_strcasestr(const char *s1, const char *s2) +AP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2) { char *p1, *p2; if (*s2 == '\0') { @@ -342,7 +342,7 @@ API_EXPORT(char *) ap_strcasestr(const char *s1, const char *s2) * can use standard pointer comparisons in the calling function * (eg: test if ap_stripprefix(a,b) == a) */ -API_EXPORT(char *) ap_stripprefix(const char *bigstring, const char *prefix) +AP_DECLARE(char *) ap_stripprefix(const char *bigstring, const char *prefix) { char *p1; if (*prefix == '\0') { @@ -365,13 +365,13 @@ API_EXPORT(char *) ap_stripprefix(const char *bigstring, const char *prefix) * This is especially important for the DSO situations of modules. * DO NOT MAKE A MACRO OUT OF THIS FUNCTION! */ -API_EXPORT(int) ap_regexec(regex_t *preg, const char *string, +AP_DECLARE(int) ap_regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) { return regexec(preg, string, nmatch, pmatch, eflags); } -API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) +AP_DECLARE(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) { return regerror(errcode, preg, errbuf, errbuf_size); } @@ -391,7 +391,7 @@ API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, s * AT&T V8 regexp package. */ -API_EXPORT(char *) ap_pregsub(apr_pool_t *p, const char *input, const char *source, +AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[]) { const char *src = input; @@ -462,7 +462,7 @@ API_EXPORT(char *) ap_pregsub(apr_pool_t *p, const char *input, const char *sour /* * Parse .. so we don't compromise security */ -API_EXPORT(void) ap_getparents(char *name) +AP_DECLARE(void) ap_getparents(char *name) { int l, w; @@ -523,7 +523,7 @@ API_EXPORT(void) ap_getparents(char *name) } } -API_EXPORT(void) ap_no2slash(char *name) +AP_DECLARE(void) ap_no2slash(char *name) { char *d, *s; @@ -566,7 +566,7 @@ API_EXPORT(void) ap_no2slash(char *name) * /a/b, 3 ==> /a/b/ * /a/b, 4 ==> /a/b/ */ -API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n) +AP_DECLARE(char *) ap_make_dirstr_prefix(char *d, const char *s, int n) { #if defined(HAVE_DRIVE_LETTERS) || defined(NETWARE) if (!n) { @@ -591,7 +591,7 @@ API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n) /* * return the parent directory name including trailing / of the file s */ -API_EXPORT(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s) +AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s) { const char *last_slash = ap_strrchr_c(s, '/'); char *d; @@ -609,7 +609,7 @@ API_EXPORT(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s) } -API_EXPORT(int) ap_count_dirs(const char *path) +AP_DECLARE(int) ap_count_dirs(const char *path) { register int x, n; @@ -620,7 +620,7 @@ API_EXPORT(int) ap_count_dirs(const char *path) } -API_EXPORT(void) ap_chdir_file(const char *file) +AP_DECLARE(void) ap_chdir_file(const char *file) { const char *x; char buf[HUGE_STRING_LEN]; @@ -638,12 +638,12 @@ API_EXPORT(void) ap_chdir_file(const char *file) * error... ah well. */ } -API_EXPORT(char *) ap_getword_nc(apr_pool_t *atrans, char **line, char stop) +AP_DECLARE(char *) ap_getword_nc(apr_pool_t *atrans, char **line, char stop) { return ap_getword(atrans, (const char **) line, stop); } -API_EXPORT(char *) ap_getword(apr_pool_t *atrans, const char **line, char stop) +AP_DECLARE(char *) ap_getword(apr_pool_t *atrans, const char **line, char stop) { const char *pos = ap_strchr_c(*line, stop); char *res; @@ -665,12 +665,12 @@ API_EXPORT(char *) ap_getword(apr_pool_t *atrans, const char **line, char stop) return res; } -API_EXPORT(char *) ap_getword_white_nc(apr_pool_t *atrans, char **line) +AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *atrans, char **line) { return ap_getword_white(atrans, (const char **) line); } -API_EXPORT(char *) ap_getword_white(apr_pool_t *atrans, const char **line) +AP_DECLARE(char *) ap_getword_white(apr_pool_t *atrans, const char **line) { int pos = -1, x; char *res; @@ -699,12 +699,12 @@ API_EXPORT(char *) ap_getword_white(apr_pool_t *atrans, const char **line) return res; } -API_EXPORT(char *) ap_getword_nulls_nc(apr_pool_t *atrans, char **line, char stop) +AP_DECLARE(char *) ap_getword_nulls_nc(apr_pool_t *atrans, char **line, char stop) { return ap_getword_nulls(atrans, (const char **) line, stop); } -API_EXPORT(char *) ap_getword_nulls(apr_pool_t *atrans, const char **line, char stop) +AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *atrans, const char **line, char stop) { const char *pos = ap_strchr_c(*line, stop); char *res; @@ -750,12 +750,12 @@ static char *substring_conf(apr_pool_t *p, const char *start, int len, char quot #endif } -API_EXPORT(char *) ap_getword_conf_nc(apr_pool_t *p, char **line) +AP_DECLARE(char *) ap_getword_conf_nc(apr_pool_t *p, char **line) { return ap_getword_conf(p, (const char **) line); } -API_EXPORT(char *) ap_getword_conf(apr_pool_t *p, const char **line) +AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line) { const char *str = *line, *strend; char *res; @@ -802,7 +802,7 @@ API_EXPORT(char *) ap_getword_conf(apr_pool_t *p, const char **line) * environment value does not exist, leave the ${ENV} * construct alone; it means something else. */ -API_EXPORT(const char *) ap_resolve_env(apr_pool_t *p, const char * word) +AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word) { char tmp[ MAX_STRING_LEN ]; const char *s, *e; @@ -835,7 +835,7 @@ API_EXPORT(const char *) ap_resolve_env(apr_pool_t *p, const char * word) return apr_pstrdup(p,tmp); } -API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp) +AP_DECLARE(int) ap_cfg_closefile(configfile_t *cfp) { #ifdef DEBUG ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, @@ -868,7 +868,7 @@ static void *cfg_getstr(void *buf, size_t bufsiz, void *param) } /* Open a configfile_t as FILE, return open configfile_t struct pointer */ -API_EXPORT(apr_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, apr_pool_t *p, const char *name) +AP_DECLARE(apr_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, apr_pool_t *p, const char *name) { configfile_t *new_cfg; apr_file_t *file = NULL; @@ -933,7 +933,7 @@ API_EXPORT(apr_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, apr_pool_t *p, /* Allocate a configfile_t handle with user defined functions and params */ -API_EXPORT(configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *descr, +AP_DECLARE(configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *descr, void *param, int(*getch)(void *param), void *(*getstr) (void *buf, size_t bufsiz, void *param), @@ -954,7 +954,7 @@ API_EXPORT(configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *descr, /* Read one character from a configfile_t */ -API_EXPORT(int) ap_cfg_getc(configfile_t *cfp) +AP_DECLARE(int) ap_cfg_getc(configfile_t *cfp) { register int ch = cfp->getch(cfp->param); if (ch == LF) @@ -965,7 +965,7 @@ API_EXPORT(int) ap_cfg_getc(configfile_t *cfp) /* Read one line from open configfile_t, strip LF, increase line number */ /* If custom handler does not define a getstr() function, read char by char */ -API_EXPORT(int) ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp) +AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp) { /* If a "get string" function is defined, use it */ if (cfp->getstr != NULL) { @@ -1104,7 +1104,7 @@ API_EXPORT(int) ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp) * of field is shifted to the next non-comma, non-whitespace character. * len is the length of the item excluding any beginning whitespace. */ -API_EXPORT(const char *) ap_size_list_item(const char **field, int *len) +AP_DECLARE(const char *) ap_size_list_item(const char **field, int *len) { const unsigned char *ptr = (const unsigned char *)*field; const unsigned char *token; @@ -1164,7 +1164,7 @@ API_EXPORT(const char *) ap_size_list_item(const char **field, int *len) * the converted list item (or NULL if none) and the address pointed to by * field is shifted to the next non-comma, non-whitespace. */ -API_EXPORT(char *) ap_get_list_item(apr_pool_t *p, const char **field) +AP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field) { const char *tok_start; const unsigned char *ptr; @@ -1253,7 +1253,7 @@ API_EXPORT(char *) ap_get_list_item(apr_pool_t *p, const char **field) * This would be much more efficient if we stored header fields as * an array of list items as they are received instead of a plain string. */ -API_EXPORT(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *tok) +AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *tok) { const unsigned char *pos; const unsigned char *ptr = (const unsigned char *)line; @@ -1356,7 +1356,7 @@ API_EXPORT(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *t * by whitespace at the caller's option. */ -API_EXPORT(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white) +AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white) { const char *ptr = *accept_line; const char *tok_start; @@ -1396,7 +1396,7 @@ API_EXPORT(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int acc /* find http tokens, see the definition of token from RFC2068 */ -API_EXPORT(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok) +AP_DECLARE(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok) { const unsigned char *start_token; const unsigned char *s; @@ -1430,7 +1430,7 @@ API_EXPORT(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok) } -API_EXPORT(int) ap_find_last_token(apr_pool_t *p, const char *line, const char *tok) +AP_DECLARE(int) ap_find_last_token(apr_pool_t *p, const char *line, const char *tok) { int llen, tlen, lidx; @@ -1448,7 +1448,7 @@ API_EXPORT(int) ap_find_last_token(apr_pool_t *p, const char *line, const char * return (strncasecmp(&line[lidx], tok, tlen) == 0); } -API_EXPORT(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *str) +AP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *str) { char *cmd; unsigned char *d; @@ -1508,7 +1508,7 @@ static char x2c(const char *what) * decoding %2f -> / (a special character) * returns HTTP_NOT_FOUND */ -API_EXPORT(int) ap_unescape_url(char *url) +AP_DECLARE(int) ap_unescape_url(char *url) { register int badesc, badpath; char *x, *y; @@ -1546,7 +1546,7 @@ API_EXPORT(int) ap_unescape_url(char *url) return OK; } -API_EXPORT(char *) ap_construct_server(apr_pool_t *p, const char *hostname, +AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname, unsigned port, const request_rec *r) { if (ap_is_default_port(port, r)) @@ -1594,7 +1594,7 @@ static apr_inline unsigned char *c2x(unsigned what, unsigned char *where) * something with a '/' in it (and thus does not prefix "./"). */ -API_EXPORT(char *) ap_escape_path_segment(apr_pool_t *p, const char *segment) +AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *segment) { char *copy = apr_palloc(p, 3 * strlen(segment) + 1); const unsigned char *s = (const unsigned char *)segment; @@ -1614,7 +1614,7 @@ API_EXPORT(char *) ap_escape_path_segment(apr_pool_t *p, const char *segment) return copy; } -API_EXPORT(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial) +AP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial) { char *copy = apr_palloc(p, 3 * strlen(path) + 3); const unsigned char *s = (const unsigned char *)path; @@ -1645,7 +1645,7 @@ API_EXPORT(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partia /* ap_escape_uri is now a macro for os_escape_path */ -API_EXPORT(char *) ap_escape_html(apr_pool_t *p, const char *s) +AP_DECLARE(char *) ap_escape_html(apr_pool_t *p, const char *s) { int i, j; char *x; @@ -1681,7 +1681,7 @@ API_EXPORT(char *) ap_escape_html(apr_pool_t *p, const char *s) return x; } -API_EXPORT(int) ap_is_directory(const char *path) +AP_DECLARE(int) ap_is_directory(const char *path) { apr_finfo_t finfo; @@ -1691,7 +1691,7 @@ API_EXPORT(int) ap_is_directory(const char *path) return (finfo.filetype == APR_DIR); } -API_EXPORT(int) ap_is_rdirectory(const char *path) +AP_DECLARE(int) ap_is_rdirectory(const char *path) { apr_finfo_t finfo; @@ -1701,7 +1701,7 @@ API_EXPORT(int) ap_is_rdirectory(const char *path) return (finfo.filetype == APR_DIR); } -API_EXPORT(char *) ap_make_full_path(apr_pool_t *a, const char *src1, +AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *src1, const char *src2) { register int x; @@ -1719,7 +1719,7 @@ API_EXPORT(char *) ap_make_full_path(apr_pool_t *a, const char *src1, /* * Check for an absoluteURI syntax (see section 3.2 in RFC2068). */ -API_EXPORT(int) ap_is_url(const char *u) +AP_DECLARE(int) ap_is_url(const char *u) { register int x; @@ -1765,7 +1765,7 @@ int initgroups(const char *name, gid_t basegid) } #endif /* def NEED_INITGROUPS */ -API_EXPORT(int) ap_ind(const char *s, char c) +AP_DECLARE(int) ap_ind(const char *s, char c) { register int x; @@ -1776,7 +1776,7 @@ API_EXPORT(int) ap_ind(const char *s, char c) return -1; } -API_EXPORT(int) ap_rind(const char *s, char c) +AP_DECLARE(int) ap_rind(const char *s, char c) { register int x; @@ -1787,7 +1787,7 @@ API_EXPORT(int) ap_rind(const char *s, char c) return -1; } -API_EXPORT(void) ap_str_tolower(char *str) +AP_DECLARE(void) ap_str_tolower(char *str) { while (*str) { *str = apr_tolower(*str); @@ -1795,7 +1795,7 @@ API_EXPORT(void) ap_str_tolower(char *str) } } -API_EXPORT(uid_t) ap_uname2id(const char *name) +AP_DECLARE(uid_t) ap_uname2id(const char *name) { #ifdef WIN32 return (1); @@ -1813,7 +1813,7 @@ API_EXPORT(uid_t) ap_uname2id(const char *name) #endif } -API_EXPORT(gid_t) ap_gname2id(const char *name) +AP_DECLARE(gid_t) ap_gname2id(const char *name) { #ifdef WIN32 return (1); @@ -1950,7 +1950,7 @@ char *ap_get_local_host(apr_pool_t *a) /* simple 'pool' alloc()ing glue to ap_base64.c */ -API_EXPORT(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded) +AP_DECLARE(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded) { char *decoded; int l; @@ -1962,7 +1962,7 @@ API_EXPORT(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded) return decoded; } -API_EXPORT(char *) ap_pbase64encode(apr_pool_t *p, char *string) +AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string) { char *encoded; int l = strlen(string); @@ -1981,7 +1981,7 @@ API_EXPORT(char *) ap_pbase64encode(apr_pool_t *p, char *string) * also need to compress spaces and such to be able to compare * properly. -djg */ -API_EXPORT(void) ap_content_type_tolower(char *str) +AP_DECLARE(void) ap_content_type_tolower(char *str) { char *semi; @@ -2001,7 +2001,7 @@ API_EXPORT(void) ap_content_type_tolower(char *str) /* * Given a string, replace any bare " with \" . */ -API_EXPORT(char *) ap_escape_quotes (apr_pool_t *p, const char *instring) +AP_DECLARE(char *) ap_escape_quotes (apr_pool_t *p, const char *instring) { int newlen = 0; const char *inchr = instring; diff --git a/server/util_charset.c b/server/util_charset.c index 106d1306d4..c8d77ca8cf 100644 --- a/server/util_charset.c +++ b/server/util_charset.c @@ -96,7 +96,7 @@ apr_xlate_t *ap_hdrs_to_ascii, *ap_hdrs_from_ascii; apr_xlate_t *ap_locale_to_ascii, *ap_locale_from_ascii; -API_EXPORT(apr_status_t) ap_set_content_xlate(request_rec *r, int output, +AP_DECLARE(apr_status_t) ap_set_content_xlate(request_rec *r, int output, apr_xlate_t *xlate) { apr_status_t rv; diff --git a/server/util_date.c b/server/util_date.c index c79f60533f..3967a6c02f 100644 --- a/server/util_date.c +++ b/server/util_date.c @@ -89,7 +89,7 @@ * * - swallow remaining characters * <x> - exact match for any other character */ -API_EXPORT(int) ap_checkmask(const char *data, const char *mask) +AP_DECLARE(int) ap_checkmask(const char *data, const char *mask) { int i; char d; @@ -180,7 +180,7 @@ API_EXPORT(int) ap_checkmask(const char *data, const char *mask) * but many changes since then. * */ -API_EXPORT(apr_time_t) ap_parseHTTPdate(const char *date) +AP_DECLARE(apr_time_t) ap_parseHTTPdate(const char *date) { apr_exploded_time_t ds; apr_time_t result; diff --git a/server/util_filter.c b/server/util_filter.c index be4986d514..41bcb84fc6 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -102,7 +102,7 @@ static void register_filter(const char *name, apr_register_cleanup(FILTER_POOL, NULL, filter_cleanup, apr_null_cleanup); } -API_EXPORT(void) ap_register_input_filter(const char *name, +AP_DECLARE(void) ap_register_input_filter(const char *name, ap_in_filter_func filter_func, ap_filter_type ftype) { @@ -112,7 +112,7 @@ API_EXPORT(void) ap_register_input_filter(const char *name, ®istered_input_filters); } -API_EXPORT(void) ap_register_output_filter(const char *name, +AP_DECLARE(void) ap_register_output_filter(const char *name, ap_out_filter_func filter_func, ap_filter_type ftype) { @@ -122,7 +122,7 @@ API_EXPORT(void) ap_register_output_filter(const char *name, ®istered_output_filters); } -API_EXPORT(void) ap_add_input_filter(const char *name, void *ctx, +AP_DECLARE(void) ap_add_input_filter(const char *name, void *ctx, request_rec *r, conn_rec *c) { ap_filter_rec_t *frec = registered_input_filters; @@ -155,7 +155,7 @@ API_EXPORT(void) ap_add_input_filter(const char *name, void *ctx, } } -API_EXPORT(void) ap_add_output_filter(const char *name, void *ctx, +AP_DECLARE(void) ap_add_output_filter(const char *name, void *ctx, request_rec *r, conn_rec *c) { ap_filter_rec_t *frec = registered_output_filters; @@ -195,7 +195,7 @@ API_EXPORT(void) ap_add_output_filter(const char *name, void *ctx, * save data off to the side should probably create their own temporary * brigade especially for that use. */ -API_EXPORT(apr_status_t) ap_get_brigade(ap_filter_t *next, +AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *next, ap_bucket_brigade *bb, apr_ssize_t length) { if (next) { @@ -209,7 +209,7 @@ API_EXPORT(apr_status_t) ap_get_brigade(ap_filter_t *next, * the current filter. At that point, we can just call the first filter in * the stack, or r->output_filters. */ -API_EXPORT(apr_status_t) ap_pass_brigade(ap_filter_t *next, ap_bucket_brigade *bb) +AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *next, ap_bucket_brigade *bb) { if (next) { ap_bucket *e; @@ -221,7 +221,7 @@ API_EXPORT(apr_status_t) ap_pass_brigade(ap_filter_t *next, ap_bucket_brigade *b return AP_NOBODY_WROTE; } -API_EXPORT(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **saveto, +AP_DECLARE(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **saveto, ap_bucket_brigade **b) { ap_bucket *e; diff --git a/server/util_md5.c b/server/util_md5.c index f7e3945f06..47adc7c037 100644 --- a/server/util_md5.c +++ b/server/util_md5.c @@ -92,7 +92,7 @@ #include "util_md5.h" #include "util_ebcdic.h" -API_EXPORT(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int length) +AP_DECLARE(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int length) { const char *hex = "0123456789abcdef"; apr_md5_ctx_t my_md5; @@ -120,7 +120,7 @@ API_EXPORT(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int le return apr_pstrdup(p, result); } -API_EXPORT(char *) ap_md5(apr_pool_t *p, const unsigned char *string) +AP_DECLARE(char *) ap_md5(apr_pool_t *p, const unsigned char *string) { return ap_md5_binary(p, string, (int) strlen((char *)string)); } @@ -170,7 +170,7 @@ API_EXPORT(char *) ap_md5(apr_pool_t *p, const unsigned char *string) static char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -API_EXPORT(char *) ap_md5contextTo64(apr_pool_t *a, apr_md5_ctx_t *context) +AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *a, apr_md5_ctx_t *context) { unsigned char digest[18]; char *encodedDigest; @@ -197,7 +197,7 @@ API_EXPORT(char *) ap_md5contextTo64(apr_pool_t *a, apr_md5_ctx_t *context) #ifdef APACHE_XLATE -API_EXPORT(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile, +AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile, apr_xlate_t *xlate) { apr_md5_ctx_t context; @@ -221,7 +221,7 @@ API_EXPORT(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile, #else -API_EXPORT(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile) +AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile) { apr_md5_ctx_t context; unsigned char buf[1000]; diff --git a/server/util_script.c b/server/util_script.c index a988f932a5..e4d26e9065 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -114,7 +114,7 @@ static char *http2env(apr_pool_t *a, char *w) return res; } -API_EXPORT(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t) +AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t) { apr_array_header_t *env_arr = apr_table_elts(t); apr_table_entry_t *elts = (apr_table_entry_t *) env_arr->elts; @@ -152,7 +152,7 @@ API_EXPORT(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t) return env; } -API_EXPORT(void) ap_add_common_vars(request_rec *r) +AP_DECLARE(void) ap_add_common_vars(request_rec *r) { apr_table_t *e; server_rec *s = r->server; @@ -289,7 +289,7 @@ API_EXPORT(void) ap_add_common_vars(request_rec *r) * and find as much of the two that match as possible. */ -API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info) +AP_DECLARE(int) ap_find_path_info(const char *uri, const char *path_info) { int lu = strlen(uri); int lp = strlen(path_info); @@ -334,7 +334,7 @@ static char *original_uri(request_rec *r) return apr_pstrndup(r->pool, first, last - first); } -API_EXPORT(void) ap_add_cgi_vars(request_rec *r) +AP_DECLARE(void) ap_add_cgi_vars(request_rec *r) { apr_table_t *e = r->subprocess_env; @@ -403,7 +403,7 @@ static int set_cookie_doo_doo(void *v, const char *key, const char *val) return 1; } -API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, +AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, int (*getsfunc) (char *, int, void *), void *getsfunc_data) { @@ -589,7 +589,7 @@ static int getsfunc_FILE(char *buf, int len, void *f) return apr_fgets(buf, len, (apr_file_t *) f) == APR_SUCCESS; } -API_EXPORT(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, +AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer) { return ap_scan_script_header_err_core(r, buffer, getsfunc_FILE, f); @@ -633,7 +633,7 @@ static int getsfunc_STRING(char *w, int len, void *pvastrs) * character is returned to **arg, **data. (The first optional arg is * counted as 0.) */ -API_EXPORT_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r, +AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r, char *buffer, const char **termch, int *termarg, ...) @@ -653,7 +653,7 @@ API_EXPORT_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r, return res; } -API_EXPORT(void) ap_send_size(apr_ssize_t size, request_rec *r) +AP_DECLARE(void) ap_send_size(apr_ssize_t size, request_rec *r) { /* XXX: this -1 thing is a gross hack */ if (size == (apr_ssize_t)-1) { diff --git a/server/util_uri.c b/server/util_uri.c index 972bfe1298..71d62dc9d8 100644 --- a/server/util_uri.c +++ b/server/util_uri.c @@ -94,7 +94,7 @@ static schemes_t schemes[] = }; -API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str) +AP_DECLARE(unsigned short) ap_default_port_for_scheme(const char *scheme_str) { schemes_t *scheme; @@ -105,7 +105,7 @@ API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str) return 0; } -API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r) +AP_DECLARE(unsigned short) ap_default_port_for_request(const request_rec *r) { return (r->parsed_uri.scheme) ? ap_default_port_for_scheme(r->parsed_uri.scheme) @@ -116,7 +116,7 @@ API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r) * from a call to gethostbyname() and lives in static storage. * By creating a copy we can tuck it away for later use. */ -API_EXPORT(struct hostent *) ap_pduphostent(apr_pool_t *p, const struct hostent *hp) +AP_DECLARE(struct hostent *) ap_pduphostent(apr_pool_t *p, const struct hostent *hp) { struct hostent *newent; char **ptrs; @@ -169,7 +169,7 @@ API_EXPORT(struct hostent *) ap_pduphostent(apr_pool_t *p, const struct hostent * COPY OF the hostent structure, intended to be stored and used later. * (gethostbyname() uses static storage that would be overwritten on each call) */ -API_EXPORT(struct hostent *) ap_pgethostbyname(apr_pool_t *p, const char *hostname) +AP_DECLARE(struct hostent *) ap_pgethostbyname(apr_pool_t *p, const char *hostname) { struct hostent *hp = gethostbyname(hostname); return (hp == NULL) ? NULL : ap_pduphostent(p, hp); @@ -179,7 +179,7 @@ API_EXPORT(struct hostent *) ap_pgethostbyname(apr_pool_t *p, const char *hostna /* Unparse a uri_components structure to an URI string. * Optionally suppress the password for security reasons. */ -API_EXPORT(char *) ap_unparse_uri_components(apr_pool_t *p, const uri_components *uptr, unsigned flags) +AP_DECLARE(char *) ap_unparse_uri_components(apr_pool_t *p, const uri_components *uptr, unsigned flags) { char *ret = ""; @@ -242,7 +242,7 @@ API_EXPORT(char *) ap_unparse_uri_components(apr_pool_t *p, const uri_components static regex_t re_uri; static regex_t re_hostpart; -API_EXPORT(void) ap_util_uri_init(void) +AP_DECLARE(void) ap_util_uri_init(void) { int ret; const char *re_str; @@ -311,7 +311,7 @@ API_EXPORT(void) ap_util_uri_init(void) * - fills in fields of uri_components *uptr * - none on any of the r->* fields */ -API_EXPORT(int) ap_parse_uri_components(apr_pool_t *p, const char *uri, uri_components *uptr) +AP_DECLARE(int) ap_parse_uri_components(apr_pool_t *p, const char *uri, uri_components *uptr) { int ret; regmatch_t match[10]; /* This must have at least as much elements @@ -440,7 +440,7 @@ API_EXPORT(int) ap_parse_uri_components(apr_pool_t *p, const char *uri, uri_comp #define NOTEND_HOSTINFO (T_SLASH | T_QUESTION | T_HASH | T_NUL) #define NOTEND_PATH (T_QUESTION | T_HASH | T_NUL) -API_EXPORT(void) ap_util_uri_init(void) +AP_DECLARE(void) ap_util_uri_init(void) { /* nothing to do */ } @@ -453,7 +453,7 @@ API_EXPORT(void) ap_util_uri_init(void) * - fills in fields of uri_components *uptr * - none on any of the r->* fields */ -API_EXPORT(int) ap_parse_uri_components(apr_pool_t *p, const char *uri, uri_components *uptr) +AP_DECLARE(int) ap_parse_uri_components(apr_pool_t *p, const char *uri, uri_components *uptr) { const char *s; const char *s1; @@ -577,7 +577,7 @@ deal_with_host: * currently at http://www.mcom.com/newsref/std/tunneling_ssl.html * for the format of the "CONNECT host:port HTTP/1.0" request */ -API_EXPORT(int) ap_parse_hostinfo_components(apr_pool_t *p, const char *hostinfo, uri_components *uptr) +AP_DECLARE(int) ap_parse_hostinfo_components(apr_pool_t *p, const char *hostinfo, uri_components *uptr) { const char *s; char *endstr; diff --git a/server/util_xml.c b/server/util_xml.c index 56b05bb602..58a0fb03b5 100644 --- a/server/util_xml.c +++ b/server/util_xml.c @@ -358,7 +358,7 @@ static void cdata_handler(void *userdata, const char *data, int len) ap_text_append(ctx->p, hdr, s); } -API_EXPORT(int) ap_xml_parse_input(request_rec * r, ap_xml_doc **pdoc) +AP_DECLARE(int) ap_xml_parse_input(request_rec * r, ap_xml_doc **pdoc) { int result; ap_xml_ctx ctx = @@ -474,7 +474,7 @@ API_EXPORT(int) ap_xml_parse_input(request_rec * r, ap_xml_doc **pdoc) return HTTP_BAD_REQUEST; } -API_EXPORT(void) ap_text_append(apr_pool_t * p, ap_text_header *hdr, +AP_DECLARE(void) ap_text_append(apr_pool_t * p, ap_text_header *hdr, const char *text) { ap_text *t = apr_palloc(p, sizeof(*t)); @@ -508,7 +508,7 @@ API_EXPORT(void) ap_text_append(apr_pool_t * p, ap_text_header *hdr, ** quotes is typically set to true for XML strings that will occur within ** double quotes -- attribute values. */ -API_EXPORT(const char *) ap_xml_quote_string(apr_pool_t *p, const char *s, +AP_DECLARE(const char *) ap_xml_quote_string(apr_pool_t *p, const char *s, int quotes) { const char *scan; @@ -781,7 +781,7 @@ static char *write_elem(char *s, const ap_xml_elem *elem, int style, return s; } -API_EXPORT(void) ap_xml_quote_elem(apr_pool_t *p, ap_xml_elem *elem) +AP_DECLARE(void) ap_xml_quote_elem(apr_pool_t *p, ap_xml_elem *elem) { ap_text *scan_txt; ap_xml_attr *scan_attr; @@ -815,7 +815,7 @@ API_EXPORT(void) ap_xml_quote_elem(apr_pool_t *p, ap_xml_elem *elem) } /* convert an element to a text string */ -API_EXPORT(void) ap_xml_to_text(apr_pool_t * p, const ap_xml_elem *elem, +AP_DECLARE(void) ap_xml_to_text(apr_pool_t * p, const ap_xml_elem *elem, int style, apr_array_header_t *namespaces, int *ns_map, const char **pbuf, size_t *psize) { @@ -831,7 +831,7 @@ API_EXPORT(void) ap_xml_to_text(apr_pool_t * p, const ap_xml_elem *elem, *psize = size; } -API_EXPORT(const char *) ap_xml_empty_elem(apr_pool_t * p, +AP_DECLARE(const char *) ap_xml_empty_elem(apr_pool_t * p, const ap_xml_elem *elem) { if (elem->ns == AP_XML_NS_NONE) { @@ -846,7 +846,7 @@ API_EXPORT(const char *) ap_xml_empty_elem(apr_pool_t * p, } /* return the URI's (existing) index, or insert it and return a new index */ -API_EXPORT(int) ap_xml_insert_uri(apr_array_header_t *uri_array, +AP_DECLARE(int) ap_xml_insert_uri(apr_array_header_t *uri_array, const char *uri) { int i; diff --git a/server/vhost.c b/server/vhost.c index 054f6accdf..95c3bb9ef9 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -790,7 +790,7 @@ static int matches_aliases(server_rec *s, const char *host) * we just call it a match. But here we require the host:port to match * the ServerName and/or ServerAliases. */ -API_EXPORT(int) ap_matches_request_vhost(request_rec *r, const char *host, +AP_DECLARE(int) ap_matches_request_vhost(request_rec *r, const char *host, unsigned port) { server_rec *s; |