# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# PROP Intermediate_Dir ".\CoreD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# PROP Intermediate_Dir ".\CoreD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "API_EXPORT_SYMBOLS" /D "AP_EXPORT_SYMBOLS" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
#ifndef AP_AC_CONFIG_H
#define AP_AC_CONFIG_H
+#include "ap_mmn.h" /* MODULE_MAGIC_NUMBER_ */
+
+/* Implemented flags for dynamic library bindings.
+ *
+ * API_EXPORT(type) for functions bound in the apache core, except:
+ * API_EXPORT_NONSTD(type) for functions with var args (only as ...)
+ * API_EXPORT_VAR for data residing in the core
+ * MODULE_EXPORT_VAR is a hack that will need to go away
+ */
+
+#if !defined(WIN32) || defined(API_STATIC)
+#define API_EXPORT(type) type __stdcall
+#define API_EXPORT_NONSTD(type) type
+#define API_EXPORT_VAR
+#define MODULE_EXPORT_VAR
+#elif defined(API_EXPORT_SYMBOLS)
+#define API_EXPORT(type) __declspec(dllexport) type __stdcall
+#define API_EXPORT_NONSTD(type) __declspec(dllexport) type
+#define API_EXPORT_VAR __declspec(dllexport)
+#define MODULE_EXPORT_VAR __declspec(dllexport)
+#else
+#define API_EXPORT(type) __declspec(dllimport) type __stdcall
+#define API_EXPORT_NONSTD(type) __declspec(dllimport) type
+#define API_EXPORT_VAR __declspec(dllimport)
+#define MODULE_EXPORT_VAR __declspec(dllexport)
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "ap_mmn.h" /* MODULE_MAGIC_NUMBER_ */
-
#ifdef WIN32
-#include "../os/win32/os.h"
+#include "os.h"
#else
#include "ap_config_auto.h"
#include "ap_config_path.h"
#include "os.h"
-#endif /* WIN32 */
+#endif /* !WIN32 */
#include "apr.h"
#ifdef STDC_HEADERS
#include <stdlib.h>
* child to force an exit) and so do an exit anyway.
*/
-void ap_start_shutdown(void);
-void ap_start_restart(int graceful);
+API_EXPORT(void) ap_start_shutdown(void);
+API_EXPORT(void) ap_start_restart(int graceful);
/*
* ap_signal_parent() - used to send a signal to the parent process.
#ifdef CORE_PRIVATE
-extern API_VAR_EXPORT module *top_module;
+extern API_EXPORT_VAR module *top_module;
extern module *ap_prelinked_modules[];
extern module *ap_preloaded_modules[];
-extern API_VAR_EXPORT module **ap_loaded_modules;
+extern API_EXPORT_VAR module **ap_loaded_modules;
/* For mod_so.c... */
#endif
/* Hooks */
-AP_DECLARE_HOOK(int,header_parser,(request_rec *))
-AP_DECLARE_HOOK(void,post_config,
+AP_DECLARE_HOOK(API_EXPORT,int,header_parser,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,void,post_config,
(ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s))
-AP_DECLARE_HOOK(void,open_logs,
+AP_DECLARE_HOOK(API_EXPORT,void,open_logs,
(ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s))
-AP_DECLARE_HOOK(void,child_init,(ap_pool_t *pchild, server_rec *s))
+AP_DECLARE_HOOK(API_EXPORT,void,child_init,(ap_pool_t *pchild, server_rec *s))
#ifdef __cplusplus
}
#endif
/* Hooks */
-AP_DECLARE_HOOK(int,pre_connection,(conn_rec *))
-AP_DECLARE_HOOK(int,process_connection,(conn_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,pre_connection,(conn_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,process_connection,(conn_rec *))
#ifdef __cplusplus
}
char *ap_response_code_string (request_rec *r, int error_index);
-extern API_VAR_EXPORT module core_module;
+extern API_EXPORT_VAR module core_module;
/* Per-directory configuration */
extern "C" {
#endif
-extern MODULE_VAR_EXPORT const char *ap_server_argv0;
-extern API_VAR_EXPORT const char *ap_server_root;
+extern API_EXPORT_VAR const char *ap_server_argv0;
+extern API_EXPORT_VAR const char *ap_server_root;
/* for -C, -c and -D switches */
-extern ap_array_header_t *ap_server_pre_read_config;
-extern ap_array_header_t *ap_server_post_read_config;
-extern ap_array_header_t *ap_server_config_defines;
-
-#ifdef WIN32
-API_EXPORT(int) apache_main(int argc, char *argv[]);
-#endif
+extern API_EXPORT_VAR ap_array_header_t *ap_server_pre_read_config;
+extern API_EXPORT_VAR ap_array_header_t *ap_server_post_read_config;
+extern API_EXPORT_VAR ap_array_header_t *ap_server_config_defines;
#ifdef __cplusplus
}
* post_read_request --- run right after read_request or internal_redirect,
* and not run during any subrequests.
*/
-AP_DECLARE_HOOK(int,post_read_request,(request_rec *))
-AP_DECLARE_HOOK(int,log_transaction,(request_rec *))
-AP_DECLARE_HOOK(const char *,http_method,(const request_rec *))
-AP_DECLARE_HOOK(unsigned short,default_port,(const request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,post_read_request,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,log_transaction,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,const char *,http_method,(const request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,unsigned short,default_port,(const request_rec *))
#ifdef __cplusplus
}
#endif
/* Hooks */
-AP_DECLARE_HOOK(int,translate_name,(request_rec *))
-AP_DECLARE_HOOK(int,check_user_id,(request_rec *))
-AP_DECLARE_HOOK(int,fixups,(request_rec *))
-AP_DECLARE_HOOK(int,type_checker,(request_rec *))
-AP_DECLARE_HOOK(int,access_checker,(request_rec *))
-AP_DECLARE_HOOK(int,auth_checker,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,translate_name,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,check_user_id,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,fixups,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,type_checker,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,access_checker,(request_rec *))
+AP_DECLARE_HOOK(API_EXPORT,int,auth_checker,(request_rec *))
#ifdef __cplusplus
}
/* Headers in which EVERYONE has an interest... */
+#include "ap_config.h"
#include "os.h"
#include "apr_general.h"
#include "apr_lib.h"
#define API_EXPORT_NONSTD(type) type
#endif
-#ifndef MODULE_VAR_EXPORT
-#define MODULE_VAR_EXPORT
+#ifndef MODULE_EXPORT_VAR
+#define MODULE_EXPORT_VAR
#endif
-#ifndef API_VAR_EXPORT
-#define API_VAR_EXPORT
+#ifndef API_EXPORT_VAR
+#define API_EXPORT_VAR
#endif
/* modules should not used functions marked CORE_EXPORT
ap_array_header_t *denys;
} access_dir_conf;
-module MODULE_VAR_EXPORT access_module;
+module MODULE_EXPORT_VAR access_module;
static void *create_access_dir_config(ap_pool_t *p, char *dummy)
{
ap_hook_access_checker(check_dir_access,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT access_module =
+module MODULE_EXPORT_VAR access_module =
{
STANDARD20_MODULE_STUFF,
create_access_dir_config, /* dir config creater */
{NULL}
};
-module MODULE_VAR_EXPORT auth_module;
+module MODULE_EXPORT_VAR auth_module;
static char *get_pw(request_rec *r, char *user, char *auth_pwfile)
{
ap_hook_auth_checker(check_user_access,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT auth_module =
+module MODULE_EXPORT_VAR auth_module =
{
STANDARD20_MODULE_STUFF,
create_auth_dir_config, /* dir config creater */
{NULL}
};
-module MODULE_VAR_EXPORT auth_anon_module;
+module MODULE_EXPORT_VAR auth_anon_module;
static int anon_authenticate_basic_user(request_rec *r)
{
ap_hook_auth_checker(check_anon_access,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT auth_anon_module =
+module MODULE_EXPORT_VAR auth_anon_module =
{
STANDARD20_MODULE_STUFF,
create_anon_auth_dir_config,/* dir config creater */
static void *client_mm = NULL;
#endif /* HAVE_SHMEM_MM */
-module MODULE_VAR_EXPORT auth_digest_module;
+module MODULE_EXPORT_VAR auth_digest_module;
/*
* initialization code
ap_hook_fixups(add_auth_info, NULL, NULL, AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT auth_digest_module =
+module MODULE_EXPORT_VAR auth_digest_module =
{
STANDARD20_MODULE_STUFF,
create_digest_dir_config, /* dir config creater */
#include "http_core.h"
#include "apr_mmap.h"
-module MODULE_VAR_EXPORT file_cache_module;
+module MODULE_EXPORT_VAR file_cache_module;
static ap_pool_t *context;
static int once_through = 0;
* This is really broken on Windows. The call to get the core_module config
* in core_translate_copy seg faults because 'core_module' is not exported
* properly and needs a thunk.
- * Will be fixed when we get API_VAR_EXPORTS working correctly again
+ * Will be fixed when we get API_EXPORT_VARS working correctly again
*/
return DECLINED;
#endif
{ NULL }
};
-module MODULE_VAR_EXPORT file_cache_module =
+module MODULE_EXPORT_VAR file_cache_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-directory config structure */
#include "http_config.h"
#include "http_connection.h"
-API_VAR_EXPORT module echo_module;
+API_EXPORT_VAR module echo_module;
typedef struct
{
ap_hook_process_connection(process_echo_connection,NULL,NULL,AP_HOOK_MIDDLE);
}
-API_VAR_EXPORT module echo_module = {
+API_EXPORT_VAR module echo_module = {
STANDARD20_MODULE_STUFF,
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
#define RAW_ASCII_CHAR(ch) (ch)
#endif /*CHARSET_EBCDIC*/
-module MODULE_VAR_EXPORT includes_module;
+module MODULE_EXPORT_VAR includes_module;
/* just need some arbitrary non-NULL pointer which can't also be a request_rec */
#define NESTED_INCLUDE_MAGIC (&includes_module)
{NULL}
};
-module MODULE_VAR_EXPORT includes_module =
+module MODULE_EXPORT_VAR includes_module =
{
STANDARD20_MODULE_STUFF,
create_includes_dir_config, /* dir config creater */
{NULL}
};
-module MODULE_VAR_EXPORT asis_module =
+module MODULE_EXPORT_VAR asis_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-directory config structure */
#include <string.h>
#endif
-module MODULE_VAR_EXPORT autoindex_module;
+module MODULE_EXPORT_VAR autoindex_module;
/****************************************************************
*
{NULL}
};
-module MODULE_VAR_EXPORT autoindex_module =
+module MODULE_EXPORT_VAR autoindex_module =
{
STANDARD20_MODULE_STUFF,
create_autoindex_config, /* dir config creater */
#include <string.h>
#endif
-module MODULE_VAR_EXPORT cgi_module;
+module MODULE_EXPORT_VAR cgi_module;
/* KLUDGE --- for back-combatibility, we don't have to check ExecCGI
* in ScriptAliased directories, which means we need to know if this
{NULL}
};
-module MODULE_VAR_EXPORT cgi_module =
+module MODULE_EXPORT_VAR cgi_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
#endif
-module MODULE_VAR_EXPORT cgid_module;
+module MODULE_EXPORT_VAR cgid_module;
static void cgid_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *main_server);
static int once_through = 0;
ap_hook_post_config(cgid_init, NULL, NULL, AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT cgid_module = {
+module MODULE_EXPORT_VAR cgid_module = {
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
NULL, /* dir merger --- default is to override */
struct info_cfg_lines *next;
} info_cfg_lines;
-module MODULE_VAR_EXPORT info_module;
+module MODULE_EXPORT_VAR info_module;
extern module *top_module;
static void *create_info_config(ap_pool_t *p, server_rec *s)
{NULL}
};
-module MODULE_VAR_EXPORT info_module =
+module MODULE_EXPORT_VAR info_module =
{
STANDARD_MODULE_STUFF,
NULL, /* initializer */
#define STATUS_MAGIC_TYPE "application/x-httpd-status"
-module MODULE_VAR_EXPORT status_module;
+module MODULE_EXPORT_VAR status_module;
static int print_status_value(void *data, const char *key, const char *val)
{
{NULL}
};
-module MODULE_VAR_EXPORT status_module =
+module MODULE_EXPORT_VAR status_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-dir config */
ap_hook_access_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST);
}
-API_VAR_EXPORT module core_module = {
+API_EXPORT_VAR module core_module = {
STANDARD20_MODULE_STUFF,
create_core_dir_config, /* create per-directory config structure */
merge_core_dir_configs, /* merge per-directory config structures */
ap_rflush(r);
}
-AP_IMPLEMENT_HOOK_RUN_ALL(int,post_read_request,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,log_transaction,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(const char *,http_method,(const request_rec *r),(r),
- NULL)
-AP_IMPLEMENT_HOOK_RUN_FIRST(unsigned short,default_port,(const request_rec *r),
- (r),0)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,post_read_request,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,log_transaction,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,const char *,http_method,
+ (const request_rec *r),(r),NULL)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,unsigned short,default_port,
+ (const request_rec *r),(r),0)
AP_HOOK_LINK(auth_checker)
)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,translate_name,(request_rec *r),(r),DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,check_user_id,(request_rec *r),(r),DECLINED)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,fixups,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,type_checker,(request_rec *r),(r),DECLINED)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,access_checker,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,auth_checker,(request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,translate_name,
+ (request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,check_user_id,
+ (request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,fixups,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,type_checker,
+ (request_rec *r),(r),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,access_checker,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,auth_checker,
+ (request_rec *r),(r),DECLINED)
/*****************************************************************
*
'\0'
};
-module MODULE_VAR_EXPORT mime_module;
+module MODULE_EXPORT_VAR mime_module;
static void *create_mime_dir_config(ap_pool_t *p, char *dummy)
{
ap_hook_post_config(mime_post_config,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT mime_module = {
+module MODULE_EXPORT_VAR mime_module = {
STANDARD20_MODULE_STUFF,
create_mime_dir_config, /* create per-directory config structure */
merge_mime_dir_configs, /* merge per-directory config structures */
#include <limits.h>
#endif
-module MODULE_VAR_EXPORT config_log_module;
+module MODULE_EXPORT_VAR config_log_module;
static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE);
static ap_fileperms_t xfer_perms = APR_OS_DEFAULT;
ap_hook_log_transaction(multi_log_transaction,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT config_log_module =
+module MODULE_EXPORT_VAR config_log_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* create per-dir config */
ap_array_header_t *redirects;
} alias_dir_conf;
-module MODULE_VAR_EXPORT alias_module;
+module MODULE_EXPORT_VAR alias_module;
static void *create_alias_config(ap_pool_t *p, server_rec *s)
{
ap_hook_fixups(fixup_redir,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT alias_module =
+module MODULE_EXPORT_VAR alias_module =
{
STANDARD20_MODULE_STUFF,
create_alias_dir_config, /* dir config creater */
#include "http_main.h"
#include "util_script.h"
-module MODULE_VAR_EXPORT dir_module;
+module MODULE_EXPORT_VAR dir_module;
typedef struct dir_config_struct {
ap_array_header_t *index_names;
{NULL}
};
-module MODULE_VAR_EXPORT dir_module = {
+module MODULE_EXPORT_VAR dir_module = {
STANDARD20_MODULE_STUFF,
create_dir_config, /* create per-directory config structure */
merge_dir_configs, /* merge per-directory config structures */
double strtod(); /* SunOS needed this */
#endif
-module MODULE_VAR_EXPORT imap_module;
+module MODULE_EXPORT_VAR imap_module;
typedef struct {
char *imap_menu;
{NULL}
};
-module MODULE_VAR_EXPORT imap_module =
+module MODULE_EXPORT_VAR imap_module =
{
STANDARD20_MODULE_STUFF,
create_imap_dir_config, /* dir config creater */
ap_array_header_t *language_priority;
} neg_dir_config;
-module MODULE_VAR_EXPORT negotiation_module;
+module MODULE_EXPORT_VAR negotiation_module;
static void *create_neg_dir_config(ap_pool_t *p, char *dummy)
{
ap_hook_type_checker(handle_multi,NULL,NULL,AP_HOOK_FIRST);
}
-module MODULE_VAR_EXPORT negotiation_module =
+module MODULE_EXPORT_VAR negotiation_module =
{
STANDARD20_MODULE_STUFF,
create_neg_dir_config, /* dir config creator */
}
/* the main config structure */
-module MODULE_VAR_EXPORT rewrite_module = {
+module MODULE_EXPORT_VAR rewrite_module = {
STANDARD20_MODULE_STUFF,
config_perdir_create, /* create per-dir config structures */
config_perdir_merge, /* merge per-dir config structures */
#define CORE_PRIVATE
+#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
#include "ap_config.h"
#include "apr_dso.h"
-module MODULE_VAR_EXPORT so_module;
+module MODULE_EXPORT_VAR so_module;
/*
{ NULL }
};
-module MODULE_VAR_EXPORT so_module = {
+module MODULE_EXPORT_VAR so_module = {
STANDARD20_MODULE_STUFF,
NULL, /* create per-dir config */
NULL, /* merge per-dir config */
* Activate it with "CheckSpelling On"
*/
-MODULE_VAR_EXPORT module speling_module;
+MODULE_EXPORT_VAR module speling_module;
typedef struct {
int enabled;
ap_hook_fixups(check_speling,NULL,NULL,AP_HOOK_LAST);
}
-module MODULE_VAR_EXPORT speling_module =
+module MODULE_EXPORT_VAR speling_module =
{
STANDARD20_MODULE_STUFF,
create_mconfig_for_directory, /* create per-dir config */
#include "http_core.h"
-module MODULE_VAR_EXPORT vhost_alias_module;
+module MODULE_EXPORT_VAR vhost_alias_module;
/*
ap_hook_translate_name(mva_translate, NULL, NULL, AP_HOOK_MIDDLE);
};
-module MODULE_VAR_EXPORT vhost_alias_module =
+module MODULE_EXPORT_VAR vhost_alias_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
#define DEFAULT_METASUFFIX ".meta"
#define DEFAULT_METAFILES 0
-module MODULE_VAR_EXPORT cern_meta_module;
+module MODULE_EXPORT_VAR cern_meta_module;
typedef struct {
char *metadir;
{
ap_hook_fixups(add_cern_meta_data,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT cern_meta_module =
+module MODULE_EXPORT_VAR cern_meta_module =
{
STANDARD20_MODULE_STUFF,
create_cern_meta_dir_config,/* dir config creater */
int vars_present;
} env_dir_config_rec;
-module MODULE_VAR_EXPORT env_module;
+module MODULE_EXPORT_VAR env_module;
static void *create_env_dir_config(ap_pool_t *p, char *dummy)
{
}
-module MODULE_VAR_EXPORT env_module =
+module MODULE_EXPORT_VAR env_module =
{
STANDARD20_MODULE_STUFF,
create_env_dir_config, /* dir config creater */
#define ACTIVE_OFF 0
#define ACTIVE_DONTCARE 2
-module MODULE_VAR_EXPORT expires_module;
+module MODULE_EXPORT_VAR expires_module;
static void *create_dir_expires_config(ap_pool_t *p, char *dummy)
{
ap_hook_fixups(add_expires,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT expires_module =
+module MODULE_EXPORT_VAR expires_module =
{
STANDARD20_MODULE_STUFF,
create_dir_expires_config, /* dir config creater */
ap_array_header_t *headers;
} headers_conf;
-module MODULE_VAR_EXPORT headers_module;
+module MODULE_EXPORT_VAR headers_module;
static void *create_headers_config(ap_pool_t *p, server_rec *s)
{
{
ap_hook_fixups(fixup_headers,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT headers_module =
+module MODULE_EXPORT_VAR headers_module =
{
STANDARD20_MODULE_STUFF,
create_headers_dir_config, /* dir config creater */
ap_array_header_t *conditionals;
} sei_cfg_rec;
-module MODULE_VAR_EXPORT setenvif_module;
+module MODULE_EXPORT_VAR setenvif_module;
static void *create_setenvif_config(ap_pool_t *p, server_rec *dummy)
{
ap_hook_post_read_request(match_headers,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT setenvif_module =
+module MODULE_EXPORT_VAR setenvif_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
ap_hook_post_read_request(gen_unique_id, NULL, NULL, AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT unique_id_module = {
+module MODULE_EXPORT_VAR unique_id_module = {
STANDARD20_MODULE_STUFF,
NULL, /* dir config creater */
NULL, /* dir merger --- default is to override */
#include "http_core.h"
#include "http_request.h"
-module MODULE_VAR_EXPORT usertrack_module;
+module MODULE_EXPORT_VAR usertrack_module;
typedef struct {
int always;
{
ap_hook_fixups(spot_cookie,NULL,NULL,AP_HOOK_MIDDLE);
}
-module MODULE_VAR_EXPORT usertrack_module = {
+module MODULE_EXPORT_VAR usertrack_module = {
STANDARD20_MODULE_STUFF,
make_cookie_dir, /* dir config creater */
NULL, /* dir merger --- default is to override */
{NULL}
};
-module MODULE_VAR_EXPORT proxy_module =
+module MODULE_EXPORT_VAR proxy_module =
{
STANDARD_MODULE_STUFF,
proxy_init, /* initializer */
#include "explain.h"
-extern module MODULE_VAR_EXPORT proxy_module;
+extern module MODULE_EXPORT_VAR proxy_module;
/* for proxy_canonenc() */
typedef int mode_t;
typedef char * caddr_t;
-/*
-Define export types. API_EXPORT_NONSTD is a nasty hack to avoid having to declare
-every configuration function as __stdcall.
-*/
-
-#if defined(API_EXPORT_SYMBOLS)
-#define API_VAR_EXPORT __declspec(dllexport)
-#define API_EXPORT(type) __declspec(dllexport) type __stdcall
-#define API_EXPORT_NONSTD(type) __declspec(dllexport) type
-#elif defined(API_STATIC)
-#define API_VAR_EXPORT
-#define API_EXPORT(type) type __stdcall
-#define API_EXPORT_NONSTD(type) type
-#else
-#define API_VAR_EXPORT __declspec(dllimport)
-#define API_EXPORT(type) __declspec(dllimport) type __stdcall
-#define API_EXPORT_NONSTD(type) __declspec(dllimport) type
-#endif
-
-#define MODULE_VAR_EXPORT __declspec(dllexport)
-
#define HAVE_MEMMOVE
#define HAVE_STRCASECMP
#define HAVE_STRNCASECMP
#define S_ISDIR(m) (((m) & S_IFDIR) == S_IFDIR)
#endif
-
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#include "http_vhost.h"
#include "util_cfgtree.h"
+API_EXPORT_VAR const char *ap_server_argv0;
+
+API_EXPORT_VAR const char *ap_server_root;
+
+API_EXPORT_VAR ap_array_header_t *ap_server_pre_read_config;
+API_EXPORT_VAR ap_array_header_t *ap_server_post_read_config;
+API_EXPORT_VAR ap_array_header_t *ap_server_config_defines;
+
AP_HOOK_STRUCT(
AP_HOOK_LINK(header_parser)
AP_HOOK_LINK(post_config)
AP_HOOK_LINK(child_init)
)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED)
-AP_IMPLEMENT_HOOK_VOID(post_config,
- (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s),
- (pconf,plog,ptemp,s))
-AP_IMPLEMENT_HOOK_VOID(open_logs,
- (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s),
- (pconf,plog,ptemp,s))
-AP_IMPLEMENT_HOOK_VOID(child_init,(ap_pool_t *pchild, server_rec *s),(pchild,s))
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,header_parser,
+ (request_rec *r),(r),OK,DECLINED)
+AP_IMPLEMENT_HOOK_VOID(API_EXPORT,post_config,
+ (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp,
+ server_rec *s),(pconf,plog,ptemp,s))
+AP_IMPLEMENT_HOOK_VOID(API_EXPORT,open_logs,
+ (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp,
+ server_rec *s),(pconf,plog,ptemp,s))
+AP_IMPLEMENT_HOOK_VOID(API_EXPORT,child_init,
+ (ap_pool_t *pchild, server_rec *s),(pchild,s))
/****************************************************************
*
* than DYNAMIC_MODULE_LIMIT.
*/
static int dynamic_modules = 0;
-API_VAR_EXPORT module *top_module = NULL;
-API_VAR_EXPORT module **ap_loaded_modules=NULL;
+API_EXPORT_VAR module *top_module = NULL;
+API_EXPORT_VAR module **ap_loaded_modules=NULL;
typedef int (*handler_func) (request_rec *);
typedef void *(*dir_maker_func) (ap_pool_t *, char *);
return HTTP_INTERNAL_SERVER_ERROR;
}
-int g_bDebugHooks;
-const char *g_szCurrentHookName;
-
void ap_register_hooks(module *m)
{
if(m->register_hooks)
module **m;
module **m2;
+ g_pHookPool=process->pconf;
+
/*
* Initialise total_modules variable and module indices
*/
(*m->create_dir_config)(p, NULL));
}
+void ap_run_rewrite_args(process_rec *process)
+{
+ module *m;
+
+ for (m = top_module; m; m = m->next)
+ if (m->rewrite_args)
+ (*m->rewrite_args) (process);
+}
+
void ap_run_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp)
{
module *m;
AP_HOOK_LINK(process_connection)
)
-AP_IMPLEMENT_HOOK_RUN_ALL(int,pre_connection,(conn_rec *c),(c),OK,DECLINED)
-AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
+AP_IMPLEMENT_HOOK_RUN_ALL(API_EXPORT,int,pre_connection,
+ (conn_rec *c),(c),OK,DECLINED)
+AP_IMPLEMENT_HOOK_RUN_FIRST(API_EXPORT,int,process_connection,
+ (conn_rec *c),(c),DECLINED)
/*
* More machine-dependent networking gooo... on some systems,
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_dexter_module = {
+module MODULE_EXPORT_VAR mpm_dexter_module = {
MPM20_MODULE_STUFF,
dexter_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
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;
+API_EXPORT_VAR int ap_extended_status = 0;
static int workers_may_exit = 0;
static int requests_this_child;
static int num_listenfds = 0;
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_mpmt_beos_module = {
+module MODULE_EXPORT_VAR mpm_mpmt_beos_module = {
MPM20_MODULE_STUFF,
mpmt_beos_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
int ap_threads_per_child=0; /* Worker threads per child */
int ap_max_requests_per_child=0;
static char *ap_pid_fname=NULL;
-API_VAR_EXPORT char *ap_scoreboard_fname=NULL;
+API_EXPORT_VAR 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;
+API_EXPORT_VAR int ap_extended_status = 0;
static int workers_may_exit = 0;
static int requests_this_child;
static int num_listensocks = 0;
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = {
+module MODULE_EXPORT_VAR mpm_mpmt_pthread_module = {
MPM20_MODULE_STUFF,
mpmt_pthread_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
scoreboard *ap_scoreboard_image = NULL;
new_scoreboard *ap_new_scoreboard_image = NULL;
static int maintain_connection_status = 1;
-API_VAR_EXPORT char *ap_scoreboard_fname;
+API_EXPORT_VAR char *ap_scoreboard_fname;
/*****************************************************************
*
* Dealing with the scoreboard... a lot of these variables are global
-API_VAR_EXPORT extern scoreboard *ap_scoreboard_image;
+API_EXPORT_VAR extern scoreboard *ap_scoreboard_image;
-API_VAR_EXPORT extern ap_generation_t volatile ap_my_generation;
+API_EXPORT_VAR extern ap_generation_t volatile ap_my_generation;
/* for time_process_request() in http_main.c */
#define START_PREQUEST 1
char tpf_server_name[INETD_SERVNAME_LENGTH+1];
#endif /* TPF */
-API_VAR_EXPORT scoreboard *ap_scoreboard_image = NULL;
+API_EXPORT_VAR scoreboard *ap_scoreboard_image = NULL;
static new_scoreboard *ap_new_scoreboard_image = NULL;
#ifdef GPROF
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_prefork_module = {
+module MODULE_EXPORT_VAR mpm_prefork_module = {
MPM20_MODULE_STUFF,
prefork_pre_config, /* run hook before the configuration is read */
NULL, /* create per-directory config structure */
API_EXPORT(void) ap_sync_scoreboard_image(void);
API_EXPORT(int) ap_exists_scoreboard_image(void);
-API_VAR_EXPORT extern scoreboard *ap_scoreboard_image;
+API_EXPORT_VAR extern scoreboard *ap_scoreboard_image;
-API_VAR_EXPORT extern ap_generation_t volatile ap_my_generation;
+API_EXPORT_VAR extern ap_generation_t volatile ap_my_generation;
/* for time_process_request() in http_main.c */
#define START_PREQUEST 1
API_EXPORT(int) ap_exists_scoreboard_image(void);
-API_VAR_EXPORT extern scoreboard *ap_scoreboard_image;
+API_EXPORT_VAR extern scoreboard *ap_scoreboard_image;
/* for time_process_request() in http_main.c */
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_spmt_os2_module = {
+module MODULE_EXPORT_VAR mpm_spmt_os2_module = {
MPM20_MODULE_STUFF,
spmt_os2_pre_config, /* hook run before the configuration is read */
NULL, /* create per-directory config structure */
*/
#define CORE_PRIVATE
-#include "apr_portable.h"
+#include "ap_config.h"
#include "httpd.h"
+#include "apr_portable.h"
#include "http_main.h"
#include "http_log.h"
#include "http_config.h" /* for read_config */
ap_lock_t *start_mutex;
DWORD my_pid;
DWORD parent_pid;
-API_VAR_EXPORT ap_completion_t ap_mpm_init_complete = NULL;
+API_EXPORT_VAR ap_completion_t ap_mpm_init_complete = NULL;
static ap_status_t socket_cleanup(void *sock)
{
{ NULL }
};
-module MODULE_VAR_EXPORT mpm_winnt_module = {
+module MODULE_EXPORT_VAR mpm_winnt_module = {
MPM20_MODULE_STUFF,
winnt_pre_config, /* hook run before configuration is read */
NULL, /* create per-directory config structure */
extern void clean_child_exit(int);
typedef void (CALLBACK *ap_completion_t)();
-API_VAR_EXPORT ap_completion_t ap_mpm_init_complete;
+API_EXPORT_VAR ap_completion_t ap_mpm_init_complete;
API_EXPORT(void) ap_start_shutdown(void);
* HKLM\Software\[Vendor]\[Software]\[Version]\ServerRoot
*/
-#include "os.h"
+#include "ap_config.h"
#include "httpd.h"
#include "http_log.h"
#define CORE_PRIVATE
#include "main_win32.h"
+#include "ap_config.h"
#include "httpd.h"
#include "http_conf_globals.h"
#include "http_log.h"
#include "..\..\modules\mpm\winnt\winnt.h"
typedef void (CALLBACK *ap_completion_t)();
-API_VAR_IMPORT ap_completion_t ap_mpm_init_complete;
-API_VAR_IMPORT char *ap_server_argv0;
+API_EXPORT_VAR ap_completion_t ap_mpm_init_complete;
+API_EXPORT_VAR char *ap_server_argv0;
static struct
{