diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2000-10-16 08:05:15 +0200 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2000-10-16 08:05:15 +0200 |
commit | d6490633ebbf0573107211f2cbd7517dad37a07e (patch) | |
tree | a32c2d84488b7197c9853faafe248ed6f4903ca5 | |
parent | Cleaning up a _Security_ concern - Please Review Carefully (diff) | |
download | apache2-d6490633ebbf0573107211f2cbd7517dad37a07e.tar.xz apache2-d6490633ebbf0573107211f2cbd7517dad37a07e.zip |
Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
All _VAR_ flavors changes to _DATA to be absolutely clear.
Thank you Greg, for the most obvious suggestion.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
103 files changed, 652 insertions, 658 deletions
diff --git a/ApacheCore.dsp b/ApacheCore.dsp index 2e3969b014..76c6f92ab3 100644 --- a/ApacheCore.dsp +++ b/ApacheCore.dsp @@ -42,7 +42,7 @@ CPP=cl.exe RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /I ".\modules\mpm\winnt" /I ".\lib\expat-lite" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo @@ -67,7 +67,7 @@ LIB32=link.exe -lib RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 -# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /I ".\modules\mpm\winnt" /I ".\lib\expat-lite" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo diff --git a/ApacheCoreDll.dsp b/ApacheCoreDll.dsp index 5bb90926d5..7ef454ef7b 100644 --- a/ApacheCoreDll.dsp +++ b/ApacheCoreDll.dsp @@ -42,7 +42,7 @@ RSC=rc.exe # PROP Intermediate_Dir ".\CoreR" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Intermediate_Dir ".\CoreD" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "_DEBUG" /win32 diff --git a/build/MakeEtags b/build/MakeEtags index 25f6bdab17..1b030a3fc0 100755 --- a/build/MakeEtags +++ b/build/MakeEtags @@ -27,7 +27,7 @@ etags=~/local/bin/etags # Exuberant etags is necessary since it can ignore some defined symbols # that obscure the function signatures. -ignore=API_EXPORT,API_EXPORT_NONSTD,__declspec +ignore=AP_DECLARE,AP_DECLARE_NONSTD,__declspec # Create an etags file at the root of the source # tree, then create symbol links to it from each @@ -42,7 +42,7 @@ CPP=cl.exe RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /I ".\modules\mpm\winnt" /I ".\lib\expat-lite" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo @@ -67,7 +67,7 @@ LIB32=link.exe -lib RSC=rc.exe # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 -# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /I ".\modules\mpm\winnt" /I ".\lib\expat-lite" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c BSC32=bscmake.exe # ADD BASE BSC32 /nologo diff --git a/include/ap_config.h b/include/ap_config.h index 96b93f3317..8a093190bb 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -108,12 +108,6 @@ #define AP_DECLARE_DATA __declspec(dllimport) #endif -/* XXX: move to compatibility aliases once the symbol rename is complete - */ -#define API_EXPORT(t) AP_DECLARE(t) -#define API_EXPORT_NONSTD(t) AP_DECLARE_NONSTD(t) -#define API_VAR_EXPORT AP_DECLARE_DATA - #if !defined(WIN32) || defined(AP_MODULE_DECLARE_STATIC) /** * Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA. diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 8b9dbc988e..355fc957d5 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -123,13 +123,13 @@ * content_languages MUST all be lowercase strings, * and MAY NOT be modified in place -- modifications * require pstrdup(). - * 19980317 (1.3b6-dev) - CORE_EXPORTs for win32 and <Perl> + * 19980317 (1.3b6-dev) - AP_CORE_DECLAREs for win32 and <Perl> * API export basic_http_header, send_header_field, * set_keepalive, srm_command_loop, check_cmd_context, * tm2sec * spacetoplus(), plustospace(), client_to_stdout() * removed - * 19980324 (1.3b6-dev) - API_EXPORT(index_of_response) + * 19980324 (1.3b6-dev) - AP_DECLARE(index_of_response) * 19980413 (1.3b6-dev) - The BIG SYMBOL RENAMING: general ap_ prefix * (see src/include/compat.h for more details) * apr_vformatter() API, see src/include/ap.h diff --git a/include/ap_mpm.h b/include/ap_mpm.h index 73c9de0147..174fb0365c 100644 --- a/include/ap_mpm.h +++ b/include/ap_mpm.h @@ -115,7 +115,7 @@ * @return 1 for shutdown 0 otherwise. * @deffunc int ap_mpm_run(apr_pool_t *pconf, apr_pool_t *plog, server_rec *server_conf) */ -API_EXPORT(int) ap_mpm_run(apr_pool_t *pconf, apr_pool_t *plog, server_rec *server_conf); +AP_DECLARE(int) ap_mpm_run(apr_pool_t *pconf, apr_pool_t *plog, server_rec *server_conf); /** * predicate indicating if a graceful stop has been requested ... @@ -123,7 +123,7 @@ API_EXPORT(int) ap_mpm_run(apr_pool_t *pconf, apr_pool_t *plog, server_rec *serv * @return 1 if a graceful stop has been requested, 0 otherwise * @deffunc int ap_graceful_stop_signalled*void) */ -API_EXPORT(int) ap_graceful_stop_signalled(void); +AP_DECLARE(int) ap_graceful_stop_signalled(void); /** * ap_start_shutdown() and ap_start_restart() is a function to initiate @@ -139,6 +139,6 @@ API_EXPORT(int) ap_graceful_stop_signalled(void); * @deffunc void ap_start_shutdown(void) */ -API_EXPORT(void) ap_start_shutdown(void); +AP_DECLARE(void) ap_start_shutdown(void); #endif diff --git a/include/http_config.h b/include/http_config.h index a7c0a3fb31..8237f4f1d4 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -456,7 +456,7 @@ struct module_struct { * @return The module-specific data * @deffunc void *ap_get_module_config(void *conf_vector, module *m) */ -API_EXPORT(void *) ap_get_module_config(void *conf_vector, module *m); +AP_DECLARE(void *) ap_get_module_config(void *conf_vector, module *m); /** * Generic accessors for other modules to set at their own module-specific * data @@ -466,7 +466,7 @@ API_EXPORT(void *) ap_get_module_config(void *conf_vector, module *m); * @param val The module-specific data to set * @deffunc void ap_set_module_config(void *conf_vector, module *m, void *val) */ -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); #define ap_get_module_config(v,m) \ (((void **)(v))[(m)->module_index]) @@ -481,7 +481,7 @@ API_EXPORT(void) ap_set_module_config(void *conf_vector, module *m, void *val); * @return An error string or NULL on success * @deffunc const char *ap_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char *arg) */ -API_EXPORT_NONSTD(const char *) ap_set_string_slot(cmd_parms *, void *, +AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *, void *, const char *); /** @@ -495,7 +495,7 @@ API_EXPORT_NONSTD(const char *) ap_set_string_slot(cmd_parms *, void *, * @return 0 if the method is not limited in the current scope * @deffunc ap_method_is_limited(cmd_parms *cmd, const char *method) */ -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); /** * Generic command handling function for strings, always sets the value @@ -506,7 +506,7 @@ API_EXPORT(int) ap_method_is_limited(cmd_parms *cmd, const char *method); * @return An error string or NULL on success * @deffunc const char *ap_set_string_slot_lower(cmd_parms *cmd, void *struct_ptr, const char *arg) */ -API_EXPORT_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *, +AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *, void *, const char *); /** * Generic command handling function for flags @@ -516,7 +516,7 @@ API_EXPORT_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *, * @return An error string or NULL on success * @deffunc const char *ap_set_flag_slot(cmd_parms *cmd, void *struct_ptr, int arg) */ -API_EXPORT_NONSTD(const char *) ap_set_flag_slot(cmd_parms *, void *, int); +AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *, void *, int); /** * Generic command handling function for files * @param cmd The command parameters for this directive @@ -525,7 +525,7 @@ API_EXPORT_NONSTD(const char *) ap_set_flag_slot(cmd_parms *, void *, int); * @return An error string or NULL on success * @deffunc const char *ap_set_file_slot(cmd_parms *cmd, char *struct_ptr, const char *arg) */ -API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, const char *); +AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, const char *); /** * For modules which need to read config files, open logs, etc. ... @@ -535,7 +535,7 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, const char * @param fname The file name * @deffunc const char *ap_server_root_relative(apr_pool_t *p, const char *fname) */ -API_EXPORT(const char *) ap_server_root_relative(apr_pool_t *p, const char *fname); +AP_DECLARE(const char *) ap_server_root_relative(apr_pool_t *p, const char *fname); /* Finally, the hook for dynamically loading modules in... */ @@ -544,7 +544,7 @@ API_EXPORT(const char *) ap_server_root_relative(apr_pool_t *p, const char *fnam * @param m the module structure of the module to add * @deffunc void ap_add_module(module *m) */ -API_EXPORT(void) ap_add_module(module *m); +AP_DECLARE(void) ap_add_module(module *m); /** * Remove a module from the server. There are some caveats: * when the module is removed, its slot is lost so all the current @@ -554,19 +554,19 @@ API_EXPORT(void) ap_add_module(module *m); * @param m the module structure of the module to remove * @deffunc void ap_remove_module(module *m) */ -API_EXPORT(void) ap_remove_module(module *m); +AP_DECLARE(void) ap_remove_module(module *m); /** * Add a module to the chained modules list and the list of loaded modules * @param m the module structure of the module to add * @deffunc void ap_add_loaded_module(module *m) */ -API_EXPORT(void) ap_add_loaded_module(module *mod); +AP_DECLARE(void) ap_add_loaded_module(module *mod); /** * Remove a module fromthe chained modules list and the list of loaded modules * @param m the module structure of the module to remove * @deffunc void ap_remove_loaded_module(module *m) */ -API_EXPORT(void) ap_remove_loaded_module(module *mod); +AP_DECLARE(void) ap_remove_loaded_module(module *mod); /** * Add a module to the list of loaded module based on the name of the * module @@ -574,26 +574,26 @@ API_EXPORT(void) ap_remove_loaded_module(module *mod); * @return 1 on success, 0 on failure * @deffunc int ap_add_named_module(const char *name) */ -API_EXPORT(int) ap_add_named_module(const char *name); +AP_DECLARE(int) ap_add_named_module(const char *name); /** * Clear all of the modules from the loaded module list * @deffunc void ap_add_named_module(void) */ -API_EXPORT(void) ap_clear_module_list(void); +AP_DECLARE(void) ap_clear_module_list(void); /** * Find the name of the specified module * @param m The module to get the name for * @return the name of the module * @deffunc const char *ap_find_module_name(module *m) */ -API_EXPORT(const char *) ap_find_module_name(module *m); +AP_DECLARE(const char *) ap_find_module_name(module *m); /** * Find a module based on the name of the module * @param name the name of the module * @return the module structure if found, NULL otherwise * @deffunc module *ap_find_linked_module(const char *name) */ -API_EXPORT(module *) ap_find_linked_module(const char *name); +AP_DECLARE(module *) ap_find_linked_module(const char *name); /** * Open a configfile_t as apr_file_t @@ -602,7 +602,7 @@ API_EXPORT(module *) ap_find_linked_module(const char *name); * @param name the name of the file to open * @deffunc apr_status_t ap_pcfg_openfile(configfile_t **ret_cfg, apr_pool_t *p, const char *name) */ -API_EXPORT(apr_status_t) ap_pcfg_openfile(configfile_t **, apr_pool_t *p, const char *name); +AP_DECLARE(apr_status_t) ap_pcfg_openfile(configfile_t **, apr_pool_t *p, const char *name); /** * Allocate a configfile_t handle with user defined functions and params @@ -614,7 +614,7 @@ API_EXPORT(apr_status_t) ap_pcfg_openfile(configfile_t **, apr_pool_t *p, const * @param close_func The close function * @deffunc configfile_t *ap_pcfg_open_custom(apr_pool_t *p, const char *descr, void *param, int(*getc_func)(void*), void *(*gets_func) (void *buf, size_t bufsiz, void *param), int(*close_func)(void *param)) */ -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(*getc_func)(void*), void *(*gets_func) (void *buf, size_t bufsiz, void *param), @@ -628,7 +628,7 @@ API_EXPORT(configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *descr, * @return 1 on success, 0 on failure * @deffunc int ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp) */ -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); /** * Read one char from open configfile_t, increase line number upon LF @@ -636,7 +636,7 @@ API_EXPORT(int) ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp); * @return the character read * @deffunc int ap_cfg_getc(configfile_t *cfp) */ -API_EXPORT(int) ap_cfg_getc(configfile_t *cfp); +AP_DECLARE(int) ap_cfg_getc(configfile_t *cfp); /** * Detach from open configfile_t, calling the close handler @@ -644,7 +644,7 @@ API_EXPORT(int) ap_cfg_getc(configfile_t *cfp); * @return 1 on sucess, 0 on failure * @deffunc int ap_cfg_closefile(configfile_t *cfp) */ -API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp); +AP_DECLARE(int) ap_cfg_closefile(configfile_t *cfp); /** * Read all data between the current <foo> and the matching </foo>. All @@ -654,7 +654,7 @@ API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp); * @retrn Error string on failure, NULL on success * @deffunc const char *ap_soak_end_container(cmd_parms *cmd, char *directive) */ -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); /** * Read all data between the current <foo> and the matching </foo> and build @@ -683,7 +683,7 @@ const char * ap_build_cont_config(apr_pool_t *p, apr_pool_t *temp_pool, * @return Error string on erro, NULL otherwise * @deffunc const char *ap_build_config(cmd_parms *parms, apr_pool_t *conf_pool, apr_pool_t *temp_pool, ap_directive_t **conftree) */ -API_EXPORT(const char *) ap_build_config(cmd_parms *parms, +AP_DECLARE(const char *) ap_build_config(cmd_parms *parms, apr_pool_t *conf_pool, apr_pool_t *temp_pool, ap_directive_t **conftree); @@ -696,7 +696,7 @@ API_EXPORT(const char *) ap_build_config(cmd_parms *parms, * @return Error string on error, NULL otherwise * @deffunc const char *ap_walk_config(ap_directive_t *conftree, cmd_parms *parms, void *config) */ -API_EXPORT(const char *) ap_walk_config(ap_directive_t *conftree, +AP_DECLARE(const char *) ap_walk_config(ap_directive_t *conftree, cmd_parms *parms, void *config); /** @@ -715,7 +715,7 @@ API_EXPORT(const char *) ap_walk_config(ap_directive_t *conftree, * @return Error string on error, NULL on success * @deffunc const char *ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden) */ -API_EXPORT(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden); +AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden); /* ap_check_cmd_context(): Forbidden in: */ #define NOT_IN_VIRTUALHOST 0x01 /* <Virtualhost> */ @@ -733,23 +733,23 @@ API_EXPORT(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden * The topmost module in the list * @defvar module *top_module */ -extern API_VAR_EXPORT module *top_module; +extern AP_DECLARE_DATA module *top_module; /** * Array of all statically linked modules * @defvar module *ap_prelinked_modules[] */ -extern API_VAR_EXPORT module *ap_prelinked_modules[]; +extern AP_DECLARE_DATA module *ap_prelinked_modules[]; /** * Array of all preloaded modules * @defvar module *ap_preloaded_modules[] */ -extern API_VAR_EXPORT module *ap_preloaded_modules[]; +extern AP_DECLARE_DATA module *ap_preloaded_modules[]; /** * Array of all loaded modules * @defvar module **ap_loaded_modules */ -extern API_VAR_EXPORT module **ap_loaded_modules; +extern AP_DECLARE_DATA module **ap_loaded_modules; /* For mod_so.c... */ /** Run a single module's two create_config hooks @@ -765,7 +765,7 @@ void ap_single_module_configure(apr_pool_t *p, server_rec *s, module *m); * @param process The process that is currently running the server * @deffunc void ap_setup_prelinked_modules(process_rec *process) */ -API_EXPORT(void) ap_setup_prelinked_modules(process_rec *process); +AP_DECLARE(void) ap_setup_prelinked_modules(process_rec *process); /** *Show the preloaded configuration directives, the help string explaining @@ -773,13 +773,13 @@ API_EXPORT(void) ap_setup_prelinked_modules(process_rec *process); * what parts of the configuration they are allowed. Used for httpd -h. * @deffunc void ap_show_directives(void) */ -API_EXPORT(void) ap_show_directives(void); +AP_DECLARE(void) ap_show_directives(void); /** * Show the preloaded module names. Used for httpd -l. * @deffunc void ap_show_modules(void) */ -API_EXPORT(void) ap_show_modules(void); +AP_DECLARE(void) ap_show_modules(void); /** * Read all config files and setup the server @@ -790,7 +790,7 @@ API_EXPORT(void) ap_show_modules(void); * @return The setup server_rec list. * @deffunc server_rec *ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree) */ -API_EXPORT(server_rec*) ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree); +AP_DECLARE(server_rec*) ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree); /** * Run all post config hooks for loaded modules. @@ -800,21 +800,21 @@ API_EXPORT(server_rec*) ap_read_config(process_rec *process, apr_pool_t *temp_po * @param s The list of server_rec structures * @deffunc void ap_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) */ -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); /** * Run all rewrite args hooks for loaded modules * @param process The process currently running the server * @deffunc void ap_run_rewrite_args(process_rec *process) */ -API_EXPORT(void) ap_run_rewrite_args(process_rec *process); +AP_DECLARE(void) ap_run_rewrite_args(process_rec *process); /** * Run the register hooks function for a specified module * @param m The module to run the register hooks function fo * @deffunc void ap_register_hooks(module *m) */ -API_EXPORT(void) ap_register_hooks(module *m); +AP_DECLARE(void) ap_register_hooks(module *m); /** * Setup all virtual hosts @@ -822,7 +822,7 @@ API_EXPORT(void) ap_register_hooks(module *m); * @param main_server The head of the server_rec list * @deffunc void ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server) */ -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); /* For http_request.c... */ @@ -839,7 +839,7 @@ void *ap_create_request_config(apr_pool_t *p); * @return The config vector * @deffunc void *ap_create_per_dir_config(apr_pool_t *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); /** * Run all of the modules merge per dir config functions @@ -880,7 +880,7 @@ int ap_parse_htaccess(void **result, request_rec *r, int override, * return Error string on error, NULL on success * @deffunc const char *ap_init_virtual_host(apr_pool_t *p, const char *hostname, server_rec *main_server, server_rec **ps) */ -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 **); /** @@ -901,7 +901,7 @@ void ap_process_resource_config(server_rec *s, const char *fname, * @param p The pool for general allocation * @param ptemp The pool for temporary allocations */ -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); @@ -931,7 +931,7 @@ int ap_invoke_handler(request_rec *); * @return The directive definition of the specified directive * @deffunc const command_rec *ap_find_command(const char *name, const command_rec *cmds) */ -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); /** * Find a given directive in a list module @@ -940,7 +940,7 @@ CORE_EXPORT(const command_rec *) ap_find_command(const char *name, const command * @return The directive definition of the specified directive * @deffunc const command_rec *ap_find_command_in_modules(const char *cmd_name,module **mod) */ -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); /** * Add a per_dir and per_server config vector to a given module @@ -950,7 +950,7 @@ CORE_EXPORT(const command_rec *) ap_find_command_in_modules(const char *cmd_name * @return The new config vector * @deffunc void *ap_set_config_vectors(cmd_parms *parms, void *config, module *mod) */ -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); #endif diff --git a/include/http_connection.h b/include/http_connection.h index 22415a08d9..8766394f59 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -98,7 +98,7 @@ conn_rec *ap_new_apr_connection(apr_pool_t *p, server_rec *server, BUFF *inout, * @param c The connection on which the request is read * @deffunc void ap_process_connection(conn_rec *) */ -CORE_EXPORT(void) ap_process_connection(conn_rec *); +AP_CORE_DECLARE(void) ap_process_connection(conn_rec *); /** * The http pre-protocol handler. This makes sets up Apache to serve http diff --git a/include/http_core.h b/include/http_core.h index c71748602f..4caaaa28ed 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -127,21 +127,21 @@ extern "C" { * @return the Options bitmask * @deffunc int ap_allow_options(request_rec *r) */ -API_EXPORT(int) ap_allow_options (request_rec *); +AP_DECLARE(int) ap_allow_options (request_rec *); /** * Retrieve the value of the AllowOverride for this request * @param r The current request * @return the overrides bitmask * @deffunc int ap_allow_overrides(request_rec *r) */ -API_EXPORT(int) ap_allow_overrides (request_rec *); +AP_DECLARE(int) ap_allow_overrides (request_rec *); /** * Retrieve the value of the DefaultType directive, or text/plain if not set * @param r The current request * @return The default type * @deffunc const char *ap_default_type(request_rec *r) */ -API_EXPORT(const char *) ap_default_type (request_rec *); +AP_DECLARE(const char *) ap_default_type (request_rec *); /** * Retrieve the document root for this server * @param r The current request @@ -150,7 +150,7 @@ API_EXPORT(const char *) ap_default_type (request_rec *); * @return The document root * @deffunc const char *ap_document_root(request_rec *r) */ -API_EXPORT(const char *) ap_document_root (request_rec *); +AP_DECLARE(const char *) ap_document_root (request_rec *); /** * Lookup the remote client's DNS name or IP address * @param conn The current connection @@ -173,7 +173,7 @@ API_EXPORT(const char *) ap_document_root (request_rec *); * @return The remote hostname * @deffunc const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type) */ -API_EXPORT(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type); +AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type); /** * Retrieve the login name of the remote user. Undef if it could not be * determined @@ -181,7 +181,7 @@ API_EXPORT(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, in * @return The user logged in to the client machine * @deffunc const char *ap_get_remote_logname(request_rec *r) */ -API_EXPORT(const char *) ap_get_remote_logname(request_rec *r); +AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r); /* Used for constructing self-referencing URLs, and things like SERVER_PORT, * and SERVER_NAME. @@ -194,35 +194,35 @@ API_EXPORT(const char *) ap_get_remote_logname(request_rec *r); * @return A fully qualified URL * @deffunc char *ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r) */ -API_EXPORT(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r); +AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r); /** * Get the current server name from the request * @param r The current request * @return the server name * @deffunc const char *ap_get_server_name(request_rec *r) */ -API_EXPORT(const char *) ap_get_server_name(request_rec *r); +AP_DECLARE(const char *) ap_get_server_name(request_rec *r); /** * Get the current server port * @param The current request * @return The server's port * @deffunc unsigned ap_get_server_port(const request_rec *r) */ -API_EXPORT(unsigned) ap_get_server_port(const request_rec *r); +AP_DECLARE(unsigned) ap_get_server_port(const request_rec *r); /** * Return the limit on bytes in request msg body * @param r The current request * @return the maximum number of bytes in the request msg body * @deffunc unsigned long ap_get_limit_req_body(const request_rec *r) */ -API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r); +AP_DECLARE(unsigned long) ap_get_limit_req_body(const request_rec *r); /** * Return the limit on bytes in XML request msg body * @param r The current request * @return the maximum number of bytes in XML request msg body * @deffunc size_t ap_get_limit_xml_body(const request_rec *r) */ -API_EXPORT(size_t) ap_get_limit_xml_body(const request_rec *r); +AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r); /** * Install a custom response handler for a given status * @param r The current request @@ -231,16 +231,16 @@ API_EXPORT(size_t) ap_get_limit_xml_body(const request_rec *r); * or a URL * @deffunc void ap_custom_response(request_rec *r, int status, char *string) */ -API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string); +AP_DECLARE(void) ap_custom_response(request_rec *r, int status, char *string); /** * Check for a definition from the server command line * @param name The define to check for * @return 1 if defined, 0 otherwise * @deffunc int ap_exists_config_define(const char *name) */ -API_EXPORT(int) ap_exists_config_define(const char *name); +AP_DECLARE(int) ap_exists_config_define(const char *name); /* FIXME! See STATUS about how */ -API_EXPORT_NONSTD(int) ap_core_translate(request_rec *r); +AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r); /* Authentication stuff. This is one of the places where compatibility * with the old config files *really* hurts; they don't discriminate at @@ -264,14 +264,14 @@ struct require_line { * @return The authorization required * @deffunc const char *ap_auth_type(request_rec *r) */ -API_EXPORT(const char *) ap_auth_type (request_rec *); +AP_DECLARE(const char *) ap_auth_type (request_rec *); /** * Return the current Authorization realm * @param r The current request * @return The current authorization realm * @deffunc const char *ap_auth_name(request_rec *r) */ -API_EXPORT(const char *) ap_auth_name (request_rec *); +AP_DECLARE(const char *) ap_auth_name (request_rec *); /** * How the requires lines must be met. * @param r The current request @@ -283,14 +283,14 @@ API_EXPORT(const char *) ap_auth_name (request_rec *); * </PRE> * @deffunc int ap_satisfies(request_rec *r) */ -API_EXPORT(int) ap_satisfies (request_rec *r); +AP_DECLARE(int) ap_satisfies (request_rec *r); /** * Retrieve information about all of the requires directives for this request * @param r The current request * @return An array of all requires directives for this request * @deffunc const apr_array_header_t *ap_requires(request_rec *r) */ -API_EXPORT(const apr_array_header_t *) ap_requires (request_rec *); +AP_DECLARE(const apr_array_header_t *) ap_requires (request_rec *); #ifdef WIN32 /* @@ -301,7 +301,7 @@ typedef enum { eFileTypeUNKNOWN, eFileTypeBIN, eFileTypeEXE16, eFileTypeEXE32, typedef enum { INTERPRETER_SOURCE_UNSET, INTERPRETER_SOURCE_REGISTRY_STRICT, INTERPRETER_SOURCE_REGISTRY, INTERPRETER_SOURCE_SHEBANG } interpreter_source_e; -API_EXPORT(file_type_e) ap_get_win32_interpreter(const request_rec *, +AP_DECLARE(file_type_e) ap_get_win32_interpreter(const request_rec *, char **interpreter, char **arguments); #endif @@ -316,7 +316,7 @@ API_EXPORT(file_type_e) ap_get_win32_interpreter(const request_rec *, char *ap_response_code_string (request_rec *r, int error_index); -extern API_VAR_EXPORT module core_module; +extern AP_DECLARE_DATA module core_module; /* Per-directory configuration */ @@ -451,10 +451,10 @@ typedef struct { void ap_core_reorder_directories(apr_pool_t *, server_rec *); /* for mod_perl */ -CORE_EXPORT(void) ap_add_per_dir_conf (server_rec *s, void *dir_config); -CORE_EXPORT(void) ap_add_per_url_conf (server_rec *s, void *url_config); -CORE_EXPORT(void) ap_add_file_conf(core_dir_config *conf, void *url_config); -CORE_EXPORT_NONSTD(const char *) ap_limit_section (cmd_parms *cmd, void *dummy, const char *arg); +AP_CORE_DECLARE(void) ap_add_per_dir_conf (server_rec *s, void *dir_config); +AP_CORE_DECLARE(void) ap_add_per_url_conf (server_rec *s, void *url_config); +AP_CORE_DECLARE(void) ap_add_file_conf(core_dir_config *conf, void *url_config); +AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section (cmd_parms *cmd, void *dummy, const char *arg); #endif diff --git a/include/http_log.h b/include/http_log.h index e98e006832..aecbed8c48 100644 --- a/include/http_log.h +++ b/include/http_log.h @@ -149,7 +149,7 @@ void ap_open_logs (server_rec *s_main, apr_pool_t *p); * untrusted data. * @deffunc void ap_log_error(const char *file, int line, int level, apr_status_t status, const server_rec *s, const char *fmt, ...) */ -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, ...) __attribute__((format(printf,6,7))); @@ -173,7 +173,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level, * untrusted data. * @deffunc void ap_log_error(const char *file, int line, int level, apr_status_t status, apr_pool_t *p, const char *fmt, ...) */ -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, ...) __attribute__((format(printf,6,7))); @@ -197,7 +197,7 @@ API_EXPORT(void) ap_log_perror(const char *file, int line, int level, * untrusted data. * @deffunc void ap_log_error(const char *file, int line, int level, apr_status_t status, request_rec *s, const char *fmt, ...) */ -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 *s, const char *fmt, ...) __attribute__((format(printf,6,7))); @@ -207,7 +207,7 @@ API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, * @param s The current server * @deffunc void ap_error_log2stderr(server_rec *s) */ -API_EXPORT(void) ap_error_log2stderr (server_rec *); +AP_DECLARE(void) ap_error_log2stderr (server_rec *); /** * Log the current pid of the parent process @@ -244,14 +244,14 @@ struct piped_log { * @return The piped log structure * @deffunc piped_log *ap_open_piped_log(apr_pool_t *p, const char *program) */ -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); /** * Close the piped log and kill the logging process * @param pl The piped log structure * @deffunc void ap_close_piped_log(piped_log *pl) */ -API_EXPORT(void) ap_close_piped_log (piped_log *); +AP_DECLARE(void) ap_close_piped_log (piped_log *); /** * A macro to access the read side of the piped log pipe diff --git a/include/http_main.h b/include/http_main.h index 1cf883dcca..ce07f4914d 100644 --- a/include/http_main.h +++ b/include/http_main.h @@ -74,20 +74,20 @@ extern "C" { */ /** The name of the Apache executable */ -extern API_VAR_EXPORT const char *ap_server_argv0; +extern AP_DECLARE_DATA const char *ap_server_argv0; /** The global server's ServerRoot */ -extern API_VAR_EXPORT const char *ap_server_root; +extern AP_DECLARE_DATA const char *ap_server_root; /* for -C, -c and -D switches */ /** An array of all -C directives. These are processed before the server's * config file */ -extern API_VAR_EXPORT apr_array_header_t *ap_server_pre_read_config; +extern AP_DECLARE_DATA apr_array_header_t *ap_server_pre_read_config; /** An array of all -c directives. These are processed after the server's * config file */ -extern API_VAR_EXPORT apr_array_header_t *ap_server_post_read_config; +extern AP_DECLARE_DATA apr_array_header_t *ap_server_post_read_config; /** An array of all -D defines on the command line. This allows people to * effect the server based on command line options */ -extern API_VAR_EXPORT apr_array_header_t *ap_server_config_defines; +extern AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines; #ifdef __cplusplus } diff --git a/include/http_protocol.h b/include/http_protocol.h index 789ba228ed..970e93eef8 100644 --- a/include/http_protocol.h +++ b/include/http_protocol.h @@ -92,7 +92,7 @@ request_rec *ap_read_request(conn_rec *c); * @param fieldval The value of the header * @deffunc int ap_send_header_field(request_rec *r, const char *fieldname, const char *fieldval) */ -API_EXPORT_NONSTD(int) ap_send_header_field(request_rec *r, const char *fieldname, +AP_DECLARE_NONSTD(int) ap_send_header_field(request_rec *r, const char *fieldname, const char *fieldval); /** @@ -103,18 +103,18 @@ API_EXPORT_NONSTD(int) ap_send_header_field(request_rec *r, const char *fieldnam * correctness depends on code in ap_send_http_header(). * @deffunc void ap_basic_http_header(request_rec *r) */ -API_EXPORT(void) ap_basic_http_header(request_rec *r); +AP_DECLARE(void) ap_basic_http_header(request_rec *r); /** * Send the Status-Line and header fields for HTTP response * @param l The current request * @deffunc void ap_send_http_header(request_rec *l) */ -API_EXPORT(void) ap_send_http_header(request_rec *l); +AP_DECLARE(void) ap_send_http_header(request_rec *l); /* Send the response to special method requests */ -API_EXPORT(int) ap_send_http_trace(request_rec *r); +AP_DECLARE(int) ap_send_http_trace(request_rec *r); int ap_send_http_options(request_rec *r); /* Finish up stuff after a request */ @@ -125,7 +125,7 @@ int ap_send_http_options(request_rec *r); * @param r The current request * @deffunc void ap_finalize_request_protocol(request_rec *r) */ -API_EXPORT(void) ap_finalize_request_protocol(request_rec *r); +AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r); /** * Send error back to client. @@ -137,7 +137,7 @@ API_EXPORT(void) ap_finalize_request_protocol(request_rec *r); * on the problem with the ErrorDocument. * @deffunc void ap_send_error_response(request_rec *r, int recursive_error) */ -API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error); +AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error); /* Set last modified header line from the lastmod date of the associated file. * Also, set content length. @@ -153,14 +153,14 @@ API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error); * @return Always 0, can be safely ignored * @deffunc int ap_set_content_length(request_rec *r, long length) */ -API_EXPORT(int) ap_set_content_length(request_rec *r, long length); +AP_DECLARE(int) ap_set_content_length(request_rec *r, long length); /** * Set the keepalive status for this request * @param r The current request * @return 1 if keepalive can be set, 0 otherwise * @deffunc int ap_set_keepalive(request_rec *r) */ -API_EXPORT(int) ap_set_keepalive(request_rec *r); +AP_DECLARE(int) ap_set_keepalive(request_rec *r); /** * Return the latest rational time from a request/mtime pair. Mtime is * returned unless it's in the future, in which case we return the current time. @@ -169,7 +169,7 @@ API_EXPORT(int) ap_set_keepalive(request_rec *r); * @return the latest rational time. * @deffunc apr_time_t ap_rationalize_mtime(request_rec *r, apr_time_t mtime) */ -API_EXPORT(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime); +AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime); /** * Construct an entity tag from the resource information. If it's a real * file, build in some of the file characteristics. @@ -179,19 +179,19 @@ API_EXPORT(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime); * @return The entity tag * @deffunc char *ap_make_etag(request_rec *r, int force_weak) */ -API_EXPORT(char *) ap_make_etag(request_rec *r, int force_weak); +AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak); /** * Set the E-tag outgoing header * @param The current request * @deffunc void ap_set_etag(request_rec *r) */ -API_EXPORT(void) ap_set_etag(request_rec *r); +AP_DECLARE(void) ap_set_etag(request_rec *r); /** * Set the last modified time for the file being sent * @param r The current request * @deffunc void ap_set_last_modified(request_rec *r) */ -API_EXPORT(void) ap_set_last_modified(request_rec *r); +AP_DECLARE(void) ap_set_last_modified(request_rec *r); /** * Implements condition GET rules for HTTP/1.1 specification. This function * inspects the client headers and determines if the response fulfills @@ -200,7 +200,7 @@ API_EXPORT(void) ap_set_last_modified(request_rec *r); * @return 1 if the response fulfills the condition GET rules, 0 otherwise * @deffunc int ap_meets_conditions(request_rec *r) */ -API_EXPORT(int) ap_meets_conditions(request_rec *r); +AP_DECLARE(int) ap_meets_conditions(request_rec *r); /* Other ways to send stuff at the client. All of these keep track * of bytes_sent automatically. This indirection is intended to make @@ -223,7 +223,7 @@ API_EXPORT(int) ap_meets_conditions(request_rec *r); * @param nbytes Amount of data actually sent * @deffunc apr_status_t ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t length, apr_size_t *nbytes); */ -API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, +AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t length, apr_size_t *nbytes); /** * Send an MMAP'ed file to the client @@ -234,7 +234,7 @@ API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of * @return The number of bytes sent * @deffunc size_t ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, size_t length) */ -API_EXPORT(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, +AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, size_t length); /** @@ -247,14 +247,14 @@ API_EXPORT(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, * @return Pointer to the newly created structure. * @deffunc ap_method_list_t ap_make_method_list(apr_pool_t *p, int nelts) */ -API_EXPORT(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts); -API_EXPORT(void) ap_copy_method_list(ap_method_list_t *dest, +AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts); +AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest, ap_method_list_t *src); -API_EXPORT_NONSTD(void) ap_method_list_do(int (*comp) (void *urec, const char *mname, +AP_DECLARE_NONSTD(void) ap_method_list_do(int (*comp) (void *urec, const char *mname, int mnum), void *rec, const ap_method_list_t *ml, ...); -API_EXPORT(void) ap_method_list_vdo(int (*comp) (void *urec, const char *mname, +AP_DECLARE(void) ap_method_list_vdo(int (*comp) (void *urec, const char *mname, int mnum), void *rec, const ap_method_list_t *ml, va_list vp); @@ -267,7 +267,7 @@ API_EXPORT(void) ap_method_list_vdo(int (*comp) (void *urec, const char *mname, * @return 1 if method is in the list, otherwise 0 * @deffunc int ap_method_in_list(const char *method, ap_method_list_t *l) */ -API_EXPORT(int) ap_method_in_list(ap_method_list_t *l, const char *method); +AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method); /** * Add an HTTP method name to an ap_method_list_t structure if it isn't @@ -278,7 +278,7 @@ API_EXPORT(int) ap_method_in_list(ap_method_list_t *l, const char *method); * @return None. * @deffunc void ap_method_in_list(ap_method_list_t *l, const char *method) */ -API_EXPORT(void) ap_method_list_add(ap_method_list_t *l, const char *method); +AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method); /** * Remove an HTTP method name from an ap_method_list_t structure. @@ -288,7 +288,7 @@ API_EXPORT(void) ap_method_list_add(ap_method_list_t *l, const char *method); * @return None. * @deffunc void ap_method_list_remove(ap_method_list_t *l, const char *method) */ -API_EXPORT(void) ap_method_list_remove(ap_method_list_t *l, +AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l, const char *method); /** @@ -298,7 +298,7 @@ API_EXPORT(void) ap_method_list_remove(ap_method_list_t *l, * @return None. * @deffunc void ap_clear_method_list(ap_method_list_t *l) */ -API_EXPORT(void) ap_clear_method_list(ap_method_list_t *l); +AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l); /* Hmmm... could macrofy these for now, and maybe forever, though the * definitions of the macros would get a whole lot hairier. @@ -311,7 +311,7 @@ API_EXPORT(void) ap_clear_method_list(ap_method_list_t *l); * @return The number of bytes sent * @deffunc int ap_rputc(int c, request_rec *r) */ -API_EXPORT(int) ap_rputc(int c, request_rec *r); +AP_DECLARE(int) ap_rputc(int c, request_rec *r); /** * Output a string for the current request * @param str The string to output @@ -319,7 +319,7 @@ API_EXPORT(int) ap_rputc(int c, request_rec *r); * @return The number of bytes sent * @deffunc int ap_rputs(const char *str, request_rec *r) */ -API_EXPORT(int) ap_rputs(const char *str, request_rec *r); +AP_DECLARE(int) ap_rputs(const char *str, request_rec *r); /** * Write a buffer for the current request * @param buf The buffer to write @@ -328,7 +328,7 @@ API_EXPORT(int) ap_rputs(const char *str, request_rec *r); * @return The number of bytes sent * @deffunc int ap_rwrite(const void *buf, int nbyte, request_rec *r) */ -API_EXPORT(int) ap_rwrite(const void *buf, int nbyte, request_rec *r); +AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r); /** * Write an unspecified number of strings to the request * @param r The current request @@ -336,7 +336,7 @@ API_EXPORT(int) ap_rwrite(const void *buf, int nbyte, request_rec *r); * @return The number of bytes sent * @deffunc int ap_rvputs(request_rec *r, ...) */ -API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r,...); +AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...); /** * Output data to the client in a printf format * @param r The current request @@ -345,7 +345,7 @@ API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r,...); * @return The number of bytes sent * @deffunc int ap_vrprintf(request_rec *r, const char *fmt, va_list vlist) */ -API_EXPORT(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist); +AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist); /** * Output data to the client in a printf format * @param r The current request @@ -354,7 +354,7 @@ API_EXPORT(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist); * @return The number of bytes sent * @deffunc int ap_rprintf(request_rec *r, const char *fmt, ...) */ -API_EXPORT_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...) +AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...) __attribute__((format(printf,2,3))); /** * Flush all of the data for the current request to the client @@ -362,7 +362,7 @@ API_EXPORT_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...) * @return The number of bytes sent * @deffunc int ap_rflush(request_rec *r) */ -API_EXPORT(int) ap_rflush(request_rec *r); +AP_DECLARE(int) ap_rflush(request_rec *r); /** * Index used in custom_responses array for a specific error code @@ -371,7 +371,7 @@ API_EXPORT(int) ap_rflush(request_rec *r); * @return The index of the response * @deffunc int ap_index_of_response(int status) */ -API_EXPORT(int) ap_index_of_response(int status); +AP_DECLARE(int) ap_index_of_response(int status); /** * Return the Status-Line for a given status code (excluding the @@ -381,7 +381,7 @@ API_EXPORT(int) ap_index_of_response(int status); * @return The Status-Line * @deffunc const char *ap_get_status_line(int status) */ -API_EXPORT(const char *) ap_get_status_line(int status); +AP_DECLARE(const char *) ap_get_status_line(int status); /* Reading a block of data from the client connection (e.g., POST arg) */ @@ -398,7 +398,7 @@ API_EXPORT(const char *) ap_get_status_line(int status); * @return either OK or an error code * @deffunc int ap_setup_cleint_block(request_rec *r, int read_policy) */ -API_EXPORT(int) ap_setup_client_block(request_rec *r, int read_policy); +AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy); /** * Determine if the client has sent any data. This also sends a * 100 Continue resposne to HTTP/1.1 clients, so modules should not be called @@ -408,7 +408,7 @@ API_EXPORT(int) ap_setup_client_block(request_rec *r, int read_policy); * @return 0 if there is no message to read, 1 otherwise * @deffunc int ap_should_client_block(request_rec *r) */ -API_EXPORT(int) ap_should_client_block(request_rec *r); +AP_DECLARE(int) ap_should_client_block(request_rec *r); /** * Call this in a loop. It will put data into a buffer and return the length * of the input block @@ -419,7 +419,7 @@ API_EXPORT(int) ap_should_client_block(request_rec *r); * if EOF, or -1 if there was an error * @deffunc long ap_get_client_block(request_rec *r, char *buffer, int bufsiz) */ -API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz); +AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz); /** * In HTTP/1.1, any method can have a body. However, most GET handlers * wouldn't know what to do with a request body if they received one. @@ -431,7 +431,7 @@ API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz); * @return error status if request is malformed, OK otherwise * @deffunc int ap_discard_request_body(request_rec *r) */ -API_EXPORT(int) ap_discard_request_body(request_rec *r); +AP_DECLARE(int) ap_discard_request_body(request_rec *r); /* Sending a byterange */ @@ -441,7 +441,7 @@ API_EXPORT(int) ap_discard_request_body(request_rec *r); * @return 1 if request was setup for byte range requests, 0 otherwise * @deffunc int ap_set_byterange(request_rec *r) */ -API_EXPORT(int) ap_set_byterange(request_rec *r); +AP_DECLARE(int) ap_set_byterange(request_rec *r); /** * Send one byte range chunk for a byte range request * @param r The current request @@ -449,7 +449,7 @@ API_EXPORT(int) ap_set_byterange(request_rec *r); * @param length Set to the length in should be after the chunk is sent * @deffunc int ap_each_byterange(request_rec *r, apr_off_t *offset, apr_size_t *length) */ -API_EXPORT(int) ap_each_byterange(request_rec *r, apr_off_t *offset, +AP_DECLARE(int) ap_each_byterange(request_rec *r, apr_off_t *offset, apr_size_t *length); /** * Setup the output headers so that the client knows how to authenticate @@ -458,7 +458,7 @@ API_EXPORT(int) ap_each_byterange(request_rec *r, apr_off_t *offset, * @param r The current request * @deffunc void ap_note_auth_failure(request_rec *r) */ -API_EXPORT(void) ap_note_auth_failure(request_rec *r); +AP_DECLARE(void) ap_note_auth_failure(request_rec *r); /** * Setup the output headers so that the client knows how to authenticate * itself the next time, if an authentication request failed. This function @@ -466,7 +466,7 @@ API_EXPORT(void) ap_note_auth_failure(request_rec *r); * @param r The current request * @deffunc void ap_note_basic_auth_failure(request_rec *r) */ -API_EXPORT(void) ap_note_basic_auth_failure(request_rec *r); +AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r); /** * Setup the output headers so that the client knows how to authenticate * itself the next time, if an authentication request failed. This function @@ -474,7 +474,7 @@ API_EXPORT(void) ap_note_basic_auth_failure(request_rec *r); * @param r The current request * @deffunc void ap_note_digest_auth_failure(request_rec *r) */ -API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r); +AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r); /** * Get the password from the request headers * @param r The current request @@ -488,7 +488,7 @@ API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r); * decline as well). * @deffunc int ap_get_basic_auth_pw(request_rec *r, const char **pw) */ -API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, const char **pw); +AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw); /* * Setting up the protocol fields for subsidiary requests... @@ -509,7 +509,7 @@ void ap_finalize_sub_req_protocol(request_rec *sub_r); * @param uri The uri to break apart * @deffunc void ap_parse_uri(request_rec *r, const char *uri) */ -CORE_EXPORT(void) ap_parse_uri(request_rec *r, const char *uri); +AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri); /** * Get the method number associated with the given string, assumed to @@ -518,7 +518,7 @@ CORE_EXPORT(void) ap_parse_uri(request_rec *r, const char *uri); * @return The method number * @deffunc int ap_method_number_of(const char *method) */ -API_EXPORT(int) ap_method_number_of(const char *method); +AP_DECLARE(int) ap_method_number_of(const char *method); /** * Get the method name associated with the given internal method @@ -527,7 +527,7 @@ API_EXPORT(int) ap_method_number_of(const char *method); * @return The name corresponding to the method number * @deffunc const char *ap_method_name_of(int methnum) */ -API_EXPORT(const char *) ap_method_name_of(int methnum); +AP_DECLARE(const char *) ap_method_name_of(int methnum); int http_filter(ap_filter_t *f, ap_bucket_brigade *b, apr_ssize_t length); diff --git a/include/http_request.h b/include/http_request.h index d8d7c24e4b..cf5e6f8ef1 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -97,7 +97,7 @@ extern "C" { * @return The new request record * @deffunc request_rec * ap_sub_req_lookup_uri(const char *new_file, const request_rec *r) */ -API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file, +AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_file, const request_rec *r); /** * Create a sub request for the given file. This sub request can be @@ -107,7 +107,7 @@ API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file, * @return The new request record * @deffunc request_rec * ap_sub_req_lookup_file(const char *new_file, const request_rec *r) */ -API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file, +AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, const request_rec *r); /** * Create a sub request for the given URI using a specific method. This @@ -118,7 +118,7 @@ API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file, * @return The new request record * @deffunc request_rec * ap_sub_req_method_uri(const char *method, const char *new_file, const request_rec *r) */ -API_EXPORT(request_rec *) ap_sub_req_method_uri(const char *method, +AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method, const char *new_file, const request_rec *r); @@ -128,14 +128,14 @@ API_EXPORT(request_rec *) ap_sub_req_method_uri(const char *method, * @return The return code for the sub request * @deffunc int ap_run_sub_req(request_rec *r) */ -API_EXPORT(int) ap_run_sub_req(request_rec *r); +AP_DECLARE(int) ap_run_sub_req(request_rec *r); /** * Free the memory associated with a sub request * @param r The sub request to finish * @deffunc void ap_destroy_sub_req(request_rec *r) */ -API_EXPORT(void) ap_destroy_sub_req(request_rec *r); +AP_DECLARE(void) ap_destroy_sub_req(request_rec *r); /* * Then there's the case that you want some other request to be served @@ -149,7 +149,7 @@ API_EXPORT(void) ap_destroy_sub_req(request_rec *r); * @param r The current request * @deffunc void ap_internal_redirect(const char *new_uri, request_rec *r) */ -API_EXPORT(void) ap_internal_redirect(const char *new_uri, request_rec *r); +AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r); /** * This function is designed for things like actions or CGI scripts, when @@ -159,7 +159,7 @@ API_EXPORT(void) ap_internal_redirect(const char *new_uri, request_rec *r); * @param r The current request * @deffunc void ap_internal_redirect_handler(const char *new_uri, request_rec *r) */ -API_EXPORT(void) ap_internal_redirect_handler(const char *new_uri, request_rec *r); +AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *r); /** * Can be used within any handler to determine if any authentication @@ -168,7 +168,7 @@ API_EXPORT(void) ap_internal_redirect_handler(const char *new_uri, request_rec * * @return 1 if authentication is required, 0 otherwise * @deffunc int ap_some_auth_required(request_rec *r) */ -API_EXPORT(int) ap_some_auth_required(request_rec *r); +AP_DECLARE(int) ap_some_auth_required(request_rec *r); /** * Determine if the current request is the main request or a sub requests @@ -176,7 +176,7 @@ API_EXPORT(int) ap_some_auth_required(request_rec *r); * @retrn 1 if this is a main request, 0 otherwise * @deffunc int ap_is_initial_req(request_rec *r) */ -API_EXPORT(int) ap_is_initial_req(request_rec *r); +AP_DECLARE(int) ap_is_initial_req(request_rec *r); /** * Function to set the r->mtime field to the specified value if it's later @@ -185,7 +185,7 @@ API_EXPORT(int) ap_is_initial_req(request_rec *r); * @param dependency_time Time to set the mtime to * @deffunc void ap_update_mtime(request_rec *r, apr_time_t dependency_mtime) */ -API_EXPORT(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime); +AP_DECLARE(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime); /** * Add one or more methods to the list permitted to access the resource. @@ -203,7 +203,7 @@ API_EXPORT(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime); * @return None. * @deffunc void ap_allow_methods(request_rec *r, int reset, ...) */ -API_EXPORT(void) ap_allow_methods(request_rec *r, int reset, ...); +AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...); #define MERGE_ALLOW 0 #define REPLACE_ALLOW 1 @@ -217,7 +217,7 @@ void ap_process_request(request_rec *); * @param r The current request * @deffunc void ap_die(int type, request_rec *r) */ -API_EXPORT(void) ap_die(int type, request_rec *r); +AP_DECLARE(void) ap_die(int type, request_rec *r); #endif /* Hooks */ diff --git a/include/http_vhost.h b/include/http_vhost.h index 987e8786d5..8262c030a1 100644 --- a/include/http_vhost.h +++ b/include/http_vhost.h @@ -112,7 +112,7 @@ void ap_update_vhost_from_headers(request_rec *r); * return 0 otherwise * @deffunc int ap_matches_request_vhost(request_rec *r, const char *host, unsigned port) */ -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); #ifdef __cplusplus diff --git a/include/httpd.h b/include/httpd.h index 7f22f166aa..9a7e6fdf8a 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -373,7 +373,7 @@ extern "C" { * @return The server version string * @deffunc const char *ap_get_server_version(void) */ -API_EXPORT(const char *) ap_get_server_version(void); +AP_DECLARE(const char *) ap_get_server_version(void); /** * Add a component to the version string @@ -381,13 +381,13 @@ API_EXPORT(const char *) ap_get_server_version(void); * @param component The string to add * @deffunc void ap_add_version_component(apr_pool_t *pconf, const char *component) */ -API_EXPORT(void) ap_add_version_component(apr_pool_t *pconf, const char *component); +AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component); /** * Get the date a time that the server was built * @return The server build time string */ -API_EXPORT(const char *) ap_get_server_built(void); +AP_DECLARE(const char *) ap_get_server_built(void); /* Numeric release version identifier: MMNNFFRBB: major minor fix final beta * Always increases along the same track as the source branch. @@ -1008,37 +1008,37 @@ struct server_rec { int limit_req_fields; }; -/* stuff marked API_EXPORT is part of the API, and intended for use +/* stuff marked AP_DECLARE is part of the API, and intended for use * by modules */ -#ifndef API_EXPORT -#define API_EXPORT(type) type +#ifndef AP_DECLARE +#define AP_DECLARE(type) type #endif -/* Stuff marked API_EXPORT_NONSTD is part of the API, and intended for - * use by modules. The difference between API_EXPORT and - * API_EXPORT_NONSTD is that the latter is required for any functions +/* Stuff marked AP_DECLARE_NONSTD is part of the API, and intended for + * use by modules. The difference between AP_DECLARE and + * AP_DECLARE_NONSTD is that the latter is required for any functions * which use varargs or are used via indirect function call. This * is to accomodate the two calling conventions in windows dlls. */ -#ifndef API_EXPORT_NONSTD -#define API_EXPORT_NONSTD(type) type +#ifndef AP_DECLARE_NONSTD +#define AP_DECLARE_NONSTD(type) type #endif -#ifndef MODULE_VAR_EXPORT -#define MODULE_VAR_EXPORT +#ifndef AP_MODULE_DECLARE_DATA +#define AP_MODULE_DECLARE_DATA #endif -#ifndef API_VAR_EXPORT -#define API_VAR_EXPORT +#ifndef AP_DECLARE_DATA +#define AP_DECLARE_DATA #endif -/* modules should not used functions marked CORE_EXPORT - * or CORE_EXPORT_NONSTD */ -#ifndef CORE_EXPORT -#define CORE_EXPORT API_EXPORT +/* modules should not used functions marked AP_CORE_DECLARE + * or AP_CORE_DECLARE_NONSTD */ +#ifndef AP_CORE_DECLARE +#define AP_CORE_DECLARE AP_DECLARE #endif -#ifndef CORE_EXPORT_NONSTD -#define CORE_EXPORT_NONSTD API_EXPORT_NONSTD +#ifndef AP_CORE_DECLARE_NONSTD +#define AP_CORE_DECLARE_NONSTD AP_DECLARE_NONSTD #endif /* On Mac OS X Server, symbols that conflict with loaded dylibs @@ -1062,7 +1062,7 @@ struct server_rec { * @return the field minus any parameters * @deffunc char *ap_field_noparam(apr_pool_t *p, const char *intype); */ -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); /** * Convert a time from an integer into a string in a specified format @@ -1073,7 +1073,7 @@ API_EXPORT(char *) ap_field_noparam(apr_pool_t *p, const char *intype); * @return The string that represents the specified time * @deffunc char *ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt) */ -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); /* String handling. The *_nc variants allow you to use non-const char **s as arguments (unfortunately C won't automatically convert a char ** to a const @@ -1087,7 +1087,7 @@ API_EXPORT(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int * @return A copy of the characters up to the first stop character * @deffunc char *ap_getword(apr_pool_t *p, const char **line, char stop); */ -API_EXPORT(char *) ap_getword(apr_pool_t *p, const char **line, char stop); +AP_DECLARE(char *) ap_getword(apr_pool_t *p, const char **line, char stop); /** * Get the characters until the first occurance of a specified character * @param p The pool to allocate memory out of @@ -1097,7 +1097,7 @@ API_EXPORT(char *) ap_getword(apr_pool_t *p, const char **line, char stop); * @tip This is the same as ap_getword, except it doesn't use const char **. * @deffunc char *ap_getword_nc(apr_pool_t *p, char **line, char stop); */ -API_EXPORT(char *) ap_getword_nc(apr_pool_t *p, char **line, char stop); +AP_DECLARE(char *) ap_getword_nc(apr_pool_t *p, char **line, char stop); /** * Get the first word from a given string. A word is defined as all characters @@ -1107,7 +1107,7 @@ API_EXPORT(char *) ap_getword_nc(apr_pool_t *p, char **line, char stop); * @retrn The first word in the line * @deffunc char *ap_getword_white(apr_pool_t *p, const char **line) */ -API_EXPORT(char *) ap_getword_white(apr_pool_t *p, const char **line); +AP_DECLARE(char *) ap_getword_white(apr_pool_t *p, const char **line); /** * Get the first word from a given string. A word is defined as all characters * up to the first whitespace. @@ -1117,7 +1117,7 @@ API_EXPORT(char *) ap_getword_white(apr_pool_t *p, const char **line); * @tip The same as ap_getword_white, except it doesn't use const char **. * @deffunc char *ap_getword_white_nc(apr_pool_t *p, const char **line) */ -API_EXPORT(char *) ap_getword_white_nc(apr_pool_t *p, char **line); +AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line); /** * Get all characters from the first occurance of stop to the first '\0' @@ -1128,7 +1128,7 @@ API_EXPORT(char *) ap_getword_white_nc(apr_pool_t *p, char **line); * character * @deffunc char *ap_getword_nulls(apr_pool_t *p, const char **line, char stop) */ -API_EXPORT(char *) ap_getword_nulls(apr_pool_t *p, const char **line, char stop); +AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *p, const char **line, char stop); /** * Get all characters from the first occurance of stop to the first '\0' * @param p The pool to allocate memory out of @@ -1139,7 +1139,7 @@ API_EXPORT(char *) ap_getword_nulls(apr_pool_t *p, const char **line, char stop) * @tip The same as ap_getword_nulls, except it doesn't use const char **. * @deffunc char *ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop) */ -API_EXPORT(char *) ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop); +AP_DECLARE(char *) ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop); /** * Get the second word in the string paying attention to quoting @@ -1148,7 +1148,7 @@ API_EXPORT(char *) ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop); * @return A copy of the string * @deffunc char *ap_getword_conf(apr_pool_t *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); /** * Get the second word in the string paying attention to quoting * @param p The pool to allocate out of @@ -1157,7 +1157,7 @@ API_EXPORT(char *) ap_getword_conf(apr_pool_t *p, const char **line); * @tip The same as ap_getword_conf, except it doesn't use const char **. * @deffunc char *ap_getword_conf_nc(apr_pool_t *p, char **line) */ -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); /** * Check a string for any ${ENV} environment variable construct and replace @@ -1169,7 +1169,7 @@ API_EXPORT(char *) ap_getword_conf_nc(apr_pool_t *p, char **line); * @return The string with the replaced environment variables * @deffunc const char *ap_resolve_env(apr_pool_t *p, const char *word) */ -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); /** * Size an HTTP header field list item, as separated by a comma. @@ -1181,7 +1181,7 @@ API_EXPORT(const char *) ap_resolve_env(apr_pool_t *p, const char * word); * character. len is the length of the item excluding any beginning whitespace. * @deffunc const char *ap_size_list_item(const char **field, int *len) */ -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); /** * Retrieve an HTTP header field list item, as separated by a comma, @@ -1194,7 +1194,7 @@ API_EXPORT(const char *) ap_size_list_item(const char **field, int *len); * shifted to the next non-comma, non-whitespace. * @deffunc char *ap_get_list_item(apr_pool_t *p, const char **field) */ -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); /** * Find an item in canonical form (lowercase, no extra spaces) within @@ -1205,7 +1205,7 @@ API_EXPORT(char *) ap_get_list_item(apr_pool_t *p, const char **field); * @return 1 if found, 0 if not found. * @deffunc int ap_find_list_item(apr_pool_t *p, const char *line, const char *tok) */ -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); /** * Retrieve a token, spacing over it and returning a pointer to @@ -1218,7 +1218,7 @@ API_EXPORT(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *t * @return the first non-white byte after the token * @deffunc char *ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white) */ -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); /** * find http tokens, see the definition of token from RFC2068 @@ -1228,7 +1228,7 @@ API_EXPORT(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int acc * @return 1 if the token is found, 0 otherwise * @deffunc int ap_find_token(apr_pool_t *p, const char *line, const char *tok) */ -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); /** * find http tokens from the end of the line @@ -1238,7 +1238,7 @@ API_EXPORT(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok); * @return 1 if the token is found, 0 otherwise * @deffunc int ap_find_last_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); /** * Check for an Absolute URI syntax @@ -1246,7 +1246,7 @@ API_EXPORT(int) ap_find_last_token(apr_pool_t *p, const char *line, const char * * @return 1 if URI, 0 otherwise * @deffunc int ap_is_url(const char *u) */ -API_EXPORT(int) ap_is_url(const char *u); +AP_DECLARE(int) ap_is_url(const char *u); /** * Unescape a URL @@ -1254,20 +1254,20 @@ API_EXPORT(int) ap_is_url(const char *u); * @return 0 on success, non-zero otherwise * @deffunc int ap_unescape_url(char *url) */ -API_EXPORT(int) ap_unescape_url(char *url); +AP_DECLARE(int) ap_unescape_url(char *url); /** * Remove all double slashes from a string * @param name The string to parse * @deffunc void ap_no2slash(char *name) */ -API_EXPORT(void) ap_no2slash(char *name); +AP_DECLARE(void) ap_no2slash(char *name); /** * Remove all ./ and ../ substrings from a file name * @param name the file name to parse * @deffunc void ap_getparents(char *name) */ -API_EXPORT(void) ap_getparents(char *name); +AP_DECLARE(void) ap_getparents(char *name); /** * Escape a path segment, as defined in RFC 1808 @@ -1276,7 +1276,7 @@ API_EXPORT(void) ap_getparents(char *name); * @return The converted URL * @deffunc char *ap_escape_path_segment(apr_pool_t *p, const char *s) */ -API_EXPORT(char *) ap_escape_path_segment(apr_pool_t *p, const char *s); +AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s); /** * convert an OS path to a URL in an OS dependant way. * @param p The pool to allocate out of @@ -1286,7 +1286,7 @@ API_EXPORT(char *) ap_escape_path_segment(apr_pool_t *p, const char *s); * @return The converted URL * @deffunc char *ap_os_escape_path(apr_pool_t *p, const char *path, int partial) */ -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); #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1) /** @@ -1296,7 +1296,7 @@ API_EXPORT(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partia * @return The escaped string * @deffunc char *ap_escape_html(apr_pool_t *p, const char *s) */ -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); /** * Construct a full hostname @@ -1307,7 +1307,7 @@ API_EXPORT(char *) ap_escape_html(apr_pool_t *p, const char *s); * @return The server's hostname * @deffunc char *ap_construct_server(apr_pool_t *p, const char *hostname, unsiged port, const request_rec *r) */ -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); /** * Escape a shell command @@ -1316,7 +1316,7 @@ API_EXPORT(char *) ap_construct_server(apr_pool_t *p, const char *hostname, * @return The escaped hostname * @deffunc char *ap_escape_shell_cmd(apr_pool_t *p, const char *s) */ -API_EXPORT(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *s); +AP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *s); /** * Count the number of directories in a path @@ -1324,7 +1324,7 @@ API_EXPORT(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *s); * @return The number of directories * @deffunc int ap_count_dirs(const char *path) */ -API_EXPORT(int) ap_count_dirs(const char *path); +AP_DECLARE(int) ap_count_dirs(const char *path); /** * Copy at most n leading directories of s into d d should be at least as * large as s plus 1 extra byte @@ -1337,7 +1337,7 @@ API_EXPORT(int) ap_count_dirs(const char *path); * whereas n = 1 returns the "d:/" root. On all other platforms, n = 0 * returns the empty string. */ -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); /** * return the parent directory name including trailing / of the file s * @param p The pool to allocate out of @@ -1345,7 +1345,7 @@ API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n); * @return A copy of the file's parent directory * @deffunc char *ap_make_dirstr_parent(apr_pool_t *p, const char *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); /** * Given a directory and filename, create a single path out of them. This @@ -1357,7 +1357,7 @@ API_EXPORT(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s); * @return A copy of the full path * @deffunc char *ap_make_full_path(apr_pool_t *a, const char *dir, const char *f) */ -API_EXPORT(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char *f); +AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char *f); /** * Does the provided string contain wildcard characters? This is useful @@ -1367,7 +1367,7 @@ API_EXPORT(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char * @return 1 if the string has wildcards, 0 otherwise * @deffunc int ap_is_matchexp(const char *str) */ -API_EXPORT(int) ap_is_matchexp(const char *str); +AP_DECLARE(int) ap_is_matchexp(const char *str); /** * Determine if a string matches a patterm containing the wildcards '?' or '*' @@ -1376,7 +1376,7 @@ API_EXPORT(int) ap_is_matchexp(const char *str); * @return 1 if the two strings match, 0 otherwise * @deffunc int ap_strcmp_match(const char *str, const char *exp) */ -API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp); +AP_DECLARE(int) ap_strcmp_match(const char *str, const char *exp); /** * Determine if a string matches a patterm containing the wildcards '?' or '*', * ignoring case @@ -1385,7 +1385,7 @@ API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp); * @return 1 if the two strings match, 0 otherwise * @deffunc int ap_strcasecmp_match(const char *str, const char *exp) */ -API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp); +AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *exp); /** * Find the first occurrence of the substring s2 in s1, regardless of case @@ -1394,7 +1394,7 @@ API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp); * @return A pointer to the beginning of the substring * @deffunc char *ap_strcasestr(const char *s1, const char *s2) */ -API_EXPORT(char *) ap_strcasestr(const char *s1, const char *s2); +AP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2); /** * Return a pointer to the location inside of bigstring immediately after prefix @@ -1403,7 +1403,7 @@ API_EXPORT(char *) ap_strcasestr(const char *s1, const char *s2); * @return A pointer relative to bigstring after prefix * deffunc char *ap_stripprefix(const char *bigstring, const char *prefix); */ -API_EXPORT(char *) ap_stripprefix(const char *bigstring, const char *prefix); +AP_DECLARE(char *) ap_stripprefix(const char *bigstring, const char *prefix); /** * Decode a base64 encoded string into memory allocated out of a pool @@ -1412,7 +1412,7 @@ API_EXPORT(char *) ap_stripprefix(const char *bigstring, const char *prefix); * @return The decoded string * @deffunc char *ap_pbase64decode(apr_pool_t *p, const char *bufcoded) */ -API_EXPORT(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded); +AP_DECLARE(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded); /** * Encode a string into memory allocated out of a pool in base 64 format @@ -1421,7 +1421,7 @@ API_EXPORT(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded); * @return The encoded string * @deffunc char *ap_pbase64encode(apr_pool_t *p, char *string) */ -API_EXPORT(char *) ap_pbase64encode(apr_pool_t *p, char *string); +AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string); #include "pcreposix.h" @@ -1439,7 +1439,7 @@ API_EXPORT(char *) ap_pbase64encode(apr_pool_t *p, char *string); * @return The compiled regular expression * @deffunc regex_t *ap_pregcomp(apr_pool_t *p, const char *pattern, int cflags) */ -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); /** * Free the memory associated with a compiled regular expression @@ -1447,7 +1447,7 @@ API_EXPORT(regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern, * @param reg The regular expression to free * @deffunc void ap_pregfree(apr_pool_t *p, regex_t *reg) */ -API_EXPORT(void) ap_pregfree(apr_pool_t *p, regex_t *reg); +AP_DECLARE(void) ap_pregfree(apr_pool_t *p, regex_t *reg); /** * Match a null-terminated string against a pre-compiled regex. @@ -1463,7 +1463,7 @@ API_EXPORT(void) ap_pregfree(apr_pool_t *p, regex_t *reg); * @return 0 for successful match, REG_NOMATCH otherwise * @deffunc int ap_regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) */ -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); /** @@ -1474,7 +1474,7 @@ API_EXPORT(int) ap_regexec(regex_t *preg, const char *string, * @param errbuf_size The size of the buffer * @deffunc size_t ap_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) */ -API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, +AP_DECLARE(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size); /** @@ -1489,7 +1489,7 @@ API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, * @param pmatch the pmatch array returned from ap_pregex * @deffunc char *ap_pregsub(apr_pool_t *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[]) */ -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[]); /** @@ -1498,13 +1498,13 @@ API_EXPORT(char *) ap_pregsub(apr_pool_t *p, const char *input, const char *sour * @param s The content-type to convert to lowercase * @deffunc void ap_content_type_tolower(char *s) */ -API_EXPORT(void) ap_content_type_tolower(char *s); +AP_DECLARE(void) ap_content_type_tolower(char *s); /** * convert a string to all lowercase * @param s The string to convert to lowercase * @deffunc void ap_str_tolower(char *s) */ -API_EXPORT(void) ap_str_tolower(char *s); +AP_DECLARE(void) ap_str_tolower(char *s); /** * Search a string from left to right for the first occurrence of a @@ -1514,7 +1514,7 @@ API_EXPORT(void) ap_str_tolower(char *s); * @return The index of the first occurrence of c in str * @deffunc int ap_ind(const char *str, char c) */ -API_EXPORT(int) ap_ind(const char *str, char c); /* Sigh... */ +AP_DECLARE(int) ap_ind(const char *str, char c); /* Sigh... */ /** * Search a string from right to left for the first occurrence of a @@ -1524,7 +1524,7 @@ API_EXPORT(int) ap_ind(const char *str, char c); /* Sigh... */ * @return The index of the first occurrence of c in str * @deffunc int ap_rind(const char *str, char c) */ -API_EXPORT(int) ap_rind(const char *str, char c); +AP_DECLARE(int) ap_rind(const char *str, char c); /** * Given a string, replace any bare " with \" . @@ -1533,7 +1533,7 @@ API_EXPORT(int) ap_rind(const char *str, char c); * @return A copy of the string with escaped quotes * @deffunc char * ap_escape_quotes(apr_pool_t *p, const char *instring) */ -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); /* Misc system hackery */ /** @@ -1542,40 +1542,40 @@ API_EXPORT(char *) ap_escape_quotes(apr_pool_t *p, const char *instring); * @return The user id corresponding to a name * @deffunc uid_t ap_uname2id(const char *name) */ -API_EXPORT(uid_t) ap_uname2id(const char *name); +AP_DECLARE(uid_t) ap_uname2id(const char *name); /** * Convert a group name to a numeric ID * @param name The name to convert * @return The group id corresponding to a name * @deffunc gid_t ap_gname2id(const char *name) */ -API_EXPORT(gid_t) ap_gname2id(const char *name); +AP_DECLARE(gid_t) ap_gname2id(const char *name); /** * Given the name of an object in the file system determine if it is a directory * @param name The name of the object to check * @return 1 if it is a directory, 0 otherwise * @deffunc int ap_is_rdirectory(const char *name) */ -API_EXPORT(int) ap_is_rdirectory(const char *name); +AP_DECLARE(int) ap_is_rdirectory(const char *name); /** * Given the name of an object in the file system determine if it is a directory - this version is symlink aware * @param name The name of the object to check * @return 1 if it is a directory, 0 otherwise * @deffunc int ap_is_directory(const char *name) */ -API_EXPORT(int) ap_is_directory(const char *name); +AP_DECLARE(int) ap_is_directory(const char *name); /** * Given a pathname in file, extract the directory and chdir to that directory * @param file The file who's directory we wish to switch to * @deffunc void ap_chdir_file(const char *file) */ -API_EXPORT(void) ap_chdir_file(const char *file); +AP_DECLARE(void) ap_chdir_file(const char *file); /** * Get the maximum number of daemons processes for this version of Apache * @return The maximum number of daemon processes * @deffunc int ap_get_max_daemons(void) */ -API_EXPORT(int) ap_get_max_daemons(void); +AP_DECLARE(int) ap_get_max_daemons(void); #ifdef _OSD_POSIX extern const char *os_set_account(apr_pool_t *p, const char *account); @@ -1614,7 +1614,7 @@ unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port); * @param nLine The line the assertion is defined on * @deffunc void ap_log_assert(const char *szExp, const char *szFile, int nLine) */ -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) __attribute__((noreturn)); #define ap_assert(exp) ((exp) ? (void)0 : ap_log_assert(#exp,__FILE__,__LINE__)) @@ -1644,7 +1644,7 @@ extern int raise_sigstop_flags; #define RAISE_SIGSTOP(x) #endif -API_EXPORT(extern const char *) ap_psignature(const char *prefix, request_rec *r); +AP_DECLARE(extern const char *) ap_psignature(const char *prefix, request_rec *r); /* strtoul does not exist on sunos4. */ #ifdef strtoul diff --git a/include/mpm_status.h b/include/mpm_status.h index 2c07223efe..aa222b9012 100644 --- a/include/mpm_status.h +++ b/include/mpm_status.h @@ -86,7 +86,7 @@ struct ap_status_table_row_t { * for the connection. * @deffunc const char *ap_get_connection_status(long conn_id, const char *key) */ -API_EXPORT(const char *) ap_get_connection_status(long conn_id, const char *key); +AP_DECLARE(const char *) ap_get_connection_status(long conn_id, const char *key); /** * Get an array of current connection IDs. @@ -94,7 +94,7 @@ API_EXPORT(const char *) ap_get_connection_status(long conn_id, const char *key) * @return An array of all the current connection IDs * @deffunc apr_array_header_t *ap_get_connections(apr_pool_t *p) */ -API_EXPORT(apr_array_header_t *) ap_get_connections(apr_pool_t *p); +AP_DECLARE(apr_array_header_t *) ap_get_connections(apr_pool_t *p); /** * Get an array of keys from a given connection. @@ -103,7 +103,7 @@ API_EXPORT(apr_array_header_t *) ap_get_connections(apr_pool_t *p); * @return an array of keys from a given connection * @deffunc apr_array_header_t *ap_get_connection_keys(apr_pool_t *p, long conn_id) */ -API_EXPORT(apr_array_header_t *) ap_get_connection_keys(apr_pool_t *p, +AP_DECLARE(apr_array_header_t *) ap_get_connection_keys(apr_pool_t *p, long conn_id); /** @@ -114,7 +114,7 @@ API_EXPORT(apr_array_header_t *) ap_get_connection_keys(apr_pool_t *p, * @param value value to set for the key * @deffunc void ap_update_connection_status(long conn_id, const char *key, const char *value) */ -API_EXPORT(void) ap_update_connection_status(long conn_id, const char *key, const char *value); +AP_DECLARE(void) ap_update_connection_status(long conn_id, const char *key, const char *value); /** * Clear out this connection's status values. Normally called when a @@ -122,7 +122,7 @@ API_EXPORT(void) ap_update_connection_status(long conn_id, const char *key, cons * @param conn_id The connection ID to clear * @deffunc void ap_reset_connection_status(long conn_id) */ -API_EXPORT(void) ap_reset_connection_status(long conn_id); +AP_DECLARE(void) ap_reset_connection_status(long conn_id); /** * Returns the most up-to-date status table available, in the form of an array @@ -131,7 +131,7 @@ API_EXPORT(void) ap_reset_connection_status(long conn_id); * @return The table of statuses for all connections * @deffunc apr_array_header_t *ap_get_status_table(apr_pool_t *p) */ -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); #endif /* APACHE_SERVER_STATS_H */ diff --git a/include/util_charset.h b/include/util_charset.h index 1b828b428c..7a24d2b8af 100644 --- a/include/util_charset.h +++ b/include/util_charset.h @@ -124,7 +124,7 @@ extern apr_xlate_t *ap_locale_from_ascii; * @param The translation handle to use for the actual work * @deffunc apr_status_t ap_set_content_xlate(request_rec *r, int output, apr_xlate_t *xlate) */ -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); #ifdef __cplusplus diff --git a/include/util_date.h b/include/util_date.h index d80391296b..400b922034 100644 --- a/include/util_date.h +++ b/include/util_date.h @@ -91,7 +91,7 @@ extern "C" { * @return 1 if the string matches, 0 otherwise * @deffunc int ap_checkmask(const char *data, const char *mask) */ -API_EXPORT(int) ap_checkmask(const char *data, const char *mask); +AP_DECLARE(int) ap_checkmask(const char *data, const char *mask); /** * Parses an HTTP date in one of three standard forms: @@ -105,7 +105,7 @@ API_EXPORT(int) ap_checkmask(const char *data, const char *mask); * 0 if this would be out of range or if the date is invalid. * @deffunc apr_time_t ap_parseHTTPdate(const char *date) */ -API_EXPORT(apr_time_t) ap_parseHTTPdate(const char *date); +AP_DECLARE(apr_time_t) ap_parseHTTPdate(const char *date); #ifdef __cplusplus } diff --git a/include/util_filter.h b/include/util_filter.h index a1d03c3879..8a9b959390 100644 --- a/include/util_filter.h +++ b/include/util_filter.h @@ -255,7 +255,7 @@ struct ap_filter_t { * @return apr_status_t value * @deffunc apr_status_t ap_get_brigade(ap_filter_t *filter, ap_bucket_brigade *bucket, apr_ssize_t length) */ -API_EXPORT(apr_status_t) ap_get_brigade(ap_filter_t *filter, ap_bucket_brigade *bucket, apr_ssize_t length); +AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *filter, ap_bucket_brigade *bucket, apr_ssize_t length); /** * Pass the current bucket brigade down to the next filter on the filter @@ -266,7 +266,7 @@ API_EXPORT(apr_status_t) ap_get_brigade(ap_filter_t *filter, ap_bucket_brigade * * @return apr_status_t value * @deffunc apr_status_t ap_pass_brigade(ap_filter_t *filter, ap_bucket_brigade *bucket) */ -API_EXPORT(apr_status_t) ap_pass_brigade(ap_filter_t *filter, ap_bucket_brigade *bucket); +AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *filter, ap_bucket_brigade *bucket); /* * ap_register_input_filter(): @@ -286,7 +286,7 @@ API_EXPORT(apr_status_t) ap_pass_brigade(ap_filter_t *filter, ap_bucket_brigade * @param The type of filter function, either AP_FTYPE_CONTENT or AP_FTYPE_CONNECTION * @deffunc void ap_register_input_filter(const char *name, ap_in_filter_func filter_func, ap_filter_type ftype) */ -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); /* @@ -307,7 +307,7 @@ API_EXPORT(void) ap_register_input_filter(const char *name, * @param The type of filter function, either AP_FTYPE_CONTENT or AP_FTYPE_CONNECTION * @deffunc void ap_register_output_filter(const char *name, ap_out_filter_func filter_func, ap_filter_type ftype) */ -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); @@ -334,7 +334,7 @@ API_EXPORT(void) ap_register_output_filter(const char *name, * @param c The connection to add the fillter for * @deffunc void ap_add_input_filter(const char *name, void *ctx, request_rec *r, conn_rec *c) */ -API_EXPORT(void) ap_add_input_filter(const char *name, void *ctx, request_rec *r, conn_rec *c); +AP_DECLARE(void) ap_add_input_filter(const char *name, void *ctx, request_rec *r, conn_rec *c); /** * Add a filter to the current request. Filters are added in a FIFO manner. @@ -345,7 +345,7 @@ API_EXPORT(void) ap_add_input_filter(const char *name, void *ctx, request_rec *r * @param c The connection to add this filter for * @deffunc void ap_add_output_filter(const char *name, void *ctx, request_rec *r, conn_rec *c) */ -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); /* The next two filters are for abstraction purposes only. They could be @@ -371,7 +371,7 @@ API_EXPORT(void) ap_add_output_filter(const char *name, void *ctx, * on return * @deffunc void ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to, ap_bucket_brigade **b) */ -API_EXPORT(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to, +AP_DECLARE(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to, ap_bucket_brigade **b); #ifdef __cplusplus diff --git a/include/util_md5.h b/include/util_md5.h index 71a87a99a2..d5df9e17d5 100644 --- a/include/util_md5.h +++ b/include/util_md5.h @@ -76,7 +76,7 @@ extern "C" { * @return The checksum * @deffunc char *ap_md5(apr_pool_t *a, const unsigned char *string) */ -API_EXPORT(char *) ap_md5(apr_pool_t *a, const unsigned char *string); +AP_DECLARE(char *) ap_md5(apr_pool_t *a, const unsigned char *string); /** * Create an MD5 checksum of a string of binary data @@ -86,7 +86,7 @@ API_EXPORT(char *) ap_md5(apr_pool_t *a, const unsigned char *string); * @return The checksum * @deffunc char *ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len) */ -API_EXPORT(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len); +AP_DECLARE(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len); /** * Convert an MD5 checksum into a base64 encoding @@ -95,7 +95,7 @@ API_EXPORT(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int le * @return The converted encoding * @deffunc char *ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context) */ -API_EXPORT(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context); +AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context); #ifdef APACHE_XLATE /** @@ -106,10 +106,10 @@ API_EXPORT(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context); * @warning The xlate parameter is only available if APACHE_XLATE is defined * @deffunc char *ap_md5digest(apr_pool_t *p, apr_file_t *infile, apr_xlate_t *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); #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); #endif #ifdef __cplusplus diff --git a/include/util_script.h b/include/util_script.h index 92573d3544..4896f17d5f 100644 --- a/include/util_script.h +++ b/include/util_script.h @@ -83,7 +83,7 @@ extern "C" { * use with an exec call. * @deffunc char **ap_create_environment(apr_pool_t *p, apr_table_t *t) */ -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); /** * This "cute" little function comes about because the path info on @@ -94,7 +94,7 @@ API_EXPORT(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t); * @return The length of the path info * @deffunc int ap_fine_path_info(const char *uri, const char *path_info) */ -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); /** * Add CGI environment variables required by HTTP/1.1 to the request's @@ -102,14 +102,14 @@ API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info); * @param r the current request * @deffunc void ap_add_cgi_vars(request_rec *r) */ -API_EXPORT(void) ap_add_cgi_vars(request_rec *r); +AP_DECLARE(void) ap_add_cgi_vars(request_rec *r); /** * Add common CGI environment variables to the requests environment table * @param r The current request * @deffunc void ap_add_common_vars(request_rec *r) */ -API_EXPORT(void) ap_add_common_vars(request_rec *r); +AP_DECLARE(void) ap_add_common_vars(request_rec *r); /** * Read headers output from a script, ensuring that the output is valid. If @@ -122,7 +122,7 @@ API_EXPORT(void) ap_add_common_vars(request_rec *r); * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise * @deffunc int ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer) */ -API_EXPORT(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer); +AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer); /** * Read headers strings from a script, ensuring that the output is valid. If @@ -138,7 +138,7 @@ API_EXPORT(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *b * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise * @deffunc int ap_scan_script_header_err_core(request_rec *r, char *buffer, int (*getsfunc)(char *, int, void *), void *getsfunc_data) */ -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, ...); @@ -156,7 +156,7 @@ API_EXPORT_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r, * @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise * @deffunc int ap_scan_script_header_err_core(request_rec *r, char *buffer, int (*getsfunc)(char *, int, void *), void *getsfunc_data) */ -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); @@ -169,7 +169,7 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, * @param r The currnt request * @deffunc void ap_send_size(apr_ssize_t size, request_rec *r) */ -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); #ifdef __cplusplus } diff --git a/include/util_uri.h b/include/util_uri.h index f3105fcd5c..a67ead165c 100644 --- a/include/util_uri.h +++ b/include/util_uri.h @@ -147,7 +147,7 @@ struct uri_components { * @return The default port for this scheme * @deffunc unsigned short ap_default_port_for_scheme(const char *scheme_str) */ -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); /** * Return the default for the current request @@ -155,7 +155,7 @@ API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str); * @return The default port * @deffunc unsigned short ap_default_port_for_request(const request_rec *r) */ -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); /** * Create a copy of a "struct hostent" record; it was presumably returned @@ -165,7 +165,7 @@ API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r); * @param hp hostent to duplicate * @deffunc struct hostent * ap_pduphostent(apr_pool_t *p, const struct hostent *hp) */ -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); /** * resolve hostname, if successful return an ALLOCATED COPY OF the hostent @@ -175,7 +175,7 @@ API_EXPORT(struct hostent *) ap_pduphostent(apr_pool_t *p, const struct hostent * @return The allocated hostent structure * @deffunc struct hostent * ap_pgethostbyname(apr_pool_t *p, const char *hostname) */ -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); /** * Unparse a uri_components structure to an URI string. Optionally suppress @@ -195,7 +195,7 @@ API_EXPORT(struct hostent *) ap_pgethostbyname(apr_pool_t *p, const char *hostna * @return The uri as a string * @deffunc char * ap_unparse_uri_components(apr_pool_t *p, const uri_components *uptr, unsigned flags) */ -API_EXPORT(char *) ap_unparse_uri_components(apr_pool_t *p, const uri_components *uptr, +AP_DECLARE(char *) ap_unparse_uri_components(apr_pool_t *p, const uri_components *uptr, unsigned flags); /** @@ -208,7 +208,7 @@ API_EXPORT(char *) ap_unparse_uri_components(apr_pool_t *p, const uri_components * @return An HTTP status code * @deffunc int ap_parse_uri_components(apr_pool_t *p, const char *uri, uri_components *uptr) */ -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); /** * Special case for CONNECT parsing: it comes with the hostinfo part only @@ -218,13 +218,13 @@ API_EXPORT(int) ap_parse_uri_components(apr_pool_t *p, const char *uri, uri_comp * @return An HTTP status code * @deffunc int ap_parse_hostinfo_components(apr_pool_t *p, const char *hostinfo, uri_components *uptr) */ -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); /** * Setup everything necessary to parse uri's * @deffunc void ap_util_uri_init(void) */ -API_EXPORT(void) ap_util_uri_init(void); +AP_DECLARE(void) ap_util_uri_init(void); #ifdef __cplusplus } diff --git a/include/util_xml.h b/include/util_xml.h index cdab08e8a2..8cdd50b1ad 100644 --- a/include/util_xml.h +++ b/include/util_xml.h @@ -99,7 +99,7 @@ struct ap_text_header { * @param text The new text to append * @deffunc void ap_text_append(apr_pool_t *p, ap_text_header *hdr, const char *text) */ -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); @@ -239,7 +239,7 @@ struct ap_xml_doc { * @return HTTP status code * @deffunc int ap_xml_parse_input(request_rec *r, ap_xml_doc **pdoc) */ -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); /** @@ -259,7 +259,7 @@ API_EXPORT(int) ap_xml_parse_input(request_rec *r, ap_xml_doc **pdoc); * @param psize Size of the converted text * @deffunc 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); */ -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); @@ -276,7 +276,7 @@ API_EXPORT(void) ap_xml_to_text(apr_pool_t *p, const ap_xml_elem *elem, * @return the string that was stored in the XML element * @deffunc const char *ap_xml_empty_elem(apr_pool_t *p, const ap_xml_elem *elem) */ -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); /** @@ -288,7 +288,7 @@ API_EXPORT(const char *) ap_xml_empty_elem(apr_pool_t *p, * @return The quoted string * @deffunc const char *ap_xml_quote_string(apr_pool_t *p, const char *s, int quotes) */ -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); /** @@ -297,7 +297,7 @@ API_EXPORT(const char *) ap_xml_quote_string(apr_pool_t *p, const char *s, * @param elem The element to quote * @deffunc void ap_xml_quote_elem(apr_pool_t *p, ap_xml_elem *elem) */ -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); /* manage an array of unique URIs: ap_xml_insert_uri() and AP_XML_URI_ITEM() */ @@ -308,7 +308,7 @@ API_EXPORT(void) ap_xml_quote_elem(apr_pool_t *p, ap_xml_elem *elem); * @return int The uri's index * @deffunc int ap_xml_insert_uri(apr_array_header_t *uri_array, const char *uri) */ -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); #define AP_XML_GET_URI_ITEM(ary, i) (((const char * const *)(ary)->elts)[i]) diff --git a/libhttpd.dsp b/libhttpd.dsp index 5bb90926d5..7ef454ef7b 100644 --- a/libhttpd.dsp +++ b/libhttpd.dsp @@ -42,7 +42,7 @@ RSC=rc.exe # PROP Intermediate_Dir ".\CoreR" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Intermediate_Dir ".\CoreD" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "API_EXPORT_SYMBOLS" /FD /c +# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "_DEBUG" /win32 diff --git a/modules/aaa/mod_access.c b/modules/aaa/mod_access.c index 3cf74bfa6b..500d2eab63 100644 --- a/modules/aaa/mod_access.c +++ b/modules/aaa/mod_access.c @@ -117,7 +117,7 @@ typedef struct { apr_array_header_t *denys; } access_dir_conf; -module MODULE_VAR_EXPORT access_module; +module AP_MODULE_DECLARE_DATA access_module; static void *create_access_dir_config(apr_pool_t *p, char *dummy) { @@ -409,7 +409,7 @@ static void register_hooks(void) ap_hook_access_checker(check_dir_access,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT access_module = +module AP_MODULE_DECLARE_DATA access_module = { STANDARD20_MODULE_STUFF, create_access_dir_config, /* dir config creater */ diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c index e2e84aba7c..e870955c1c 100644 --- a/modules/aaa/mod_auth.c +++ b/modules/aaa/mod_auth.c @@ -121,7 +121,7 @@ static const command_rec auth_cmds[] = {NULL} }; -module MODULE_VAR_EXPORT auth_module; +module AP_MODULE_DECLARE_DATA auth_module; static char *get_pw(request_rec *r, char *user, char *auth_pwfile) { @@ -324,7 +324,7 @@ static void register_hooks(void) ap_hook_auth_checker(check_user_access,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT auth_module = +module AP_MODULE_DECLARE_DATA auth_module = { STANDARD20_MODULE_STUFF, create_auth_dir_config, /* dir config creater */ diff --git a/modules/aaa/mod_auth_anon.c b/modules/aaa/mod_auth_anon.c index 22af52654e..36a0fd2887 100644 --- a/modules/aaa/mod_auth_anon.c +++ b/modules/aaa/mod_auth_anon.c @@ -210,7 +210,7 @@ static const command_rec anon_auth_cmds[] = {NULL} }; -module MODULE_VAR_EXPORT auth_anon_module; +module AP_MODULE_DECLARE_DATA auth_anon_module; static int anon_authenticate_basic_user(request_rec *r) { @@ -295,7 +295,7 @@ static void register_hooks(void) ap_hook_auth_checker(check_anon_access,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT auth_anon_module = +module AP_MODULE_DECLARE_DATA auth_anon_module = { STANDARD20_MODULE_STUFF, create_anon_auth_dir_config,/* dir config creater */ diff --git a/modules/aaa/mod_auth_dbm.c b/modules/aaa/mod_auth_dbm.c index 6c2837a953..fc2b4bb853 100644 --- a/modules/aaa/mod_auth_dbm.c +++ b/modules/aaa/mod_auth_dbm.c @@ -153,7 +153,7 @@ static const command_rec dbm_auth_cmds[] = {NULL} }; -module MODULE_VAR_EXPORT auth_dbm_module; +module AP_MODULE_DECLARE_DATA auth_dbm_module; static char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile) { @@ -333,7 +333,7 @@ static void register_hooks(void) ap_hook_auth_checker(dbm_check_auth, NULL, NULL, AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT auth_dbm_module = +module AP_MODULE_DECLARE_DATA auth_dbm_module = { STANDARD20_MODULE_STUFF, create_dbm_auth_dir_config, /* dir config creater */ diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 422b0e02e8..f83f396861 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -262,7 +262,7 @@ static long shmem_size = DEF_SHMEM_SIZE; static long num_buckets = DEF_NUM_BUCKETS; -module MODULE_VAR_EXPORT auth_digest_module; +module AP_MODULE_DECLARE_DATA auth_digest_module; /* * initialization code @@ -2061,7 +2061,7 @@ static void register_hooks(void) ap_hook_fixups(add_auth_info, NULL, NULL, AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT auth_digest_module = +module AP_MODULE_DECLARE_DATA auth_digest_module = { STANDARD20_MODULE_STUFF, create_digest_dir_config, /* dir config creater */ diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c index 1b2790ccf7..9f2ec924ed 100644 --- a/modules/cache/mod_file_cache.c +++ b/modules/cache/mod_file_cache.c @@ -130,7 +130,7 @@ #include "apr_mmap.h" #include "apr_strings.h" -module MODULE_VAR_EXPORT file_cache_module; +module AP_MODULE_DECLARE_DATA file_cache_module; static int once_through = 0; typedef struct { @@ -501,7 +501,7 @@ static const handler_rec file_cache_handlers[] = { NULL } }; -module MODULE_VAR_EXPORT file_cache_module = +module AP_MODULE_DECLARE_DATA file_cache_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-directory config structure */ diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index 0c6c4bbb13..c6d960bbeb 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -62,7 +62,7 @@ #include "http_config.h" #include "http_connection.h" -API_VAR_EXPORT module echo_module; +AP_DECLARE_DATA module echo_module; typedef struct { @@ -122,7 +122,7 @@ static void register_hooks(void) ap_hook_process_connection(process_echo_connection,NULL,NULL,AP_HOOK_MIDDLE); } -API_VAR_EXPORT module echo_module = { +AP_DECLARE_DATA module echo_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 6fe00b5f84..e9aeea84a8 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -124,7 +124,7 @@ #define RAW_ASCII_CHAR(ch) (ch) #endif /*CHARSET_EBCDIC*/ -module MODULE_VAR_EXPORT includes_module; +module AP_MODULE_DECLARE_DATA includes_module; /* just need some arbitrary non-NULL pointer which can't also be a request_rec */ #define NESTED_INCLUDE_MAGIC (&includes_module) @@ -2551,7 +2551,7 @@ static void register_hooks(void) ap_register_output_filter("INCLUDES", includes_filter, AP_FTYPE_CONTENT); } -module MODULE_VAR_EXPORT includes_module = +module AP_MODULE_DECLARE_DATA includes_module = { STANDARD20_MODULE_STUFF, create_includes_dir_config, /* dir config creater */ diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c index bb45f812dc..c9ed4c9197 100644 --- a/modules/generators/mod_asis.c +++ b/modules/generators/mod_asis.c @@ -128,7 +128,7 @@ static const handler_rec asis_handlers[] = {NULL} }; -module MODULE_VAR_EXPORT asis_module = +module AP_MODULE_DECLARE_DATA asis_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-directory config structure */ diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index db23d9a7a1..ff0c990795 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -85,7 +85,7 @@ #include <strings.h> #endif -module MODULE_VAR_EXPORT autoindex_module; +module AP_MODULE_DECLARE_DATA autoindex_module; /**************************************************************** * @@ -1693,7 +1693,7 @@ static const handler_rec autoindex_handlers[] = {NULL} }; -module MODULE_VAR_EXPORT autoindex_module = +module AP_MODULE_DECLARE_DATA autoindex_module = { STANDARD20_MODULE_STUFF, create_autoindex_config, /* dir config creater */ diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 2627f4f7bb..d1429d1747 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -91,7 +91,7 @@ #include <strings.h> #endif -module MODULE_VAR_EXPORT cgi_module; +module AP_MODULE_DECLARE_DATA cgi_module; /* KLUDGE --- for back-combatibility, we don't have to check ExecCGI * in ScriptAliased directories, which means we need to know if this @@ -700,7 +700,7 @@ static const handler_rec cgi_handlers[] = {NULL} }; -module MODULE_VAR_EXPORT cgi_module = +module AP_MODULE_DECLARE_DATA cgi_module = { STANDARD20_MODULE_STUFF, NULL, /* dir config creater */ diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 46763f8f0d..d388bbeb56 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -104,7 +104,7 @@ #include <sys/un.h> /* for sockaddr_un */ #include <sys/types.h> -module MODULE_VAR_EXPORT cgid_module; +module AP_MODULE_DECLARE_DATA cgid_module; static void cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server); static int once_through = 0; @@ -1040,7 +1040,7 @@ static void register_hook(void) ap_hook_post_config(cgid_init, NULL, NULL, AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT cgid_module = { +module AP_MODULE_DECLARE_DATA cgid_module = { STANDARD20_MODULE_STUFF, NULL, /* dir config creater */ NULL, /* dir merger --- default is to override */ diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c index 6a8758cbf8..3ab2e30633 100644 --- a/modules/generators/mod_info.c +++ b/modules/generators/mod_info.c @@ -112,7 +112,7 @@ typedef struct { char *fname; } info_clines; -module MODULE_VAR_EXPORT info_module; +module AP_MODULE_DECLARE_DATA info_module; extern module *top_module; /* shamelessly lifted from http_config.c */ @@ -733,7 +733,7 @@ static const handler_rec info_handlers[] = {NULL} }; -module MODULE_VAR_EXPORT info_module = +module AP_MODULE_DECLARE_DATA info_module = { STANDARD_MODULE_STUFF, NULL, /* initializer */ diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index de9dc88b89..fff13b21e2 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -68,7 +68,7 @@ #define STATUS_MAGIC_TYPE "application/x-httpd-status" -module MODULE_VAR_EXPORT status_module; +module AP_MODULE_DECLARE_DATA status_module; static int print_status_value(void *data, const char *key, const char *val) { @@ -127,7 +127,7 @@ static const handler_rec status_handlers[] = {NULL} }; -module MODULE_VAR_EXPORT status_module = +module AP_MODULE_DECLARE_DATA status_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config */ diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 70266772b8..40ad030f80 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -375,7 +375,7 @@ static void *merge_core_server_configs(apr_pool_t *p, void *basev, void *virtv) * these are part of the core server config. */ -CORE_EXPORT(void) ap_add_per_dir_conf(server_rec *s, void *dir_config) +AP_CORE_DECLARE(void) ap_add_per_dir_conf(server_rec *s, void *dir_config) { core_server_config *sconf = ap_get_module_config(s->module_config, &core_module); @@ -384,7 +384,7 @@ CORE_EXPORT(void) ap_add_per_dir_conf(server_rec *s, void *dir_config) *new_space = dir_config; } -CORE_EXPORT(void) ap_add_per_url_conf(server_rec *s, void *url_config) +AP_CORE_DECLARE(void) ap_add_per_url_conf(server_rec *s, void *url_config) { core_server_config *sconf = ap_get_module_config(s->module_config, &core_module); @@ -393,7 +393,7 @@ CORE_EXPORT(void) ap_add_per_url_conf(server_rec *s, void *url_config) *new_space = url_config; } -CORE_EXPORT(void) ap_add_file_conf(core_dir_config *conf, void *url_config) +AP_CORE_DECLARE(void) ap_add_file_conf(core_dir_config *conf, void *url_config) { void **new_space = (void **)apr_push_array(conf->sec); @@ -510,7 +510,7 @@ void ap_core_reorder_directories(apr_pool_t *p, server_rec *s) * here... */ -API_EXPORT(int) ap_allow_options(request_rec *r) +AP_DECLARE(int) ap_allow_options(request_rec *r) { core_dir_config *conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); @@ -518,7 +518,7 @@ API_EXPORT(int) ap_allow_options(request_rec *r) return conf->opts; } -API_EXPORT(int) ap_allow_overrides(request_rec *r) +AP_DECLARE(int) ap_allow_overrides(request_rec *r) { core_dir_config *conf; conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, @@ -527,7 +527,7 @@ API_EXPORT(int) ap_allow_overrides(request_rec *r) return conf->override; } -API_EXPORT(const char *) ap_auth_type(request_rec *r) +AP_DECLARE(const char *) ap_auth_type(request_rec *r) { core_dir_config *conf; @@ -536,7 +536,7 @@ API_EXPORT(const char *) ap_auth_type(request_rec *r) return conf->ap_auth_type; } -API_EXPORT(const char *) ap_auth_name(request_rec *r) +AP_DECLARE(const char *) ap_auth_name(request_rec *r) { core_dir_config *conf; @@ -545,7 +545,7 @@ API_EXPORT(const char *) ap_auth_name(request_rec *r) return conf->ap_auth_name; } -API_EXPORT(const char *) ap_default_type(request_rec *r) +AP_DECLARE(const char *) ap_default_type(request_rec *r) { core_dir_config *conf; @@ -556,7 +556,7 @@ API_EXPORT(const char *) ap_default_type(request_rec *r) : DEFAULT_CONTENT_TYPE; } -API_EXPORT(const char *) ap_document_root(request_rec *r) /* Don't use this! */ +AP_DECLARE(const char *) ap_document_root(request_rec *r) /* Don't use this! */ { core_server_config *conf; @@ -565,7 +565,7 @@ API_EXPORT(const char *) ap_document_root(request_rec *r) /* Don't use this! */ return conf->ap_document_root; } -API_EXPORT(const apr_array_header_t *) ap_requires(request_rec *r) +AP_DECLARE(const apr_array_header_t *) ap_requires(request_rec *r) { core_dir_config *conf; @@ -574,7 +574,7 @@ API_EXPORT(const apr_array_header_t *) ap_requires(request_rec *r) return conf->ap_requires; } -API_EXPORT(int) ap_satisfies(request_rec *r) +AP_DECLARE(int) ap_satisfies(request_rec *r) { core_dir_config *conf; @@ -632,7 +632,7 @@ static apr_inline void do_double_reverse (conn_rec *conn) conn->double_reverse = -1; } -API_EXPORT(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, +AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type) { struct in_addr *iaddr; @@ -700,7 +700,7 @@ API_EXPORT(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, } } -API_EXPORT(const char *) ap_get_remote_logname(request_rec *r) +AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r) { core_dir_config *dir_conf; @@ -733,7 +733,7 @@ API_EXPORT(const char *) ap_get_remote_logname(request_rec *r) * The assumption is that DNS lookups are sufficiently quick... * -- fanf 1998-10-03 */ -API_EXPORT(const char *) ap_get_server_name(request_rec *r) +AP_DECLARE(const char *) ap_get_server_name(request_rec *r) { conn_rec *conn = r->connection; core_dir_config *d; @@ -767,7 +767,7 @@ API_EXPORT(const char *) ap_get_server_name(request_rec *r) return r->server->server_hostname; } -API_EXPORT(unsigned) ap_get_server_port(const request_rec *r) +AP_DECLARE(unsigned) ap_get_server_port(const request_rec *r) { unsigned port; core_dir_config *d = @@ -784,7 +784,7 @@ API_EXPORT(unsigned) ap_get_server_port(const request_rec *r) return port; } -API_EXPORT(char *) ap_construct_url(apr_pool_t *p, const char *uri, +AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r) { unsigned port = ap_get_server_port(r); @@ -796,7 +796,7 @@ API_EXPORT(char *) ap_construct_url(apr_pool_t *p, const char *uri, return apr_psprintf(p, "%s://%s:%u%s", ap_http_method(r), host, port, uri); } -API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r) +AP_DECLARE(unsigned long) ap_get_limit_req_body(const request_rec *r) { core_dir_config *d = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); @@ -968,7 +968,7 @@ static char* get_interpreter_from_win32_registry(apr_pool_t *p, const char* ext, return buffer; } -API_EXPORT (file_type_e) ap_get_win32_interpreter(const request_rec *r, +AP_DECLARE (file_type_e) ap_get_win32_interpreter(const request_rec *r, char** interpreter, char** arguments) { @@ -1108,7 +1108,7 @@ static const ap_directive_t * find_parent(const ap_directive_t *dirp, return NULL; } -API_EXPORT(const char *) ap_check_cmd_context(cmd_parms *cmd, +AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden) { const char *gt = (cmd->cmd->name[0] == '<' @@ -1234,7 +1234,7 @@ static const char *set_document_root(cmd_parms *cmd, void *dummy, return NULL; } -API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string) +AP_DECLARE(void) ap_custom_response(request_rec *r, int status, char *string) { core_dir_config *conf = ap_get_module_config(r->per_dir_config, &core_module); @@ -1460,7 +1460,7 @@ static const char *require(cmd_parms *cmd, void *c_, const char *arg) return NULL; } -CORE_EXPORT_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, +AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg) { const char *limited_methods = ap_getword(cmd->pool, &arg, '>'); void *tog = cmd->cmd->cmd_data; @@ -1781,7 +1781,7 @@ static const char *start_ifmod(cmd_parms *cmd, void *mconfig, const char *arg) } } -API_EXPORT(int) ap_exists_config_define(const char *name) +AP_DECLARE(int) ap_exists_config_define(const char *name) { char **defines; int i; @@ -2228,7 +2228,7 @@ static const char *set_loglevel(cmd_parms *cmd, void *dummy, const char *arg) return NULL; } -API_EXPORT(const char *) ap_psignature(const char *prefix, request_rec *r) +AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r) { char sport[20]; core_dir_config *conf; @@ -2306,12 +2306,12 @@ static apr_status_t reset_version(void *dummy) return APR_SUCCESS; } -API_EXPORT(const char *) ap_get_server_version(void) +AP_DECLARE(const char *) ap_get_server_version(void) { return (server_version ? server_version : AP_SERVER_BASEVERSION); } -API_EXPORT(void) ap_add_version_component(apr_pool_t *pconf, const char *component) +AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component) { if (! version_locked) { /* @@ -2484,7 +2484,7 @@ static const char *set_limit_xml_req_body(cmd_parms *cmd, void *conf_, return NULL; } -API_EXPORT(size_t) ap_get_limit_xml_body(const request_rec *r) +AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r) { core_dir_config *conf; @@ -2866,7 +2866,7 @@ AP_INIT_ITERATE("AddInputFilter", add_input_filter, NULL, ACCESS_CONF, * Core handlers for various phases of server operation... */ -API_EXPORT_NONSTD(int) ap_core_translate(request_rec *r) +AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r) { void *sconf = r->server->module_config; core_server_config *conf = ap_get_module_config(sconf, &core_module); @@ -3587,7 +3587,7 @@ static void register_hooks(void) ap_register_output_filter("BUFFER", buffer_filter, AP_FTYPE_CONNECTION); } -API_VAR_EXPORT module core_module = { +AP_DECLARE_DATA module core_module = { STANDARD20_MODULE_STUFF, create_core_dir_config, /* create per-directory config structure */ merge_core_dir_configs, /* merge per-directory config structures */ diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index c813a63c4f..63985cbc99 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -251,7 +251,7 @@ static int parse_byterange(char *range, long clength, long *start, long *end) static int internal_byterange(int, long *, request_rec *, const char **, apr_off_t *, apr_size_t *); -API_EXPORT(int) ap_set_byterange(request_rec *r) +AP_DECLARE(int) ap_set_byterange(request_rec *r) { const char *range, *if_range, *match; long range_start, range_end; @@ -324,7 +324,7 @@ API_EXPORT(int) ap_set_byterange(request_rec *r) return 1; } -API_EXPORT(int) ap_each_byterange(request_rec *r, apr_off_t *offset, +AP_DECLARE(int) ap_each_byterange(request_rec *r, apr_off_t *offset, apr_size_t *length) { return internal_byterange(1, NULL, r, &r->range, offset, length); @@ -414,14 +414,14 @@ static int internal_byterange(int realreq, long *tlength, request_rec *r, return 1; } -API_EXPORT(int) ap_set_content_length(request_rec *r, long clength) +AP_DECLARE(int) ap_set_content_length(request_rec *r, long clength) { r->clength = clength; apr_table_setn(r->headers_out, "Content-Length", apr_psprintf(r->pool, "%ld", clength)); return 0; } -API_EXPORT(int) ap_set_keepalive(request_rec *r) +AP_DECLARE(int) ap_set_keepalive(request_rec *r) { int ka_sent = 0; int wimpy = ap_find_token(r->pool, @@ -519,7 +519,7 @@ API_EXPORT(int) ap_set_keepalive(request_rec *r) * to limit the number of calls to time(). We don't check for futurosity * unless the mtime is at least as new as the reference. */ -API_EXPORT(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime) +AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime) { apr_time_t now; @@ -536,7 +536,7 @@ API_EXPORT(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime) return (mtime > now) ? now : mtime; } -API_EXPORT(int) ap_meets_conditions(request_rec *r) +AP_DECLARE(int) ap_meets_conditions(request_rec *r) { const char *etag = apr_table_get(r->headers_out, "ETag"); const char *if_match, *if_modified_since, *if_unmodified, *if_nonematch; @@ -651,7 +651,7 @@ API_EXPORT(int) ap_meets_conditions(request_rec *r) * could be modified again in as short an interval. We rationalize the * modification time we're given to keep it from being in the future. */ -API_EXPORT(char *) ap_make_etag(request_rec *r, int force_weak) +AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak) { char *etag; char *weak; @@ -687,7 +687,7 @@ API_EXPORT(char *) ap_make_etag(request_rec *r, int force_weak) return etag; } -API_EXPORT(void) ap_set_etag(request_rec *r) +AP_DECLARE(void) ap_set_etag(request_rec *r) { char *etag; char *variant_etag, *vlv; @@ -736,7 +736,7 @@ API_EXPORT(void) ap_set_etag(request_rec *r) * of the mtime field in the request structure - rationalized to keep it from * being in the future. */ -API_EXPORT(void) ap_set_last_modified(request_rec *r) +AP_DECLARE(void) ap_set_last_modified(request_rec *r) { apr_time_t mod_time = ap_rationalize_mtime(r, r->mtime); char *datestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN); @@ -751,7 +751,7 @@ API_EXPORT(void) ap_set_last_modified(request_rec *r) * list. Hopefully it (and other routines) can eventually be moved to * something like a mod_http_methods.c, complete with config stuff. */ -API_EXPORT(int) ap_method_number_of(const char *method) +AP_DECLARE(int) ap_method_number_of(const char *method) { switch (*method) { case 'H': @@ -814,7 +814,7 @@ API_EXPORT(int) ap_method_number_of(const char *method) * Turn a known method number into a name. Doesn't work for * extension methods, obviously. */ -API_EXPORT(const char *) ap_method_name_of(int methnum) +AP_DECLARE(const char *) ap_method_name_of(int methnum) { static const char *AP_HTTP_METHODS[METHODS] = { NULL }; @@ -1061,7 +1061,7 @@ static int getline(char *s, int n, conn_rec *c, int fold) * - sets r->uri to request uri (without r->args part) * - sets r->hostname (if not set already) from request (scheme://host:port) */ -CORE_EXPORT(void) ap_parse_uri(request_rec *r, const char *uri) +AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri) { int status = HTTP_OK; @@ -1483,7 +1483,7 @@ void ap_finalize_sub_req_protocol(request_rec *sub) * Support for the Basic authentication protocol, and a bit for Digest. */ -API_EXPORT(void) ap_note_auth_failure(request_rec *r) +AP_DECLARE(void) ap_note_auth_failure(request_rec *r) { if (!strcasecmp(ap_auth_type(r), "Basic")) ap_note_basic_auth_failure(r); @@ -1491,7 +1491,7 @@ API_EXPORT(void) ap_note_auth_failure(request_rec *r) ap_note_digest_auth_failure(r); } -API_EXPORT(void) ap_note_basic_auth_failure(request_rec *r) +AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r) { if (strcasecmp(ap_auth_type(r), "Basic")) ap_note_auth_failure(r); @@ -1502,7 +1502,7 @@ API_EXPORT(void) ap_note_basic_auth_failure(request_rec *r) NULL)); } -API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r) +AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r) { apr_table_setn(r->err_headers_out, r->proxyreq ? "Proxy-Authenticate" : "WWW-Authenticate", @@ -1510,7 +1510,7 @@ API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r) ap_auth_name(r), r->request_time)); } -API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) +AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) { const char *auth_line = apr_table_get(r->headers_in, r->proxyreq ? "Proxy-Authorization" @@ -1639,7 +1639,7 @@ static const char * const status_lines[RESPONSE_CODES] = * If that sad event occurs, replace the code below with a linear search * from status_lines[shortcut[i]] to status_lines[shortcut[i+1]-1]; */ -API_EXPORT(int) ap_index_of_response(int status) +AP_DECLARE(int) ap_index_of_response(int status) { static int shortcut[6] = {0, LEVEL_200, LEVEL_300, LEVEL_400, LEVEL_500, RESPONSE_CODES}; @@ -1663,7 +1663,7 @@ API_EXPORT(int) ap_index_of_response(int status) return LEVEL_500; /* 600 or above is also illegal */ } -API_EXPORT(const char *) ap_get_status_line(int status) +AP_DECLARE(const char *) ap_get_status_line(int status) { return status_lines[ap_index_of_response(status)]; } @@ -1673,13 +1673,13 @@ API_EXPORT(const char *) ap_get_status_line(int status) * In other words, don't change this one without checking table_do in alloc.c. * It returns true unless there was a write error of some kind. */ -API_EXPORT_NONSTD(int) ap_send_header_field(request_rec *r, +AP_DECLARE_NONSTD(int) ap_send_header_field(request_rec *r, const char *fieldname, const char *fieldval) { return (0 < checked_bputstrs(r, fieldname, ": ", fieldval, CRLF, NULL)); } -API_EXPORT(void) ap_basic_http_header(request_rec *r) +AP_DECLARE(void) ap_basic_http_header(request_rec *r) { char *protocol; char *date = NULL; @@ -1757,7 +1757,7 @@ static void terminate_header(request_rec *r) * Create a new method list with the specified number of preallocated * extension slots. */ -API_EXPORT(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts) +AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts) { ap_method_list_t *ml; @@ -1771,7 +1771,7 @@ API_EXPORT(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts) * Make a copy of a method list (primarily for subrequests that may * subsequently change it; don't want them changing the parent's, too!). */ -API_EXPORT(void) ap_copy_method_list(ap_method_list_t *dest, +AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest, ap_method_list_t *src) { int i; @@ -1789,7 +1789,7 @@ API_EXPORT(void) ap_copy_method_list(ap_method_list_t *dest, /* * Invoke a callback routine for each method in the specified list. */ -API_EXPORT_NONSTD(void) ap_method_list_do(int (*comp) (void *urec, const char *mname, +AP_DECLARE_NONSTD(void) ap_method_list_do(int (*comp) (void *urec, const char *mname, int mnum), void *rec, const ap_method_list_t *ml, ...) @@ -1800,7 +1800,7 @@ API_EXPORT_NONSTD(void) ap_method_list_do(int (*comp) (void *urec, const char *m va_end(vp); } -API_EXPORT(void) ap_method_list_vdo(int (*comp) (void *mrec, +AP_DECLARE(void) ap_method_list_vdo(int (*comp) (void *mrec, const char *mname, int mnum), void *rec, const ap_method_list_t *ml, @@ -1813,7 +1813,7 @@ API_EXPORT(void) ap_method_list_vdo(int (*comp) (void *mrec, * Return true if the specified HTTP method is in the provided * method list. */ -API_EXPORT(int) ap_method_in_list(ap_method_list_t *l, const char *method) +AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method) { int methnum; int i; @@ -1844,7 +1844,7 @@ API_EXPORT(int) ap_method_in_list(ap_method_list_t *l, const char *method) /* * Add the specified method to a method list (if it isn't already there). */ -API_EXPORT(void) ap_method_list_add(ap_method_list_t *l, const char *method) +AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method) { int methnum; int i; @@ -1877,7 +1877,7 @@ API_EXPORT(void) ap_method_list_add(ap_method_list_t *l, const char *method) /* * Remove the specified method from a method list. */ -API_EXPORT(void) ap_method_list_remove(ap_method_list_t *l, +AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l, const char *method) { int methnum; @@ -1914,7 +1914,7 @@ API_EXPORT(void) ap_method_list_remove(ap_method_list_t *l, /* * Reset a method list to be completely empty. */ -API_EXPORT(void) ap_clear_method_list(ap_method_list_t *l) +AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l) { l->method_mask = 0; l->method_list->nelts = 0; @@ -1966,7 +1966,7 @@ static char *make_allow(request_rec *r) return list + 2; } -API_EXPORT(int) ap_send_http_trace(request_rec *r) +AP_DECLARE(int) ap_send_http_trace(request_rec *r) { int rv; @@ -2107,7 +2107,7 @@ static void fixup_vary(request_rec *r) } } -API_EXPORT(void) ap_send_http_header(request_rec *r) +AP_DECLARE(void) ap_send_http_header(request_rec *r) { int i; const long int zero = 0L; @@ -2221,7 +2221,7 @@ API_EXPORT(void) ap_send_http_header(request_rec *r) * information for any wrappers around the response message body * (i.e., transfer encodings). It should have been named finalize_response. */ -API_EXPORT(void) ap_finalize_request_protocol(request_rec *r) +AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r) { /* tell the filter chain there is no more content coming */ if (!r->eos_sent) { @@ -2268,7 +2268,7 @@ API_EXPORT(void) ap_finalize_request_protocol(request_rec *r) * If an error occurs on input, we force an end to keepalive. */ -API_EXPORT(int) ap_setup_client_block(request_rec *r, int read_policy) +AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy) { const char *tenc = apr_table_get(r->headers_in, "Transfer-Encoding"); const char *lenp = apr_table_get(r->headers_in, "Content-Length"); @@ -2347,7 +2347,7 @@ API_EXPORT(int) ap_setup_client_block(request_rec *r, int read_policy) return OK; } -API_EXPORT(int) ap_should_client_block(request_rec *r) +AP_DECLARE(int) ap_should_client_block(request_rec *r) { /* First check if we have already read the request body */ @@ -2401,7 +2401,7 @@ static long get_chunk_size(char *b) * hold a chunk-size line, including any extensions. For now, we'll leave * that to the caller, at least until we can come up with a better solution. */ -API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz) +AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz) { int c; apr_size_t len_to_read; @@ -2618,7 +2618,7 @@ API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz) * if ((retval = ap_discard_request_body(r)) != OK) * return retval; */ -API_EXPORT(int) ap_discard_request_body(request_rec *r) +AP_DECLARE(int) ap_discard_request_body(request_rec *r) { int rv; @@ -2650,7 +2650,7 @@ API_EXPORT(int) ap_discard_request_body(request_rec *r) /* * Send the body of a response to the client. */ -API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, +AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t len, apr_size_t *nbytes) { ap_bucket_brigade *bb = NULL; @@ -2678,7 +2678,7 @@ API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of } #if 0 /* Leave the old implementation around temporarily for reference purposes */ -API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, +AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t length, apr_size_t *nbytes) { apr_status_t rv = APR_SUCCESS; @@ -2768,7 +2768,7 @@ API_EXPORT(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of #endif /* send data from an in-memory buffer */ -API_EXPORT(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, +AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, size_t length) { ap_bucket_brigade *bb = NULL; @@ -2787,7 +2787,7 @@ API_EXPORT(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, } #endif /* USE_MMAP_FILES */ -API_EXPORT(int) ap_rputc(int c, request_rec *r) +AP_DECLARE(int) ap_rputc(int c, request_rec *r) { ap_bucket_brigade *bb = NULL; ap_bucket *b; @@ -2805,7 +2805,7 @@ API_EXPORT(int) ap_rputc(int c, request_rec *r) return c; } -API_EXPORT(int) ap_rputs(const char *str, request_rec *r) +AP_DECLARE(int) ap_rputs(const char *str, request_rec *r) { ap_bucket_brigade *bb = NULL; ap_bucket *b; @@ -2825,7 +2825,7 @@ API_EXPORT(int) ap_rputs(const char *str, request_rec *r) return len; } -API_EXPORT(int) ap_rwrite(const void *buf, int nbyte, request_rec *r) +AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r) { ap_bucket_brigade *bb = NULL; ap_bucket *b; @@ -2842,7 +2842,7 @@ API_EXPORT(int) ap_rwrite(const void *buf, int nbyte, request_rec *r) return nbyte; } -API_EXPORT(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va) +AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va) { ap_bucket_brigade *bb = NULL; apr_ssize_t written; @@ -2860,7 +2860,7 @@ API_EXPORT(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va) /* TODO: Make ap pa_bucket_vprintf that printfs directly into a * bucket. */ -API_EXPORT_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt, ...) +AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt, ...) { va_list va; int n; @@ -2875,7 +2875,7 @@ API_EXPORT_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt, ...) return n; } -API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r, ...) +AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r, ...) { ap_bucket_brigade *bb = NULL; apr_ssize_t written; @@ -2892,7 +2892,7 @@ API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r, ...) return written; } -API_EXPORT(int) ap_rflush(request_rec *r) +AP_DECLARE(int) ap_rflush(request_rec *r) { /* ### this is probably incorrect, but we have no mechanism for telling ### the filter chain to flush any content they may be holding. @@ -3152,7 +3152,7 @@ static const char *get_canned_error_string(int status, * and 5xx (server error) messages that have not been redirected to another * handler via the ErrorDocument feature. */ -API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error) +AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error) { int status = r->status; int idx = ap_index_of_response(status); diff --git a/modules/http/http_request.c b/modules/http/http_request.c index edcfbe93af..faf7afc9b1 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -817,7 +817,7 @@ static request_rec *make_sub_request(const request_rec *r) return rr; } -API_EXPORT(request_rec *) ap_sub_req_method_uri(const char *method, +AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method, const char *new_file, const request_rec *r) { @@ -908,13 +908,13 @@ API_EXPORT(request_rec *) ap_sub_req_method_uri(const char *method, return rnew; } -API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file, +AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_file, const request_rec *r) { return ap_sub_req_method_uri("GET", new_file, r); } -API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file, +AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, const request_rec *r) { request_rec *rnew; @@ -1039,7 +1039,7 @@ API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file, return rnew; } -API_EXPORT(int) ap_run_sub_req(request_rec *r) +AP_DECLARE(int) ap_run_sub_req(request_rec *r) { int retval; @@ -1050,7 +1050,7 @@ API_EXPORT(int) ap_run_sub_req(request_rec *r) return retval; } -API_EXPORT(void) ap_destroy_sub_req(request_rec *r) +AP_DECLARE(void) ap_destroy_sub_req(request_rec *r) { /* Reclaim the space */ apr_destroy_pool(r->pool); @@ -1061,7 +1061,7 @@ API_EXPORT(void) ap_destroy_sub_req(request_rec *r) * Mainline request processing... */ -API_EXPORT(void) ap_die(int type, request_rec *r) +AP_DECLARE(void) ap_die(int type, request_rec *r) { int error_index = ap_index_of_response(type); char *custom_response = ap_response_code_string(r, error_index); @@ -1176,7 +1176,7 @@ static void decl_die(int status, char *phase, request_rec *r) ap_die(status, r); } -API_EXPORT(int) ap_some_auth_required(request_rec *r) +AP_DECLARE(int) ap_some_auth_required(request_rec *r) { /* Is there a require line configured for the type of *this* req? */ @@ -1459,7 +1459,7 @@ static request_rec *internal_internal_redirect(const char *new_uri, return new; } -API_EXPORT(void) ap_internal_redirect(const char *new_uri, request_rec *r) +AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r) { request_rec *new = internal_internal_redirect(new_uri, r); process_request_internal(new); @@ -1469,7 +1469,7 @@ API_EXPORT(void) ap_internal_redirect(const char *new_uri, request_rec *r) * using AddHandler, and you want to preserve the content type across * an internal redirect. */ -API_EXPORT(void) ap_internal_redirect_handler(const char *new_uri, request_rec *r) +AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *r) { request_rec *new = internal_internal_redirect(new_uri, r); if (r->handler) @@ -1480,7 +1480,7 @@ API_EXPORT(void) ap_internal_redirect_handler(const char *new_uri, request_rec * /* * Is it the initial main request, which we only get *once* per HTTP request? */ -API_EXPORT(int) ap_is_initial_req(request_rec *r) +AP_DECLARE(int) ap_is_initial_req(request_rec *r) { return (r->main == NULL) /* otherwise, this is a sub-request */ @@ -1492,14 +1492,14 @@ API_EXPORT(int) ap_is_initial_req(request_rec *r) * Function to set the r->mtime field to the specified value if it's later * than what's already there. */ -API_EXPORT(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime) +AP_DECLARE(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime) { if (r->mtime < dependency_mtime) { r->mtime = dependency_mtime; } } -API_EXPORT(void) ap_allow_methods(request_rec *r, int reset, ...) +AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...) { const char *method; va_list methods; diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 4308df6411..de911ba031 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -131,7 +131,7 @@ static char tspecial[] = { '\0' }; -module MODULE_VAR_EXPORT mime_module; +module AP_MODULE_DECLARE_DATA mime_module; static void *create_mime_dir_config(apr_pool_t *p, char *dummy) { @@ -814,7 +814,7 @@ static void register_hooks(void) ap_hook_post_config(mime_post_config,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT mime_module = { +module AP_MODULE_DECLARE_DATA mime_module = { STANDARD20_MODULE_STUFF, create_mime_dir_config, /* create per-directory config structure */ merge_mime_dir_configs, /* merge per-directory config structures */ diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 271619d135..87eb1ab5ef 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -187,7 +187,7 @@ #include <strings.h> #endif -module MODULE_VAR_EXPORT config_log_module; +module AP_MODULE_DECLARE_DATA config_log_module; static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE); static apr_fileperms_t xfer_perms = APR_OS_DEFAULT; @@ -1166,7 +1166,7 @@ static void register_hooks(void) ap_hook_log_transaction(multi_log_transaction,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT config_log_module = +module AP_MODULE_DECLARE_DATA config_log_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config */ diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index cb221dc9a1..c0ff93da7f 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -90,7 +90,7 @@ typedef struct { apr_array_header_t *redirects; } alias_dir_conf; -module MODULE_VAR_EXPORT alias_module; +module AP_MODULE_DECLARE_DATA alias_module; static void *create_alias_config(apr_pool_t *p, server_rec *s) { @@ -423,7 +423,7 @@ static void register_hooks(void) ap_hook_fixups(fixup_redir,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT alias_module = +module AP_MODULE_DECLARE_DATA alias_module = { STANDARD20_MODULE_STUFF, create_alias_dir_config, /* dir config creater */ diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 225d8ef468..16926e3950 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -71,7 +71,7 @@ #include "http_main.h" #include "util_script.h" -module MODULE_VAR_EXPORT dir_module; +module AP_MODULE_DECLARE_DATA dir_module; typedef struct dir_config_struct { apr_array_header_t *index_names; @@ -224,7 +224,7 @@ static const handler_rec dir_handlers[] = {NULL} }; -module MODULE_VAR_EXPORT dir_module = { +module AP_MODULE_DECLARE_DATA dir_module = { STANDARD20_MODULE_STUFF, create_dir_config, /* create per-directory config structure */ merge_dir_configs, /* merge per-directory config structures */ diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c index 16bfd138eb..dca681fc64 100644 --- a/modules/mappers/mod_imap.c +++ b/modules/mappers/mod_imap.c @@ -122,7 +122,7 @@ double strtod(); /* SunOS needed this */ #endif -module MODULE_VAR_EXPORT imap_module; +module AP_MODULE_DECLARE_DATA imap_module; typedef struct { char *imap_menu; @@ -909,7 +909,7 @@ static const handler_rec imap_handlers[] = {NULL} }; -module MODULE_VAR_EXPORT imap_module = +module AP_MODULE_DECLARE_DATA imap_module = { STANDARD20_MODULE_STUFF, create_imap_dir_config, /* dir config creater */ diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index c9024b2100..02c2c12e01 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -90,7 +90,7 @@ typedef struct { apr_array_header_t *language_priority; } neg_dir_config; -module MODULE_VAR_EXPORT negotiation_module; +module AP_MODULE_DECLARE_DATA negotiation_module; static void *create_neg_dir_config(apr_pool_t *p, char *dummy) { @@ -2748,7 +2748,7 @@ static void register_hooks(void) ap_hook_type_checker(handle_multi,NULL,NULL,AP_HOOK_FIRST); } -module MODULE_VAR_EXPORT negotiation_module = +module AP_MODULE_DECLARE_DATA negotiation_module = { STANDARD20_MODULE_STUFF, create_neg_dir_config, /* dir config creator */ diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 07f33fe11e..4ff21fa69d 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -223,7 +223,7 @@ static void register_hooks(void) } /* the main config structure */ -module MODULE_VAR_EXPORT rewrite_module = { +module AP_MODULE_DECLARE_DATA rewrite_module = { STANDARD20_MODULE_STUFF, config_perdir_create, /* create per-dir config structures */ config_perdir_merge, /* merge per-dir config structures */ diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c index bab952f6fa..2d48e2e808 100644 --- a/modules/mappers/mod_so.c +++ b/modules/mappers/mod_so.c @@ -135,7 +135,7 @@ #include "apr_dso.h" #include "apr_strings.h" -module MODULE_VAR_EXPORT so_module; +module AP_MODULE_DECLARE_DATA so_module; /* @@ -368,7 +368,7 @@ static const command_rec so_cmds[] = { { NULL } }; -module MODULE_VAR_EXPORT so_module = { +module AP_MODULE_DECLARE_DATA so_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config */ NULL, /* merge per-dir config */ diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c index df7fb406ef..ddd1c8c2cc 100644 --- a/modules/mappers/mod_speling.c +++ b/modules/mappers/mod_speling.c @@ -88,7 +88,7 @@ * Activate it with "CheckSpelling On" */ -MODULE_VAR_EXPORT module speling_module; +AP_MODULE_DECLARE_DATA module speling_module; typedef struct { int enabled; @@ -555,7 +555,7 @@ static void register_hooks(void) ap_hook_fixups(check_speling,NULL,NULL,AP_HOOK_LAST); } -module MODULE_VAR_EXPORT speling_module = +module AP_MODULE_DECLARE_DATA speling_module = { STANDARD20_MODULE_STUFF, create_mconfig_for_directory, /* create per-dir config */ diff --git a/modules/mappers/mod_vhost_alias.c b/modules/mappers/mod_vhost_alias.c index eabee72ec1..c96679fb16 100644 --- a/modules/mappers/mod_vhost_alias.c +++ b/modules/mappers/mod_vhost_alias.c @@ -83,7 +83,7 @@ #include "http_request.h" /* for ap_hook_translate_name */ -module MODULE_VAR_EXPORT vhost_alias_module; +module AP_MODULE_DECLARE_DATA vhost_alias_module; /* @@ -468,7 +468,7 @@ static void register_hooks(void) ap_hook_translate_name(mva_translate, NULL, NULL, AP_HOOK_MIDDLE); }; -module MODULE_VAR_EXPORT vhost_alias_module = +module AP_MODULE_DECLARE_DATA vhost_alias_module = { STANDARD20_MODULE_STUFF, NULL, /* dir config creater */ diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c index b203faca72..f65909a7fa 100644 --- a/modules/metadata/mod_cern_meta.c +++ b/modules/metadata/mod_cern_meta.c @@ -167,7 +167,7 @@ #define DEFAULT_METASUFFIX ".meta" #define DEFAULT_METAFILES 0 -module MODULE_VAR_EXPORT cern_meta_module; +module AP_MODULE_DECLARE_DATA cern_meta_module; typedef struct { const char *metadir; @@ -386,7 +386,7 @@ static void register_hooks(void) { ap_hook_fixups(add_cern_meta_data,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT cern_meta_module = +module AP_MODULE_DECLARE_DATA cern_meta_module = { STANDARD20_MODULE_STUFF, create_cern_meta_dir_config,/* dir config creater */ diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c index abf30ff77f..f89546af4a 100644 --- a/modules/metadata/mod_env.c +++ b/modules/metadata/mod_env.c @@ -114,7 +114,7 @@ typedef struct { int vars_present; } env_dir_config_rec; -module MODULE_VAR_EXPORT env_module; +module AP_MODULE_DECLARE_DATA env_module; static void *create_env_dir_config(apr_pool_t *p, char *dummy) { @@ -260,7 +260,7 @@ static void register_hooks(void) } -module MODULE_VAR_EXPORT env_module = +module AP_MODULE_DECLARE_DATA env_module = { STANDARD20_MODULE_STUFF, create_env_dir_config, /* dir config creater */ diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index a8bc4a3ca9..88d5d41ca0 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -217,7 +217,7 @@ typedef struct { #define ACTIVE_OFF 0 #define ACTIVE_DONTCARE 2 -module MODULE_VAR_EXPORT expires_module; +module AP_MODULE_DECLARE_DATA expires_module; static void *create_dir_expires_config(apr_pool_t *p, char *dummy) { @@ -505,7 +505,7 @@ static void register_hooks(void) ap_hook_fixups(add_expires,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT expires_module = +module AP_MODULE_DECLARE_DATA expires_module = { STANDARD20_MODULE_STUFF, create_dir_expires_config, /* dir config creater */ diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index f0eb1ac2a7..641326718e 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -128,7 +128,7 @@ typedef struct { apr_array_header_t *headers; } headers_conf; -module MODULE_VAR_EXPORT headers_module; +module AP_MODULE_DECLARE_DATA headers_module; static void *create_headers_config(apr_pool_t *p, server_rec *s) { @@ -250,7 +250,7 @@ static void register_hooks(void) { ap_hook_fixups(fixup_headers,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT headers_module = +module AP_MODULE_DECLARE_DATA headers_module = { STANDARD20_MODULE_STUFF, create_headers_dir_config, /* dir config creater */ diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index 7aeed036cc..f50d4f5af9 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -150,7 +150,7 @@ typedef struct { apr_array_header_t *conditionals; } sei_cfg_rec; -module MODULE_VAR_EXPORT setenvif_module; +module AP_MODULE_DECLARE_DATA setenvif_module; /* * These routines, the create- and merge-config functions, are called @@ -458,7 +458,7 @@ static void register_hooks(void) ap_hook_post_read_request(match_headers, NULL, NULL, AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT setenvif_module = +module AP_MODULE_DECLARE_DATA setenvif_module = { STANDARD20_MODULE_STUFF, create_setenvif_config_dir, /* dir config creater */ diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c index 0ae1f823d7..b1cab40ca3 100644 --- a/modules/metadata/mod_unique_id.c +++ b/modules/metadata/mod_unique_id.c @@ -392,7 +392,7 @@ static void register_hooks(void) ap_hook_post_read_request(gen_unique_id, NULL, NULL, AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT unique_id_module = { +module AP_MODULE_DECLARE_DATA unique_id_module = { STANDARD20_MODULE_STUFF, NULL, /* dir config creater */ NULL, /* dir merger --- default is to override */ diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c index 12b9f8836a..7d3d2dddfa 100644 --- a/modules/metadata/mod_usertrack.c +++ b/modules/metadata/mod_usertrack.c @@ -106,7 +106,7 @@ #include "http_request.h" #include "apr_strings.h" -module MODULE_VAR_EXPORT usertrack_module; +module AP_MODULE_DECLARE_DATA usertrack_module; typedef struct { int always; @@ -308,7 +308,7 @@ static void register_hooks(void) { ap_hook_fixups(spot_cookie,NULL,NULL,AP_HOOK_MIDDLE); } -module MODULE_VAR_EXPORT usertrack_module = { +module AP_MODULE_DECLARE_DATA usertrack_module = { STANDARD20_MODULE_STUFF, make_cookie_dir, /* dir config creater */ NULL, /* dir merger --- default is to override */ diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 5c3a3d7ef2..33900265f9 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -801,7 +801,7 @@ static void register_hooks(void) ap_hook_post_read_request(proxy_detect, NULL, NULL, AP_HOOK_FIRST); } -module MODULE_VAR_EXPORT proxy_module = +module AP_MODULE_DECLARE_DATA proxy_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-directory config structure */ diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index e413105e6c..36a2e541fc 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -129,7 +129,7 @@ #include <arpa/inet.h> #endif -extern module MODULE_VAR_EXPORT proxy_module; +extern module AP_MODULE_DECLARE_DATA proxy_module; /* for proxy_canonenc() */ diff --git a/os/os2/util_os2.c b/os/os2/util_os2.c index e51a2ea7c7..8d0a5014b5 100644 --- a/os/os2/util_os2.c +++ b/os/os2/util_os2.c @@ -69,7 +69,7 @@ #include <string.h> -API_EXPORT(char *)ap_os_case_canonical_filename(apr_pool_t *pPool, const char *szFile) +AP_DECLARE(char *)ap_os_case_canonical_filename(apr_pool_t *pPool, const char *szFile) { char buf[HUGE_STRING_LEN]; char buf2[HUGE_STRING_LEN]; diff --git a/os/unix/unixd.c b/os/unix/unixd.c index c2d0f40134..b51ad84fe6 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -339,7 +339,7 @@ void unixd_siglist_init(void) } #endif /* NEED_AP_SYS_SIGLIST */ -API_EXPORT(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, +AP_DECLARE(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, const char *arg, const char * arg2, int type) { #if (defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS)) && APR_HAVE_STRUCT_RLIMIT && APR_HAVE_GETRLIMIT diff --git a/os/unix/unixd.h b/os/unix/unixd.h index 7fd99dcd17..ea1d01d12c 100644 --- a/os/unix/unixd.h +++ b/os/unix/unixd.h @@ -89,7 +89,7 @@ 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); #if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || \ defined(RLIMIT_NPROC) || defined(RLIMIT_AS) -API_EXPORT(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, +AP_DECLARE(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, const char *arg, const char * arg2, int type); #endif diff --git a/os/win32/os.h b/os/win32/os.h index b85f54632f..c362590a63 100644 --- a/os/win32/os.h +++ b/os/win32/os.h @@ -125,10 +125,10 @@ __inline int ap_os_is_path_absolute(const char *file) } /* OS-dependent filename routines in util_win32.c */ -API_EXPORT(char *) ap_os_canonical_filename(apr_pool_t *p, const char *file); -API_EXPORT(char *) ap_os_case_canonical_filename(apr_pool_t *pPool, const char *szFile); -API_EXPORT(char *) ap_os_systemcase_filename(apr_pool_t *pPool, const char *szFile); -API_EXPORT(int) ap_os_is_filename_valid(const char *file); +AP_DECLARE(char *) ap_os_canonical_filename(apr_pool_t *p, const char *file); +AP_DECLARE(char *) ap_os_case_canonical_filename(apr_pool_t *pPool, const char *szFile); +AP_DECLARE(char *) ap_os_systemcase_filename(apr_pool_t *pPool, const char *szFile); +AP_DECLARE(int) ap_os_is_filename_valid(const char *file); typedef void thread; typedef void event; diff --git a/os/win32/util_win32.c b/os/win32/util_win32.c index a8abc52b33..bccff8f803 100644 --- a/os/win32/util_win32.c +++ b/os/win32/util_win32.c @@ -86,7 +86,7 @@ static BOOL OnlyDots(char *pString) * is present on the existing path. This routine also * converts alias names to long names. */ -API_EXPORT(char *) ap_os_systemcase_filename(apr_pool_t *pPool, +AP_DECLARE(char *) ap_os_systemcase_filename(apr_pool_t *pPool, const char *szFile) { char buf[HUGE_STRING_LEN]; @@ -227,7 +227,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(apr_pool_t *pPool, /* Perform canonicalization with the exception that the * input case is preserved. */ -API_EXPORT(char *) ap_os_case_canonical_filename(apr_pool_t *pPool, +AP_DECLARE(char *) ap_os_case_canonical_filename(apr_pool_t *pPool, const char *szFile) { char *pNewStr; @@ -353,7 +353,7 @@ API_EXPORT(char *) ap_os_case_canonical_filename(apr_pool_t *pPool, /* Perform complete canonicalization. */ -API_EXPORT(char *) ap_os_canonical_filename(apr_pool_t *pPool, const char *szFile) +AP_DECLARE(char *) ap_os_canonical_filename(apr_pool_t *pPool, const char *szFile) { char *pNewName; pNewName = ap_os_case_canonical_filename(pPool, szFile); @@ -394,7 +394,7 @@ API_EXPORT(char *) ap_os_canonical_filename(apr_pool_t *pPool, const char *szFil * If the path fails ANY of these tests, the result must be to deny access. */ -API_EXPORT(int) ap_os_is_filename_valid(const char *file) +AP_DECLARE(int) ap_os_is_filename_valid(const char *file) { const char *segstart; unsigned int seglength; 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; diff --git a/support/apxs.in b/support/apxs.in index 6d6d4eb3aa..dc0a752816 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -426,7 +426,7 @@ if ($opt_i or $opt_e) { open(FP, "<$base.c"); my $content = join('', <FP>); close(FP); - if ($content =~ m|.*module\s+(?:MODULE_VAR_EXPORT\s+)?([a-zA-Z0-9_]+)_module\s*=\s*.*|s) { + if ($content =~ m|.*module\s+(?:AP_MODULE_DECLARE_DATA\s+)?([a-zA-Z0-9_]+)_module\s*=\s*.*|s) { $name = "$1"; $filename = "$base.c"; $filename =~ s|^[^/]+/||; @@ -620,7 +620,7 @@ static const handler_rec %NAME%_handlers[] = { }; /* Dispatch list for API hooks */ -module MODULE_VAR_EXPORT %NAME%_module = { +module AP_MODULE_DECLARE_DATA %NAME%_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config structures */ NULL, /* merge per-dir config structures */ diff --git a/test/test_date.c b/test/test_date.c index 4beaf7943b..4e10ebf5dd 100644 --- a/test/test_date.c +++ b/test/test_date.c @@ -10,7 +10,7 @@ * * Roy Fielding, 1996 */ -#define API_EXPORT(x) x +#define AP_DECLARE(x) x #include <stdio.h> #include <stdlib.h> diff --git a/test/test_find.c b/test/test_find.c index 496168a67d..2a3d102a27 100644 --- a/test/test_find.c +++ b/test/test_find.c @@ -23,17 +23,17 @@ gid_t ap_group_id; void *ap_dummy_mutex = &ap_dummy_mutex; char *ap_server_argv0; -API_EXPORT(void) ap_block_alarms(void) +AP_DECLARE(void) ap_block_alarms(void) { ; } -API_EXPORT(void) ap_unblock_alarms(void) +AP_DECLARE(void) ap_unblock_alarms(void) { ; } -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, const request_rec *r, const char *fmt, ...) { ; diff --git a/test/test_parser.c b/test/test_parser.c index 440700ad09..618e3fbe0a 100644 --- a/test/test_parser.c +++ b/test/test_parser.c @@ -23,17 +23,17 @@ gid_t ap_group_id; void *ap_dummy_mutex = &ap_dummy_mutex; char *ap_server_argv0; -API_EXPORT(void) ap_block_alarms(void) +AP_DECLARE(void) ap_block_alarms(void) { ; } -API_EXPORT(void) ap_unblock_alarms(void) +AP_DECLARE(void) ap_unblock_alarms(void) { ; } -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, const request_rec *r, const char *fmt, ...) { ; |