Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id MAA19235; Wed, 30 Jul 1997 12:05:27 -0700 (PDT) Received: from twinlark.arctic.org (twinlark.arctic.org [204.62.130.91]) by hyperreal.org (8.8.5/8.8.5) with SMTP id MAA19210 for ; Wed, 30 Jul 1997 12:05:20 -0700 (PDT) Received: (qmail 9582 invoked by uid 500); 30 Jul 1997 19:05:15 -0000 Date: Wed, 30 Jul 1997 12:05:15 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: Re: ApacheModulePerl.dll In-Reply-To: <199707290054.UAA31398@postman.opengroup.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org On Mon, 28 Jul 1997, Doug MacEachern wrote: > these for -DPERL_SECTIONS () > handle_command > limit_section > init_virtual_host > add_per_url_conf > core_module > create_per_dir_config > add_per_dir_conf > find_command_in_modules > top_module I'm curious ... how many of these would you need if we made an srm_command_loop which called a getline supplied by the caller? i.e. instead of invoking all the core things directly, what if we gave you an interface where you could pass, line-by-line, arbitrary sections of config files? > misc: > basic_http_header We already discussed not including this one. > max_requests_per_child > log_transaction > translate_name Here's a patch that does the rest ... Dean Index: http_conf_globals.h =================================================================== RCS file: /export/home/cvs/apache/src/http_conf_globals.h,v retrieving revision 1.15 diff -u -r1.15 http_conf_globals.h --- http_conf_globals.h 1997/07/27 02:15:45 1.15 +++ http_conf_globals.h 1997/07/30 19:04:13 @@ -61,7 +61,7 @@ #ifdef MULTIPLE_GROUPS extern gid_t group_id_list[NGROUPS_MAX]; #endif -extern int max_requests_per_child; +extern MODULE_VAR_EXPORT int max_requests_per_child; extern int threads_per_child; extern int excess_requests_per_child; extern struct in_addr bind_address; Index: http_config.c =================================================================== RCS file: /export/home/cvs/apache/src/http_config.c,v retrieving revision 1.68 diff -u -r1.68 http_config.c --- http_config.c 1997/07/28 18:22:42 1.68 +++ http_config.c 1997/07/30 19:04:15 @@ -200,7 +200,7 @@ return create_empty_config (p); } -void *create_per_dir_config (pool *p) { +API_EXPORT(void *) create_per_dir_config (pool *p) { return create_empty_config (p); } @@ -348,7 +348,7 @@ return run_all ? OK : DECLINED; } -int translate_name(request_rec *r) { +API_EXPORT(int) translate_name(request_rec *r) { return run_method (r, offsets_into_method_ptrs.translate_handler, 0); } @@ -364,7 +364,7 @@ return run_method (r, offsets_into_method_ptrs.fixer_upper, 1); } -int log_transaction (request_rec *r) { +API_EXPORT(int) log_transaction (request_rec *r) { return run_method (r, offsets_into_method_ptrs.logger, 1); } @@ -728,7 +728,7 @@ return NULL; } -const command_rec *find_command_in_modules (const char *cmd_name, module **mod) +API_EXPORT(const command_rec *) find_command_in_modules (const char *cmd_name, module **mod) { const command_rec *cmdp; module *modp; @@ -742,7 +742,7 @@ return NULL; } -const char *handle_command (cmd_parms *parms, void *config, const char *l) +API_EXPORT(const char *) handle_command (cmd_parms *parms, void *config, const char *l) { const char *args, *cmd_name, *retval; const command_rec *cmd; @@ -1028,7 +1028,7 @@ if (t != NULL) *t = ':'; } -server_rec *init_virtual_host (pool *p, const char *hostname, +API_EXPORT(server_rec *) init_virtual_host (pool *p, const char *hostname, server_rec *main_server) { server_rec *s = (server_rec *)pcalloc (p, sizeof (server_rec)); Index: http_config.h =================================================================== RCS file: /export/home/cvs/apache/src/http_config.h,v retrieving revision 1.41 diff -u -r1.41 http_config.h --- http_config.h 1997/07/28 18:22:43 1.41 +++ http_config.h 1997/07/30 19:04:16 @@ -296,7 +296,7 @@ /* For http_request.c... */ void *create_request_config (pool *p); -void *create_per_dir_config (pool *p); +API_EXPORT(void *) create_per_dir_config (pool *p); void *merge_per_dir_configs (pool *p, void *base, void *new); /* For http_core.c... ( command and virtual hosts) */ @@ -311,7 +311,7 @@ /* Module-method dispatchers, also for http_request.c */ -int translate_name (request_rec *); +API_EXPORT(int) translate_name (request_rec *); int directory_walk (request_rec *); /* check symlinks, get per-dir config */ int check_access (request_rec *); /* check access on non-auth basis */ int check_user_id (request_rec *); /* obtain valid username from client auth */ @@ -319,7 +319,19 @@ int find_types (request_rec *); /* identify MIME type */ int run_fixups (request_rec *); /* poke around for other metainfo, etc.... */ int invoke_handler (request_rec *); -int log_transaction (request_rec *r); +API_EXPORT(int) log_transaction (request_rec *r); int header_parse (request_rec *); + +/* For mod_perl */ + +API_EXPORT(const char *) handle_command (cmd_parms *parms, void *config, const char *l); +API_EXPORT(const char *) limit_section (cmd_parms *cmd, void *dummy, const char *arg); +API_EXPORT(server_rec *) init_virtual_host (pool *p, const char *hostname, + server_rec *main_server); +API_EXPORT(void) add_per_url_conf (server_rec *s, void *url_config); +API_EXPORT(void) add_per_dir_conf (server_rec *s, void *dir_config) +API_EXPORT(const command_rec *) find_command_in_modules (const char *cmd_name, module **mod); +extern MODULE_VAR_EXPORT module *top_module; +extern MODULE_VAR_EXPORT module core_module; #endif Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.102 diff -u -r1.102 http_core.c --- http_core.c 1997/07/30 18:41:51 1.102 +++ http_core.c 1997/07/30 19:04:20 @@ -210,7 +210,7 @@ * these are part of the core server config. */ -void add_per_dir_conf (server_rec *s, void *dir_config) +API_EXPORT(void) add_per_dir_conf (server_rec *s, void *dir_config) { core_server_config *sconf = get_module_config (s->module_config, &core_module); @@ -219,7 +219,7 @@ *new_space = dir_config; } -void add_per_url_conf (server_rec *s, void *url_config) +API_EXPORT(void) add_per_url_conf (server_rec *s, void *url_config) { core_server_config *sconf = get_module_config (s->module_config, &core_module); @@ -601,7 +601,7 @@ return NULL; } -const char *limit_section (cmd_parms *cmd, void *dummy, const char *arg) +API_EXPORT(const char *) limit_section (cmd_parms *cmd, void *dummy, const char *arg) { const char *limited_methods = getword(cmd->pool,&arg,'>'); int limited = 0;