cvs commit: modperl-2.0/src/modules/perl mod_perl.h
dougm 2002/08/27 20:17:03 Modified:src/modules/perl mod_perl.h Log: include modperl_svptr_table.h Revision ChangesPath 1.52 +1 -0 modperl-2.0/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- mod_perl.h27 Aug 2002 04:26:54 - 1.51 +++ mod_perl.h28 Aug 2002 03:17:02 - 1.52 -66,6 +66,7 #include modperl_env.h #include modperl_cgi.h #include modperl_perl.h +#include modperl_svptr_table.h #include modperl_module.h void modperl_init(server_rec *s, apr_pool_t *p);
cvs commit: modperl-2.0/src/modules/perl mod_perl.h
dougm 2002/06/20 17:05:49 Modified:lib/ModPerl Code.pm src/modules/perl mod_perl.h Log: integrate modperl_sys modules Revision ChangesPath 1.83 +6 -1 modperl-2.0/lib/ModPerl/Code.pm Index: Code.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- Code.pm 16 Jun 2002 01:09:46 - 1.82 +++ Code.pm 21 Jun 2002 00:05:49 - 1.83 -2,6 +2,7 use strict; use warnings FATAL = 'all'; +use Config; use mod_perl (); use Apache::Build (); -346,6 +347,10 my $n = 1; +(my $dlsrc = uc $Config{dlsrc}) =~ s/\.xs$//i; + +print $h_fh \n#define MP_SYS_$dlsrc 1\n; + while (my($class, $opts) = each %{ $self-{flags} }) { my $i = 0; my lookup = (); -563,7 +568,7 my c_src_names = qw(interp tipool log config cmd options callback handler gtop util io filter bucket mgv pcw global env cgi - perl perl_global perl_pp); + perl perl_global perl_pp sys); my g_c_names = map { modperl_$_ } qw(hooks directives flags xsinit); my c_names = ('mod_perl', (map modperl_$_, c_src_names)); sub c_files { [map { $_.c } c_names, g_c_names] } 1.48 +1 -0 modperl-2.0/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- mod_perl.h19 Jun 2002 05:18:04 - 1.47 +++ mod_perl.h21 Jun 2002 00:05:49 - 1.48 -18,6 +18,7 #include modperl_hooks.h #include modperl_perl_global.h #include modperl_perl_pp.h +#include modperl_sys.h /* both perl and apr have largefile support enabled */ #define MP_LARGE_FILES_ENABLED \
cvs commit: modperl-2.0/src/modules/perl mod_perl.h
dougm 2002/05/31 08:41:11 Modified:src/modules/perl mod_perl.h Log: add some MP_LARGE_FILES_ macros that could come in handy Revision ChangesPath 1.43 +22 -0 modperl-2.0/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- mod_perl.h19 May 2002 02:26:11 - 1.42 +++ mod_perl.h31 May 2002 15:41:11 - 1.43 -14,6 +14,28 #include modperl_hooks.h #include modperl_perl_global.h +/* both perl and apr have largefile support enabled */ +#define MP_LARGE_FILES_ENABLED \ + (defined(USE_LARGE_FILES) APR_HAS_LARGE_FILES) + +/* both perl and apr have largefile support disabled */ +#define MP_LARGE_FILES_DISABLED \ + (!defined(USE_LARGE_FILES) !APR_HAS_LARGE_FILES) + +/* perl support is enabled, apr support is disabled */ +#define MP_LARGE_FILES_PERL_ONLY \ + (defined(USE_LARGE_FILES) !APR_HAS_LARGE_FILES) + +/* apr support is enabled, perl support is disabled */ +#define MP_LARGE_FILES_APR_ONLY \ + (!defined(USE_LARGE_FILES) APR_HAS_LARGE_FILES) + +/* conflict due to not have either both perl and apr + * support enabled or both disabled + */ +#define MP_LARGE_FILES_CONFLICT \ + !(MP_LARGE_FILES_ENABLED || MP_LARGE_FILES_DISABLED) + #ifdef MP_USE_GTOP #include modperl_gtop.h #endif
cvs commit: modperl-2.0/src/modules/perl mod_perl.h modperl_cmd.c
dougm 02/05/18 19:26:11 Modified:src/modules/perl mod_perl.h modperl_cmd.c Log: fold some duplication in modperl_cmd_{set,add}_var Revision ChangesPath 1.42 +4 -0 modperl-2.0/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- mod_perl.h6 Apr 2002 17:42:10 - 1.41 +++ mod_perl.h19 May 2002 02:26:11 - 1.42 -62,4 +62,8 #define MgTypeExt(mg) (mg-mg_type == '~') +typedef void MP_FUNC_T(modperl_table_modify_t) (apr_table_t *, +const char *, +const char *); + #endif /* MOD_PERL_H */ 1.20 +19 -19modperl-2.0/src/modules/perl/modperl_cmd.c Index: modperl_cmd.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- modperl_cmd.c 19 May 2002 02:10:13 - 1.19 +++ modperl_cmd.c 19 May 2002 02:26:11 - 1.20 -60,38 +60,38 return NULL; } -MP_CMD_SRV_DECLARE2(set_var) +static MP_CMD_SRV_DECLARE2(handle_vars) { MP_dSCFG(parms-server); modperl_config_dir_t *dcfg = (modperl_config_dir_t *)mconfig; - -apr_table_set(dcfg-vars, arg1, arg2); -MP_TRACE_d(MP_FUNC, DIR: arg1 = %s, arg2 = %s\n, arg1, arg2); +const char *name = parms-cmd-name; + +modperl_table_modify_t func = +strEQ(name, PerlSetVar) ? apr_table_set : apr_table_add; + +func(dcfg-vars, arg1, arg2); + +MP_TRACE_d(MP_FUNC, %s DIR: arg1 = %s, arg2 = %s\n, + name, arg1, arg2); /* make available via Apache-server-dir_config */ if (!parms-path) { -apr_table_set(scfg-vars, arg1, arg2); -MP_TRACE_d(MP_FUNC, SRV: arg1 = %s, arg2 = %s\n, arg1, arg2); +func(scfg-vars, arg1, arg2); +MP_TRACE_d(MP_FUNC, %s SRV: arg1 = %s, arg2 = %s\n, + name, arg1, arg2); } return NULL; } -MP_CMD_SRV_DECLARE2(add_var) +MP_CMD_SRV_DECLARE2(set_var) { -MP_dSCFG(parms-server); -modperl_config_dir_t *dcfg = (modperl_config_dir_t *)mconfig; - -apr_table_add(dcfg-vars, arg1, arg2); -MP_TRACE_d(MP_FUNC, DIR: arg1 = %s, arg2 = %s\n, arg1, arg2); - -/* make available via Apache-server-dir_config */ -if (!parms-path) { -apr_table_add(scfg-vars, arg1, arg2); -MP_TRACE_d(MP_FUNC, SRV: arg1 = %s, arg2 = %s\n, arg1, arg2); -} +return modperl_cmd_handle_vars(parms, mconfig, arg1, arg2); +} -return NULL; +MP_CMD_SRV_DECLARE2(add_var) +{ +return modperl_cmd_handle_vars(parms, mconfig, arg1, arg2); } MP_CMD_SRV_DECLARE2(set_env)