cvs commit: modperl-2.0 STATUS

2003-01-01 Thread dougm
dougm   2003/01/01 10:43:51

  Modified:.STATUS
  Log:
  must be fixed before 1.99_08
  
  Revision  ChangesPath
  1.28  +3 -5  modperl-2.0/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/modperl-2.0/STATUS,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- STATUS1 Jan 2003 03:45:54 -   1.27
  +++ STATUS1 Jan 2003 18:43:51 -   1.28
  @@ -24,11 +24,9 @@
   Release Showstoppers:
   -
   
  - * 
  -   Report: 
  -   Status: 
  -
  + * current cvs does not work with vanilla 5.6.1 or 5.8.0 (CGI.pm version issue)
   
  + * Makefile.PL process ugly unknown typemap warnings must go away
   
   Available Patches:
   --
  
  
  



cvs commit: modperl-2.0/t/modules include2.t

2002-10-07 Thread dougm

dougm   2002/10/07 13:44:32

  Modified:t/conf   extra.conf.in
  Added:   t/htdocs/includes-registry test.spl
   t/modules include2.t
  Log:
  test for mod_include parsing of mod_perl script output
  
  Revision  ChangesPath
  1.4   +2 -1  modperl-2.0/t/conf/extra.conf.in
  
  Index: extra.conf.in
  ===
  RCS file: /home/cvs/modperl-2.0/t/conf/extra.conf.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- extra.conf.in 9 Apr 2002 03:38:02 -   1.3
  +++ extra.conf.in 7 Oct 2002 20:44:31 -   1.4
   -9,7 +9,8 
   
   Directory ServerRoot/htdocs/includes-registry
   SetHandler perl-script
  -Options +ExecCGI
  +Options +ExecCGI +IncludesNoExec
   PerlResponseHandler ModPerl::Registry
   PerlOptions +ParseHeaders +GlobalRequest
  +AddOutputFilter INCLUDES .spl
   /Directory
  
  
  
  1.1  modperl-2.0/t/htdocs/includes-registry/test.spl
  
  Index: test.spl
  ===
  use strict;
  
  #XXX: this test needs to be more robust.
  #various output buffers spread across multiple prints
  #more mod_include features mixed and checking that the output
  #is *exactly* what we expected, not just matching a few patterns.
  
  print Content-type: text/html\n\n;
  
  my $r = shift;
  
  my $test_string = 'Perl-SSI';
  
  $r-subprocess_env-set(MY_TEST = $test_string);
  
  print EOF;
  Hello World from !--#echo var=SERVER_ADMIN --br
  Local date is !--#echo var=DATE_LOCAL --br
  Brought to you by !--#echo var=MY_TEST --
  !--#echo var=SERVER_SOFTWARE --
  br
  EOF
  
  
  
  
  1.1  modperl-2.0/t/modules/include2.t
  
  Index: include2.t
  ===
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  use Apache::TestRequest;
  use Apache::TestUtil;
  
  #test for mod_include parsing of mod_perl script output
  #XXX: needs to be more robust.  see t/htdocs/includes-registry/test.spl
  my patterns = (
  'Perl-SSI', #MY_TEST
  'mod_perl', #SERVER_SOFTWARE
  );
  
  plan tests = 2 + patterns, ['include'];
  
  my $location = /includes-registry/test.spl;
  
  my($res, $str);
  
  $res = GET $location;
  
  ok $res-is_success;
  
  $str = $res-content;
  
  ok $str;
  
  for my $pat (patterns) {
  ok t_cmp(qr{$pat}, $str, /$pat/);
  }
  
  
  



cvs commit: modperl-2.0 Changes

2002-09-27 Thread dougm

dougm   2002/09/27 08:11:21

  Modified:.Changes
  Log:
  1.99_06 release
  
  Revision  ChangesPath
  1.46  +1 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- Changes   16 Sep 2002 19:14:16 -  1.45
  +++ Changes   27 Sep 2002 15:11:21 -  1.46
  @@ -8,7 +8,7 @@
   
   =over 3
   
  -=item 1.99_06-dev
  +=item 1.99_06 - September 25, 2002
   
   add support for pod directives (=pod,=back,=cut) and __END__ directive
   [Philippe M. Chiasson [EMAIL PROTECTED]]
  
  
  



cvs commit: modperl-2.0/lib mod_perl.pm

2002-09-27 Thread dougm

dougm   2002/09/27 08:18:37

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.47  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- Changes   27 Sep 2002 15:11:21 -  1.46
  +++ Changes   27 Sep 2002 15:18:37 -  1.47
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.99_97-dev
  +
   =item 1.99_06 - September 25, 2002
   
   add support for pod directives (=pod,=back,=cut) and __END__ directive
  
  
  
  1.7   +1 -1  modperl-2.0/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/mod_perl.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_perl.pm   20 Aug 2002 16:49:12 -  1.6
  +++ mod_perl.pm   27 Sep 2002 15:18:37 -  1.7
   -4,7 +4,7 
   use strict;
   
   BEGIN {
  -our $VERSION = 1.9906;
  +our $VERSION = 1.9907;
   }
   
   1;
  
  
  



cvs commit: modperl-2.0/t/response/TestDirective pod.pm

2002-09-27 Thread dougm

dougm   2002/09/27 12:33:33

  Modified:.Changes
   lib/ModPerl TestRun.pm
   t/response/TestDirective pod.pm
  Log:
  Submitted by: gozer
  Reviewed by:  dougm
  fix =pod directive test config problem
  
  Revision  ChangesPath
  1.48  +4 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Changes   27 Sep 2002 15:18:37 -  1.47
  +++ Changes   27 Sep 2002 19:33:32 -  1.48
  @@ -8,7 +8,10 @@
   
   =over 3
   
  -=item 1.99_97-dev
  +=item 1.99_07 - September 25, 2002
  +
  +fix =pod directive test config problem
  +[Philippe M. Chiasson [EMAIL PROTECTED]]
   
   =item 1.99_06 - September 25, 2002
   
  
  
  
  1.4   +13 -0 modperl-2.0/lib/ModPerl/TestRun.pm
  
  Index: TestRun.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TestRun.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestRun.pm27 Aug 2002 04:31:55 -  1.3
  +++ TestRun.pm27 Sep 2002 19:33:32 -  1.4
  @@ -47,6 +47,19 @@
   MyOtherTest value
   /Location
   EOF
  +
  +#XXX: this should only be done for the modperl-2.0 tests
  +$self-postamble('EOF');
  +=pod
  +This is some pod data
  +=over apache
  +PerlSetVar TestDirective__pod_over_worked yes
  +=back
  +This is some more pod
  +=cut
  +PerlSetVar TestDirective__pod_cut_worked yes
  +EOF
  +
   }
   
   1;
  
  
  
  1.2   +0 -13 modperl-2.0/t/response/TestDirective/pod.pm
  
  Index: pod.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/pod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- pod.pm17 Sep 2002 02:37:44 -  1.1
  +++ pod.pm27 Sep 2002 19:33:32 -  1.2
  @@ -22,16 +22,3 @@
   }
   
   1;
  -__END__
  -=pod
  -This is some pod data
  -
  -=over apache
  -PerlSetVar TestDirective__pod_over_worked yes
  -=back
  -
  -This is some more pod
  -
  -=cut
  -
  -PerlSetVar TestDirective__pod_cut_worked yes
  
  
  



cvs commit: modperl-2.0/lib mod_perl.pm

2002-09-27 Thread dougm

dougm   2002/09/27 12:41:51

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.49  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Changes   27 Sep 2002 19:33:32 -  1.48
  +++ Changes   27 Sep 2002 19:41:50 -  1.49
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.99_08-dev
  +
   =item 1.99_07 - September 25, 2002
   
   fix =pod directive test config problem
  
  
  
  1.8   +1 -1  modperl-2.0/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/mod_perl.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mod_perl.pm   27 Sep 2002 15:18:37 -  1.7
  +++ mod_perl.pm   27 Sep 2002 19:41:51 -  1.8
   -4,7 +4,7 
   use strict;
   
   BEGIN {
  -our $VERSION = 1.9907;
  +our $VERSION = 1.9908;
   }
   
   1;
  
  
  



cvs commit: modperl-2.0/t/filter/TestFilter api.pm buckets.pm

2002-09-10 Thread dougm

dougm   2002/09/10 17:50:31

  Modified:.Changes
   t/apache scanhdrs.t
   t/filter/TestFilter api.pm buckets.pm
  Log:
  Submitted by: Philippe M. Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  tweaks to support Test.pm 1.21
  
  Revision  ChangesPath
  1.44  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Changes   5 Sep 2002 01:50:45 -   1.43
  +++ Changes   11 Sep 2002 00:50:31 -  1.44
  @@ -10,6 +10,8 @@
   
   =item 1.99_06-dev
   
  +tweaks to support Test.pm 1.21 [Philippe M. Chiasson [EMAIL PROTECTED]]
  +
   add $r-add_config method to add dynamic configuration at request time
   
   add Apache::DIR_MAGIC_TYPE constant
  
  
  
  1.3   +1 -1  modperl-2.0/t/apache/scanhdrs.t
  
  Index: scanhdrs.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/apache/scanhdrs.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- scanhdrs.t20 Dec 2001 03:54:40 -  1.2
  +++ scanhdrs.t11 Sep 2002 00:50:31 -  1.3
  @@ -11,7 +11,7 @@
   
   my $res = GET $location;
   
  -ok $res-content eq 1..1\nok 1\n;
  +ok $res-content =~ /^ok 1$/m;
   
   ok $res-header('Content-Type') eq 'text/test-output';
   
  
  
  
  1.7   +1 -0  modperl-2.0/t/filter/TestFilter/api.pm
  
  Index: api.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/api.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- api.pm11 Apr 2002 11:08:43 -  1.6
  +++ api.pm11 Sep 2002 00:50:31 -  1.7
  @@ -17,6 +17,7 @@
   #XXX: else pp_untie complains:
   #untie attempted while %d inner references still exist
   sub Apache::Filter::UNTIE {}
  +sub Apache::Filter::PRINTF {}
   
   sub handler {
   my $filter = shift;
  
  
  
  1.7   +3 -0  modperl-2.0/t/filter/TestFilter/buckets.pm
  
  Index: buckets.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/buckets.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- buckets.pm11 Apr 2002 11:08:43 -  1.6
  +++ buckets.pm11 Sep 2002 00:50:31 -  1.7
  @@ -13,6 +13,9 @@
   
   use Apache::Const -compile = 'OK';
   
  +#XXX: Not implemented yet, required by Test.pm
  +sub Apache::TestToString::PRINTF {}
  +
   sub handler {
   my($filter, $bb) = @_;
   
  
  
  



cvs commit: modperl-2.0/xs/ModPerl/Const Const.pm

2002-09-05 Thread dougm

dougm   2002/09/05 10:07:23

  Modified:xs/ModPerl/Const Const.pm
  Log:
  fix typo which triggered bootstrap when running under mod_perl
  
  Revision  ChangesPath
  1.4   +1 -1  modperl-2.0/xs/ModPerl/Const/Const.pm
  
  Index: Const.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/ModPerl/Const/Const.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Const.pm  4 Sep 2002 17:10:15 -   1.3
  +++ Const.pm  5 Sep 2002 17:07:23 -   1.4
   -13,7 +13,7 
   sub dl_load_flags { DL_GLOBAL }
   
   #only bootstrap for use outside of mod_perl
  -unless (defined Modperl::Const::compile) {
  +unless (defined ModPerl::Const::compile) {
   __PACKAGE__-bootstrap($VERSION);
   }
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_module.c

2002-09-05 Thread dougm

dougm   2002/09/05 11:05:52

  Modified:src/modules/perl modperl_module.c
  Log:
  automate SvREFCNT-ing used with modperl_module_cmd_fetch a bit
  
  Revision  ChangesPath
  1.7   +9 -7  modperl-2.0/src/modules/perl/modperl_module.c
  
  Index: modperl_module.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_module.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_module.c  4 Sep 2002 17:11:22 -   1.6
  +++ modperl_module.c  5 Sep 2002 18:05:52 -   1.7
   -499,7 +499,10 
   {
   const char *errmsg = NULL;
   
  -*retval = Nullsv;
  +if (*retval) {
  +SvREFCNT_dec(*retval);
  +*retval = Nullsv;
  +}
   
   if (sv_isobject(obj)) {
   int count;
   -572,7 +575,7 
   cmds = apr_array_make(p, fill+1, sizeof(command_rec));
   
   for (i=0; i=fill; i++) {
  -SV *val;
  +SV *val = Nullsv;
   STRLEN len;
   SV *obj = AvARRAY(module_cmds)[i];
   modperl_module_cmd_data_t *info = modperl_module_cmd_data_new(p);
   -586,7 +589,6 
   }
   
   cmd-name = apr_pstrdup(p, SvPV(val, len));
  -SvREFCNT_dec(val);
   
   if ((errmsg = modperl_module_cmd_fetch(aTHX_ obj, args_how, val))) {
   /* XXX default based on $self-func prototype */
   -600,7 +602,6 
   cmd-args_how =
   modperl_constants_lookup_apache(SvPV(val, len));
   }
  -SvREFCNT_dec(val);
   }
   
   if (!modperl_module_cmd_lookup(cmd)) {
   -614,7 +615,6 
   }
   else {
   info-func_name = apr_pstrdup(p, SvPV(val, len));
  -SvREFCNT_dec(val);
   }
   
   if ((errmsg = modperl_module_cmd_fetch(aTHX_ obj, req_override, val))) {
   -628,7 +628,6 
   cmd-req_override =
   modperl_constants_lookup_apache(SvPV(val, len));
   }
  -SvREFCNT_dec(val);
   }
   
   if ((errmsg = modperl_module_cmd_fetch(aTHX_ obj, errmsg, val))) {
   -638,7 +637,6 
   }
   else {
   cmd-errmsg = apr_pstrdup(p, SvPV(val, len));
  -SvREFCNT_dec(val);
   }
   
   cmd-cmd_data = info;
   -646,7 +644,11 
   /* no default if undefined */
   if (!(errmsg = modperl_module_cmd_fetch(aTHX_ obj, data, val))) {
   info-cmd_data = apr_pstrdup(p, SvPV(val, len));
  +}
  +
  +if (val) {
   SvREFCNT_dec(val);
  +val = Nullsv;
   }
   }
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2002-09-04 Thread dougm

dougm   2002/09/04 10:56:51

  Modified:src/modules/perl mod_perl.c
  Log:
  make sure MP_init_done is reset when we teardown.
  (should only matter for static linkage, but doesn't hurt with dso)
  
  Revision  ChangesPath
  1.137 +4 -2  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.136
  retrieving revision 1.137
  diff -u -r1.136 -r1.137
  --- mod_perl.c4 Sep 2002 17:51:02 -   1.136
  +++ mod_perl.c4 Sep 2002 17:56:50 -   1.137
   -354,8 +354,12 
   return APR_SUCCESS;
   }
   
  +static int MP_init_done = 0;
  +
   static apr_status_t modperl_sys_term(void *data)
   {
  +MP_init_done = 0;
  +
   modperl_env_unload();
   
   modperl_perl_pp_unset_all();
   -365,8 +369,6 
   #endif
   return APR_SUCCESS;
   }
  -
  -static int MP_init_done = 0;
   
   int modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
 apr_pool_t *ptemp, server_rec *s)
  
  
  



cvs commit: modperl-2.0/xs/maps modperl_functions.map

2002-09-04 Thread dougm

dougm   2002/09/04 18:48:40

  Modified:xs/maps  modperl_functions.map
  Log:
  Apache::Directive-insert is replaced by Apache::Server-add_config
  
  add $r-add_config method
  
  Revision  ChangesPath
  1.45  +3 -1  modperl-2.0/xs/maps/modperl_functions.map
  
  Index: modperl_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- modperl_functions.map 24 Aug 2002 16:33:15 -  1.44
  +++ modperl_functions.map 5 Sep 2002 01:48:40 -   1.45
   -19,6 +19,8 
mpxs_Apache__RequestRec_get_handlers
mpxs_Apache__RequestRec_location
mpxs_Apache__RequestRec_pnotes | | r, key=Nullsv, val=Nullsv
  + modperl_config_insert_request | | \
  +  r, lines, path=r-filename, override=OR_AUTHCFG | add_config
   
#protocol module helpers
mpxs_Apache__RequestRec_location_merge
   -55,6 +57,7 
mpxs_Apache__Server_push_handlers
mpxs_Apache__Server_set_handlers
mpxs_Apache__Server_get_handlers
  + modperl_config_insert_server | | | add_config
   
   PACKAGE=Apache::Server
SV *:DEFINE_dir_config | | server_rec *:s, char *:key=NULL, SV *:sv_val=Nullsv
   -105,6 +108,5 
modperl_spawn_proc_prog | MPXS_ | ... | spawn_proc_prog
   
   MODULE=Apache::Directive
  - mpxs_Apache__Directive_insert
mpxs_Apache__Directive_as_string
   
  
  
  



cvs commit: modperl-2.0/t/conf modperl_extra.pl

2002-09-04 Thread dougm

dougm   2002/09/04 18:49:32

  Modified:t/conf   modperl_extra.pl
  Log:
  test $r-add_config
  
  Revision  ChangesPath
  1.19  +14 -5 modperl-2.0/t/conf/modperl_extra.pl
  
  Index: modperl_extra.pl
  ===
  RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- modperl_extra.pl  24 Aug 2002 16:33:15 -  1.18
  +++ modperl_extra.pl  5 Sep 2002 01:49:32 -   1.19
   -62,6 +62,16 
   return $buf;
   }
   
  +sub ModPerl::Test::add_config {
  +my $r = shift;
  +
  +#test adding config at request time
  +my $errmsg = $r-add_config(['require valid-user']);
  +die $errmsg if $errmsg;
  +
  +Apache::OK;
  +}
  +
   #Perl handler=ModPerl::Test::perl_section
   # ...
   #/Perl
   -77,23 +87,22 
   ##   a real handler would do something like:
   #eval package $package; $code;
   #die $ if $;
  -##   feed %Apache::ReadConfig:: to Apache::Directive-insert
  +##   feed %Apache::ReadConfig:: to Apache::Server-add_config
   
   my $htdocs = Apache::server_root_relative($parms-pool, 'htdocs');
   
   my cfg = (
  Alias /perl_sections $htdocs,
  Location /perl_sections,
  -  require valid-user,
  +#  require valid-user,
  +  PerlInitHandler ModPerl::Test::add_config,
 AuthType Basic,
 AuthName PerlSection,
 PerlAuthenHandler TestHooks::authen,
  /Location,
   );
   
  -my $errmsg = Apache::Directive-insert($parms-server,
  -   $parms-pool,
  -   \@cfg);
  +my $errmsg = $parms-server-add_config(\@cfg);
   
   die $errmsg if $errmsg;
   
  
  
  



cvs commit: modperl-2.0 Changes STATUS

2002-09-04 Thread dougm

dougm   2002/09/04 18:50:45

  Modified:.Changes STATUS
  Log:
  update
  
  Revision  ChangesPath
  1.43  +4 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Changes   29 Aug 2002 02:28:44 -  1.42
  +++ Changes   5 Sep 2002 01:50:45 -   1.43
   -10,13 +10,16 
   
   =item 1.99_06-dev
   
  +add $r-add_config method to add dynamic configuration at request time
  +
   add Apache::DIR_MAGIC_TYPE constant
   
   add support for directive handlers
   
   fix source_scan to run with current httpd/apr
   
  -add Apache::Directive-insert method to add dynamic configuration
  +add Apache::Server-add_config method to add dynamic configuration at
  +server startup time
 
   add Apache::Directive-to_string method
   
  
  
  
  1.11  +2 -2  modperl-2.0/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/modperl-2.0/STATUS,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- STATUS4 Sep 2002 18:02:51 -   1.10
  +++ STATUS5 Sep 2002 01:50:45 -   1.11
   -57,7 +57,7 
   * pluggable Perl sections have been implemented but need a default
 handler to actually convert the Perl code into apache config
   
  -* Apache-httpd_conf compat method mapping to Apache::Directive-insert
  +* Apache-httpd_conf compat method mapping to Apache::Server-add_config
   
   * directive handlers are supported but need some work for 1.x compat
 - Apache::ModuleConfig-get needs a compat method mapping to
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_tipool.c

2002-09-04 Thread dougm

dougm   2002/09/04 21:44:23

  Modified:src/modules/perl modperl_tipool.c
  Log:
  plug memory leak in tipools
  
  Revision  ChangesPath
  1.9   +5 -1  modperl-2.0/src/modules/perl/modperl_tipool.c
  
  Index: modperl_tipool.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_tipool.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_tipool.c  21 Jun 2002 03:02:54 -  1.8
  +++ modperl_tipool.c  5 Sep 2002 04:44:23 -   1.9
   -182,12 +182,16 
   void modperl_tipool_destroy(modperl_tipool_t *tipool)
   {
   while (tipool-idle) {
  +modperl_list_t *listp;
  +
   if (tipool-func-tipool_destroy) {
   (*tipool-func-tipool_destroy)(tipool, tipool-data,
   tipool-idle-data);
   }
   tipool-size--;
  -tipool-idle = tipool-idle-next;
  +listp = tipool-idle-next;
  +free(tipool-idle);
  +tipool-idle = listp;
   }
   
   if (tipool-busy) {
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c

2002-08-27 Thread dougm

dougm   2002/08/27 20:12:46

  Modified:src/modules/perl modperl_cmd.c
  Log:
  use ap_strstr_c instead of strstr to avoid a warning
  
  Revision  ChangesPath
  1.27  +1 -1  modperl-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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- modperl_cmd.c 27 Aug 2002 04:26:54 -  1.26
  +++ modperl_cmd.c 28 Aug 2002 03:12:46 -  1.27
   -308,7 +308,7 
   server_rec *s = parms-server;
   const char *errmsg;
   
  -if (!strstr(arg, ::)) {
  +if (!ap_strstr_c(arg, ::)) {
   return DECLINE_CMD; /* let mod_so handle it */
   }
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_svptr_table.c modperl_svptr_table.h

2002-08-27 Thread dougm

dougm   2002/08/27 20:14:56

  Added:   src/modules/perl modperl_svptr_table.c modperl_svptr_table.h
  Log:
  move ptr_table_ api add ons to their own module.
  
  duplicate the Perl ptr_table_ api into modperl_svptr_table_ api
  since the ptr_table_ api does not exist without ithreads and since
  5.8.0+ has functions that 5.6.x does not
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_svptr_table.c
  
  Index: modperl_svptr_table.c
  ===
  #include mod_perl.h
  
  /*
   * modperl_svptr_table api is an add-on to the Perl ptr_table_ api.
   * we use a PTR_TBL_t to map config structures (e.g. from parsed
   * httpd.conf or .htaccess), where each interpreter needs to have its
   * own copy of the Perl SV object.  we do not use an HV* for this, because
   * the HV keys must be SVs with a string value, too much overhead.
   * we do not use an apr_hash_t because they only have the lifetime of
   * the pool used to create them. which may or may not be the same lifetime
   * of the objects we need to lookup.
   */
  
  #ifdef USE_ITHREADS
  
  #ifdef MP_PERL_5_6_x
  #   define my_sv_dup(s, p) sv_dup(s)
  
  typedef struct {
  AV *stashes;
  UV flags;
  PerlInterpreter *proto_perl;
  } CLONE_PARAMS;
  
  #else
  #   define my_sv_dup(s, p) sv_dup(s, p)
  #endif
  
  /*
   * copy a PTR_TBL_t whos PTR_TBL_ENT_t values are SVs.
   * the SVs are dup-ed so each interpreter has its own copy.
   */
  PTR_TBL_t *modperl_svptr_table_clone(pTHX_ PerlInterpreter *proto_perl,
   PTR_TBL_t *source)
  {
  UV i;
  PTR_TBL_t *tbl;
  PTR_TBL_ENT_t **src_ary, **dst_ary;
  CLONE_PARAMS parms;
  
  Newz(0, tbl, 1, PTR_TBL_t);
  tbl-tbl_max  = source-tbl_max;
  tbl-tbl_items= source-tbl_items;
  Newz(0, tbl-tbl_ary, tbl-tbl_max + 1, PTR_TBL_ENT_t *);
  
  dst_ary = tbl-tbl_ary;
  src_ary = source-tbl_ary;
  
  Zero(parms, 0, CLONE_PARAMS);
  parms.flags = 0;
  parms.stashes = newAV();
  
  for (i=0; i  source-tbl_max; i++, dst_ary++, src_ary++) {
PTR_TBL_ENT_t *src_ent, *dst_ent=NULL;
  
if (!*src_ary) {
continue;
  }
  
for (src_ent = *src_ary;
   src_ent;
   src_ent = src_ent-next)
  {
  if (dst_ent == NULL) {
  Newz(0, dst_ent, 1, PTR_TBL_ENT_t);
  *dst_ary = dst_ent;
  }
  else {
  Newz(0, dst_ent-next, 1, PTR_TBL_ENT_t);
  dst_ent = dst_ent-next;
  }
  
  /* key is just a pointer we do not modify, no need to copy */
  dst_ent-oldval = src_ent-oldval;
  
  dst_ent-newval =
  SvREFCNT_inc(my_sv_dup((SV*)src_ent-newval, parms));
  }
  }
  
  SvREFCNT_dec(parms.stashes);
  
  return tbl;
  }
  
  #endif
  
  /*
   * need to free the SV values in addition to ptr_table_free
   */
  void modperl_svptr_table_destroy(pTHX_ PTR_TBL_t *tbl)
  {
  UV i;
  PTR_TBL_ENT_t **ary = tbl-tbl_ary;
  
  for (i=0; i  tbl-tbl_max; i++, ary++) {
PTR_TBL_ENT_t *ent;
  
if (!*ary) {
continue;
  }
  
for (ent = *ary; ent; ent = ent-next) {
  if (!ent-newval) {
  continue;
  }
  
  SvREFCNT_dec((SV*)ent-newval);
  ent-newval = NULL;
  }
  }
  
  modperl_svptr_table_free(aTHX_ tbl);
  }
  
  /*
   * the Perl ptr_table_ api does not provide a function to remove
   * an entry from the table.  we need to SvREFCNT_dec the SV value
   * anyhow.
   */
  void modperl_svptr_table_delete(pTHX_ PTR_TBL_t *tbl, void *key)
  {
  PTR_TBL_ENT_t *entry, **oentry;
  UV hash = PTR2UV(key);
  
  oentry = tbl-tbl_ary[hash  tbl-tbl_max];
  entry = *oentry;
  
  for (; entry; oentry = entry-next, entry = *oentry) {
if (entry-oldval == key) {
  *oentry = entry-next;
  SvREFCNT_dec((SV*)entry-newval);
  Safefree(entry);
  tbl-tbl_items--;
return;
}
  }
  }
  
  /*
   * XXX: the following are a copy of the Perl 5.8.0 Perl_ptr_table api
   * renamed s/Perl_ptr/modperl_svptr/g;
   * two reasons:
   *   these functions do not exist without -DUSE_ITHREADS
   *   the clear/free functions do not exist in 5.6.x
   */
  
  /* create a new pointer-mapping table */
  
  PTR_TBL_t *
  modperl_svptr_table_new(pTHX)
  {
  PTR_TBL_t *tbl;
  Newz(0, tbl, 1, PTR_TBL_t);
  tbl-tbl_max  = 511;
  tbl-tbl_items= 0;
  Newz(0, tbl-tbl_ary, tbl-tbl_max + 1, PTR_TBL_ENT_t*);
  return tbl;
  }
  
  /* map an existing pointer using a table */
  
  void *
  modperl_svptr_table_fetch(pTHX_ PTR_TBL_t *tbl, void *sv)
  {
  PTR_TBL_ENT_t *tblent;
  UV hash = PTR2UV

cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-08-27 Thread dougm

dougm   2002/08/27 20:16:31

  Modified:xs/tables/current/Apache FunctionTable.pm
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.40  +2 -2  modperl-2.0/xs/tables/current/Apache/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- FunctionTable.pm  24 Aug 2002 17:14:39 -  1.39
  +++ FunctionTable.pm  28 Aug 2002 03:16:30 -  1.40
   -2,7 +2,7 
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Sat Aug 24 09:38:51 2002
  +# !  Tue Aug 27 20:02:27 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
   -7069,7 +7069,7 
   ]
 },
 {
  -'return_type' = 'void',
  +'return_type' = 'apr_status_t',
   'name' = 'apr_dbm_get_usednames_ex',
   'args' = [
 {
  
  
  
  1.84  +97 -1 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- FunctionTable.pm  28 Aug 2002 02:24:47 -  1.83
  +++ FunctionTable.pm  28 Aug 2002 03:16:31 -  1.84
   -2,7 +2,7 
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Wed Aug 28 10:12:34 2002
  +# !  Tue Aug 27 20:02:39 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
   -3701,6 +3701,20 
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'modperl_svptr_table_clear',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'PTR_TBL_t *',
  +'name' = 'tbl'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'PTR_TBL_t *',
   'name' = 'modperl_svptr_table_clone',
   'args' = [
   -3751,6 +3765,84 
   ]
 },
 {
  +'return_type' = 'void *',
  +'name' = 'modperl_svptr_table_fetch',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'PTR_TBL_t *',
  +'name' = 'tbl'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'sv'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_svptr_table_free',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'PTR_TBL_t *',
  +'name' = 'tbl'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'PTR_TBL_t *',
  +'name' = 'modperl_svptr_table_new',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_svptr_table_split',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'PTR_TBL_t *',
  +'name' = 'tbl'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_svptr_table_store',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'PTR_TBL_t *',
  +'name' = 'tbl'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'oldv'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'newv'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'int',
   'name' = 'modperl_sys_dlclose',
   'args' = [
   -4532,6 +4624,10 
 {
   'return_type' = 'SV *',
   'name' = 'mpxs_Apache__Directive_as_string',
  +'attr' = [
  +  'static',
  +  '__inline__'
  +],
   'args' = [
 {
   'type' = 'PerlInterpreter *',
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.h

2002-08-27 Thread dougm

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 modperl_perl.c modperl_perl.h

2002-08-26 Thread dougm

dougm   2002/08/26 18:46:27

  Modified:src/modules/perl modperl_perl.c modperl_perl.h
  Log:
  modperl_svptr_table api is an add-on to the Perl ptr_table_ api.
  we use a PTR_TBL_t to map config structures (e.g. from parsed
  httpd.conf or .htaccess), where each interpreter needs to have its
  own copy of the Perl SV object.  we do not use an HV* for this, because
  the HV keys must be SVs with a string value, too much overhead.
  we do not use an apr_hash_t because they only have the lifetime of
  the pool used to create them. which may or may not be the same lifetime
  of the objects we need to lookup.
  
  Revision  ChangesPath
  1.15  +123 -0modperl-2.0/src/modules/perl/modperl_perl.c
  
  Index: modperl_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- modperl_perl.c27 May 2002 18:41:52 -  1.14
  +++ modperl_perl.c27 Aug 2002 01:46:27 -  1.15
   -137,3 +137,126 
   }
   #endif
   }
  +
  +/*
  + * modperl_svptr_table api is an add-on to the Perl ptr_table_ api.
  + * we use a PTR_TBL_t to map config structures (e.g. from parsed
  + * httpd.conf or .htaccess), where each interpreter needs to have its
  + * own copy of the Perl SV object.  we do not use an HV* for this, because
  + * the HV keys must be SVs with a string value, too much overhead.
  + * we do not use an apr_hash_t because they only have the lifetime of
  + * the pool used to create them. which may or may not be the same lifetime
  + * of the objects we need to lookup.
  + */
  +
  +#ifdef USE_ITHREADS
  +
  +/*
  + * copy a PTR_TBL_t whos PTR_TBL_ENT_t values are SVs.
  + * the SVs are dup-ed so each interpreter has its own copy.
  + */
  +PTR_TBL_t *modperl_svptr_table_clone(pTHX_ PerlInterpreter *proto_perl,
  + PTR_TBL_t *source)
  +{
  +UV i;
  +PTR_TBL_t *tbl;
  +PTR_TBL_ENT_t **src_ary, **dst_ary;
  +CLONE_PARAMS parms;
  +
  +Newz(0, tbl, 1, PTR_TBL_t);
  +tbl-tbl_max = source-tbl_max;
  +tbl-tbl_items   = source-tbl_items;
  +Newz(0, tbl-tbl_ary, tbl-tbl_max + 1, PTR_TBL_ENT_t *);
  +
  +dst_ary = tbl-tbl_ary;
  +src_ary = source-tbl_ary;
  +
  +Zero(parms, 0, CLONE_PARAMS);
  +parms.flags = 0;
  +parms.stashes = newAV();
  +
  +for (i=0; i  source-tbl_max; i++, dst_ary++, src_ary++) {
  + PTR_TBL_ENT_t *src_ent, *dst_ent=NULL;
  +
  + if (!*src_ary) {
  + continue;
  +}
  +
  + for (src_ent = *src_ary;
  + src_ent;
  + src_ent = src_ent-next)
  +{
  +if (dst_ent == NULL) {
  +Newz(0, dst_ent, 1, PTR_TBL_ENT_t);
  +*dst_ary = dst_ent;
  +}
  +else {
  +Newz(0, dst_ent-next, 1, PTR_TBL_ENT_t);
  +dst_ent = dst_ent-next;
  +}
  +
  +/* key is just a pointer we do not modify, no need to copy */
  +dst_ent-oldval = src_ent-oldval;
  +
  +dst_ent-newval =
  +SvREFCNT_inc(sv_dup((SV*)src_ent-newval, parms));
  +}
  +}
  +
  +SvREFCNT_dec(parms.stashes);
  +
  +return tbl;
  +}
  +
  +/*
  + * need to free the SV values in addition to ptr_table_free
  + */
  +void modperl_svptr_table_destroy(pTHX_ PTR_TBL_t *tbl)
  +{
  +UV i;
  +PTR_TBL_ENT_t **ary = tbl-tbl_ary;
  +
  +for (i=0; i  tbl-tbl_max; i++, ary++) {
  + PTR_TBL_ENT_t *ent;
  +
  + if (!*ary) {
  + continue;
  +}
  +
  + for (ent = *ary; ent; ent = ent-next) {
  +if (!ent-newval) {
  +continue;
  +}
  +
  +SvREFCNT_dec((SV*)ent-newval);
  +ent-newval = NULL;
  +}
  +}
  +
  +ptr_table_free(tbl);
  +}
  +#endif
  +
  +/*
  + * the Perl ptr_table_ api does not provide a function to remove
  + * an entry from the table.  we need to SvREFCNT_dec the SV value
  + * anyhow.
  + */
  +void modperl_svptr_table_delete(pTHX_ PTR_TBL_t *tbl, void *key)
  +{
  +PTR_TBL_ENT_t *entry, **oentry;
  +UV hash = PTR2UV(key);
  +
  +oentry = tbl-tbl_ary[hash  tbl-tbl_max];
  +entry = *oentry;
  +
  +for (; entry; oentry = entry-next, entry = *oentry) {
  + if (entry-oldval == key) {
  +*oentry = entry-next;
  +SvREFCNT_dec((SV*)entry-newval);
  +Safefree(entry);
  +tbl-tbl_items--;
  + return;
  + }
  +}
  +}
  
  
  
  1.8   +11 -0 modperl-2.0/src/modules/perl/modperl_perl.h
  
  Index: modperl_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8

cvs commit: modperl-2.0/src/modules/perl modperl_module.c modperl_module.h

2002-08-26 Thread dougm

dougm   2002/08/26 21:21:20

  Added:   src/modules/perl modperl_module.c modperl_module.h
  Log:
  module to create an apache module on the fly to support directive handlers
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_module.c
  
  Index: modperl_module.c
  ===
  #include mod_perl.h
  
  typedef struct {
  server_rec *server;
  const char *name;
  int namelen;
  } modperl_module_cfg_t;
  
  typedef struct {
  module *modp;
  const char *cmd_data;
  const char *func_name;
  } modperl_module_cmd_data_t;
  
  static modperl_module_cfg_t *modperl_module_cfg_new(apr_pool_t *p)
  {
  modperl_module_cfg_t *cfg =
  (modperl_module_cfg_t *)apr_pcalloc(p, sizeof(*cfg));
  
  return cfg;
  }
  
  static modperl_module_cmd_data_t *modperl_module_cmd_data_new(apr_pool_t *p)
  {
  modperl_module_cmd_data_t *cmd_data =
  (modperl_module_cmd_data_t *)apr_pcalloc(p, sizeof(*cmd_data));
  
  return cmd_data;
  }
  
  static void *modperl_module_config_dir_create(apr_pool_t *p, char *dir)
  {
  return modperl_module_cfg_new(p);
  }
  
  static void *modperl_module_config_srv_create(apr_pool_t *p, server_rec *s)
  {
  return modperl_module_cfg_new(p);
  }
  
  static SV **modperl_module_config_hash_get(pTHX_ int create)
  {
  SV **svp;
  
  /* XXX: could make this lookup faster */
  svp = hv_fetch(PL_modglobal,
 ModPerl::Module::ConfigTable,
 MP_SSTRLEN(ModPerl::Module::ConfigTable),
 create);
  
  return svp;
  }
  
  void modperl_module_config_table_set(pTHX_ PTR_TBL_t *table)
  {
  SV **svp = modperl_module_config_hash_get(aTHX_ TRUE);
  sv_setiv(*svp, (IV)table);
  }
  
  PTR_TBL_t *modperl_module_config_table_get(pTHX_ int create)
  {
  PTR_TBL_t *table = NULL;
  
  SV *sv, **svp = modperl_module_config_hash_get(aTHX_ create);
  
  if (!svp) {
  return NULL;
  }
  
  sv = *svp;
  if (!SvIOK(sv)  create) {
  table = ptr_table_new();
  sv_setiv(sv, (IV)table);
  }
  else {
  table = (PTR_TBL_t *)SvIV(sv);
  }
  
  return table;
  }
  
  typedef struct {
  PerlInterpreter *perl;
  PTR_TBL_t *table;
  void *ptr;
  } config_obj_cleanup_t;
  
  /*
   * any per-dir CREATE or MERGE that happens at request time
   * needs to be removed from the pointer table.
   */
  static apr_status_t modperl_module_config_obj_cleanup(void *data)
  {
  config_obj_cleanup_t *cleanup =
  (config_obj_cleanup_t *)data;
  dTHXa(cleanup-perl);
  
  modperl_svptr_table_delete(aTHX_ cleanup-table, cleanup-ptr);
  
  MP_TRACE_c(MP_FUNC, deleting ptr 0x%lx from table 0x%lx\n,
 (unsigned long)cleanup-ptr,
 (unsigned long)cleanup-table);
  
  return APR_SUCCESS;
  }
  
  static void modperl_module_config_obj_cleanup_register(pTHX_
 apr_pool_t *p,
 PTR_TBL_t *table,
 void *ptr)
  {
  config_obj_cleanup_t *cleanup =
  (config_obj_cleanup_t *)apr_palloc(p, sizeof(*cleanup));
  
  cleanup-table = table;
  cleanup-ptr = ptr;
  #ifdef USE_ITHREADS
  cleanup-perl = aTHX;
  #endif
  
  apr_pool_cleanup_register(p, cleanup,
modperl_module_config_obj_cleanup,
apr_pool_cleanup_null);
  }
  
  static void *modperl_module_config_merge(apr_pool_t *p,
   void *basev, void *addv,
   const char *method)
  {
  GV *gv;
  
  modperl_module_cfg_t *mrg = NULL,
  *base = (modperl_module_cfg_t *)basev,
  *add  = (modperl_module_cfg_t *)addv,
  *tmp = base-server ? base : add;
  
  server_rec *s = tmp-server;
  int is_startup = (p == s-process-pconf);
  
  #ifdef USE_ITHREADS
  modperl_interp_t *interp = modperl_interp_pool_select(p, s);
  dTHXa(interp-perl);
  #endif
  
  PTR_TBL_t *table = modperl_module_config_table_get(aTHX_ TRUE);
  SV *mrg_obj = Nullsv,
  *base_obj = ptr_table_fetch(table, base),
  *add_obj  = ptr_table_fetch(table, add);
  
  HV *stash;
  
  if (!base_obj || (base_obj == add_obj)) {
  return add_obj;
  }
  
  stash = SvSTASH(SvRV(base_obj));
  
  MP_TRACE_c(MP_FUNC, looking for method %s in package `%s'\n, 
 method, SvCLASS(base_obj));
  
  /* XXX: should do this lookup at startup time */
  if ((gv = gv_fetchmethod_autoload(stash, method, FALSE))  isGV(gv)) {
  int count;
  dSP;
  
  mrg = modperl_module_cfg_new(p);
  memcpy(mrg, tmp, sizeof(*mrg

cvs commit: modperl-2.0/lib mod_perl.pm

2002-08-20 Thread dougm

dougm   2002/08/20 09:49:12

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.37  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Changes   20 Aug 2002 16:45:00 -  1.36
  +++ Changes   20 Aug 2002 16:49:11 -  1.37
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.99_06-dev
  +
   =item 1.99_05 - August 20, 2002
   
   fix PerlOptions +ParseHeaders to only parse once per-request
  
  
  
  1.6   +1 -1  modperl-2.0/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/mod_perl.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_perl.pm   21 Jun 2002 22:35:49 -  1.5
  +++ mod_perl.pm   20 Aug 2002 16:49:12 -  1.6
   -4,7 +4,7 
   use strict;
   
   BEGIN {
  -our $VERSION = 1.9905;
  +our $VERSION = 1.9906;
   }
   
   1;
  
  
  



cvs commit: modperl-2.0 Changes

2002-08-19 Thread dougm

dougm   2002/08/19 13:02:24

  Modified:.Changes
  Log:
  updates from post-_04 changes
  
  Revision  ChangesPath
  1.34  +7 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Changes   16 Aug 2002 10:22:39 -  1.33
  +++ Changes   19 Aug 2002 20:02:24 -  1.34
   -40,6 +40,13 
   apr_table_t is now an opaque type, use apr_table_elts() to get the array
   record [Stas Bekman]
   
  +add support for redirects with PerlOptions +ParseHeaders
  +
  +backport to 2.0.35
  +
  +adjust to filter register api change
  +
  +added APR::ThreadMutex module
   
   =item 1.99_04 - June 21, 2002
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_filter.c

2002-08-19 Thread dougm

dougm   2002/08/19 13:07:01

  Modified:.Changes
   src/modules/perl modperl_filter.c
  Log:
  fix PerlOptions +ParseHeaders to only parse once per-request
  
  Revision  ChangesPath
  1.35  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Changes   19 Aug 2002 20:02:24 -  1.34
  +++ Changes   19 Aug 2002 20:07:01 -  1.35
   -10,6 +10,8 
   
   =item 1.99_05-dev
   
  +fix PerlOptions +ParseHeaders to only parse once per-request
  +
   add external redirects Registry tests [Stas Bekman]
   
   get rid of the compat layer in ModPerl-Registry [Stas Bekman]
  
  
  
  1.38  +2 -0  modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- modperl_filter.c  14 Aug 2002 14:54:47 -  1.37
  +++ modperl_filter.c  19 Aug 2002 20:07:01 -  1.38
   -14,6 +14,8 
   const char *bodytext = NULL;
   int status = modperl_cgi_header_parse(r, (char *)buf, bodytext);
   
  +wb-header_parse = 0; /* only once per-request */
  +
   if (status == HTTP_MOVED_TEMPORARILY) {
   return APR_SUCCESS; /* XXX: HTTP_MOVED_TEMPORARILY ? */
   }
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2002-07-10 Thread dougm

dougm   2002/07/10 19:06:11

  Modified:src/modules/perl mod_perl.c
  Log:
  fix for non-ithread perls
  
  Revision  ChangesPath
  1.131 +1 -1  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- mod_perl.c29 Jun 2002 20:38:33 -  1.130
  +++ mod_perl.c11 Jul 2002 02:06:11 -  1.131
   -654,8 +654,8 
   MP_dDCFG;
   GV *h_stdin, *h_stdout;
   int retval;
  -#ifdef USE_ITHREADS
   MP_dRCFG;
  +#ifdef USE_ITHREADS
   pTHX;
   modperl_interp_t *interp;
   #endif
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_sys.c modperl_sys.h

2002-07-07 Thread dougm

dougm   2002/07/07 17:53:16

  Modified:src/modules/perl modperl_sys.c modperl_sys.h
  Log:
  add modperl_sys_is_dir function
  
  Revision  ChangesPath
  1.4   +17 -0 modperl-2.0/src/modules/perl/modperl_sys.c
  
  Index: modperl_sys.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_sys.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- modperl_sys.c 21 Jun 2002 01:32:56 -  1.3
  +++ modperl_sys.c 8 Jul 2002 00:53:15 -   1.4
   -1,4 +1,21 
  +#include modperl_largefiles.h
   #include mod_perl.h
  +
  +/*
  + * Stat_t needs flags in modperl_largefiles.h
  + */
  +int modperl_sys_is_dir(pTHX_ SV *sv)
  +{
  +Stat_t statbuf;
  +STRLEN n_a;
  +char *name = SvPV(sv, n_a);
  +
  +if (PerlLIO_stat(name, statbuf)  0) {
  +return 0;
  +}
  +
  +return S_ISDIR(statbuf.st_mode);
  +}
   
   /*
* Perl does not provide this abstraction.
  
  
  
  1.2   +3 -0  modperl-2.0/src/modules/perl/modperl_sys.h
  
  Index: modperl_sys.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_sys.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_sys.h 21 Jun 2002 00:05:17 -  1.1
  +++ modperl_sys.h 8 Jul 2002 00:53:15 -   1.2
   -6,6 +6,9 
* hopefully won't be much here since Perl/APR/Apache
* take care of most portablity issues.
*/
  +
  +int modperl_sys_is_dir(pTHX_ SV *sv);
  +
   int modperl_sys_dlclose(void *handle);
   
   #endif /* MODPERL_SYS_H */
  
  
  



cvs commit: modperl-2.0/lib/ModPerl Code.pm

2002-06-29 Thread dougm

dougm   2002/06/29 12:43:51

  Modified:lib/ModPerl Code.pm
  Log:
  provide mechanism to #ifdef constants
  add APLOG_TOCLIENT to the list of #ifdef constants
  
  Revision  ChangesPath
  1.84  +20 -2 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.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- Code.pm   21 Jun 2002 00:05:49 -  1.83
  +++ Code.pm   29 Jun 2002 19:43:51 -  1.84
   -718,6 +718,18 
REDIRECT = 'HTTP_MOVED_TEMPORARILY',
   );
   
  +my %ifdef = map { $_, 1 } qw(APLOG_TOCLIENT);
  +
  +sub constants_ifdef {
  +my $name = shift;
  +
  +if ($ifdef{$name}) {
  +return (#ifdef $name\n, #endif /* $name */\n);
  +}
  +
  +(, );
  +}
  +
   sub constants_lookup_code {
   my($h_fh, $c_fh, $constants, $class) = _;
   
   -761,10 +773,13 
   print $c_fh   case '$key':\n;
   
   for my $name ($names) {
  +my ifdef = constants_ifdef($alias{$name});
   print $c_fh EOF;
  +$ifdef[0]
 if (strEQ(name, $name)) {
 return $alias{$name};
 }
  +$ifdef[1]
   EOF
   }
   print $c_fh   break;\n;
   -806,8 +821,11 
push tags, $group;
   my $name = join '_', 'MP_constants', $class, $group;
print $c_fh \nstatic const char *$name [] = { \n,
  -  (map { s/^($constant_prefixes)_?//o;
  - qq(   $_,\n) } $constants),NULL,\n};\n;
  +  (map {
  +  my ifdef = constants_ifdef($_);
  +  s/^($constant_prefixes)_?//o;
  +  qq($ifdef[0]   $_,\n$ifdef[1])
  +  } $constants),NULL,\n};\n;
   }
   
   my %switch;
  
  
  



cvs commit: modperl-2.0 Makefile.PL

2002-06-29 Thread dougm

dougm   2002/06/29 12:44:04

  Modified:.Makefile.PL
  Log:
  now that APLOG_TOCLIENT is #ifdef-ed, allow compilation with 2.0.35
  
  Revision  ChangesPath
  1.87  +1 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- Makefile.PL   23 Jun 2002 21:46:09 -  1.86
  +++ Makefile.PL   29 Jun 2002 19:44:04 -  1.87
   -2,7 +2,7 
   use strict;
   use warnings FATAL = 'all';
   
  -my $min_httpd_version = '2.0.36';
  +my $min_httpd_version = '2.0.35';
   
   my($old_modperl_version, $old_modperl_pm);
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_cgi.c modperl_filter.c modperl_types.h

2002-06-29 Thread dougm

dougm   2002/06/29 13:38:33

  Modified:src/modules/perl mod_perl.c modperl_cgi.c modperl_filter.c
modperl_types.h
  Log:
  add support for redirects with PerlOptions +ParseHeaders
  
  Revision  ChangesPath
  1.130 +7 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- mod_perl.c28 Jun 2002 19:15:51 -  1.129
  +++ mod_perl.c29 Jun 2002 20:38:33 -  1.130
   -709,6 +709,13 
   /* flush output buffer after interpreter is putback */
   modperl_response_finish(r);
   
  +switch (rcfg-status) {
  +  case HTTP_MOVED_TEMPORARILY:
  +/* set by modperl_cgi_header_parse */
  +retval = HTTP_MOVED_TEMPORARILY;
  +break;
  +}
  +
   return retval;
   }
   
  
  
  
  1.2   +33 -0 modperl-2.0/src/modules/perl/modperl_cgi.c
  
  Index: modperl_cgi.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cgi.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_cgi.c 8 May 2001 18:04:36 -   1.1
  +++ modperl_cgi.c 29 Jun 2002 20:38:33 -  1.2
   -5,6 +5,7 
   {
   int status;
   int termarg;
  +const char *location;
   
   if (!buffer) {
   return DECLINED;
   -12,6 +13,38 
   
   status = ap_scan_script_header_err_strs(r, NULL, bodytext,
   termarg, buffer, NULL);
  +
  +/* code below from mod_cgi.c */
  +location = apr_table_get(r-headers_out, Location);
  +
  +if (location  (location[0] == '/')  (r-status == 200)) {
  +r-method = apr_pstrdup(r-pool, GET);
  +r-method_number = M_GET;
  +
  +/* We already read the message body (if any), so don't allow
  + * the redirected request to think it has one.  We can ignore 
  + * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR.
  + */
  +apr_table_unset(r-headers_in, Content-Length);
  +
  +ap_internal_redirect_handler(location, r);
  +
  +return OK;
  +}
  +else if (location  (r-status == 200)) {
  +MP_dRCFG;
  +
  +/* Note that if a script wants to produce its own Redirect
  + * body, it now has to explicitly *say* Status: 302
  + */
  +
  +/* XXX: this is a hack.
  + * filter return value doesn't seem to impact anything.
  + */
  +rcfg-status = HTTP_MOVED_TEMPORARILY;
  +
  +return HTTP_MOVED_TEMPORARILY;
  +}
   
   return status;
   }
  
  
  
  1.36  +4 -1  modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- modperl_filter.c  30 May 2002 02:33:48 -  1.35
  +++ modperl_filter.c  29 Jun 2002 20:38:33 -  1.36
   -14,7 +14,10 
   const char *bodytext = NULL;
   int status = modperl_cgi_header_parse(r, (char *)buf, bodytext);
   
  -if (status != OK) {
  +if (status == HTTP_MOVED_TEMPORARILY) {
  +return APR_SUCCESS; /* XXX: HTTP_MOVED_TEMPORARILY ? */
  +}
  +else if (status != OK) {
   ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO,
0, r-server, %s did not send an HTTP header,
r-uri);
  
  
  
  1.60  +1 -0  modperl-2.0/src/modules/perl/modperl_types.h
  
  Index: modperl_types.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- modperl_types.h   21 Jun 2002 03:02:54 -  1.59
  +++ modperl_types.h   29 Jun 2002 20:38:33 -  1.60
   -205,6 +205,7 
   HV *pnotes;
   SV *global_request_obj;
   U8 flags;
  +int status;
   modperl_wbucket_t *wbucket;
   MpAV *handlers_per_dir[MP_HANDLER_NUM_PER_DIR];
   MpAV *handlers_per_srv[MP_HANDLER_NUM_PER_SRV];
  
  
  



cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-06-23 Thread dougm

dougm   2002/06/23 14:28:15

  Modified:xs/maps  apr_functions.map apr_types.map
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  add APR::ThreadMutex module
  
  Revision  ChangesPath
  1.44  +4 -3  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- apr_functions.map 24 May 2002 17:47:27 -  1.43
  +++ apr_functions.map 23 Jun 2002 21:28:14 -  1.44
   -344,9 +344,10 
   -apr_proc_other_child_check
   -apr_proc_wait_all_procs
   
  -!MODULE=APR::ThreadMutex
  - apr_thread_mutex_create
  - apr_thread_mutex_destroy
  +MODULE=APR::ThreadMutex   PREFIX=apr_thread_mutex_
  + apr_thread_mutex_t *:apr_thread_mutex_create | mpxs_ | \
  + SV *:classname, pool, flags=APR_THREAD_MUTEX_DEFAULT | new
  + void:apr_thread_mutex_destroy | | | apr_thread_mutex_DESTROY
apr_thread_mutex_lock
apr_thread_mutex_trylock
apr_thread_mutex_unlock
  
  
  
  1.19  +1 -1  modperl-2.0/xs/maps/apr_types.map
  
  Index: apr_types.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_types.map,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- apr_types.map 23 May 2002 19:49:49 -  1.18
  +++ apr_types.map 23 Jun 2002 21:28:14 -  1.19
   -100,7 +100,7 
   struct apr_thread_t  | UNDEFINED
   apr_thread_start_t   | UNDEFINED
   struct apr_threadattr_t  | UNDEFINED
  -struct apr_thread_mutex_t| UNDEFINED
  +struct apr_thread_mutex_t| APR::ThreadMutex
   struct apr_thread_once_t | UNDEFINED
   struct apr_thread_cond_t | UNDEFINED
   struct apr_thread_rwlock_t   | UNDEFINED
  
  
  
  1.75  +27 -2 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- FunctionTable.pm  21 Jun 2002 03:04:36 -  1.74
  +++ FunctionTable.pm  23 Jun 2002 21:28:15 -  1.75
   -2,7 +2,7 
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Thu Jun 20 19:51:30 2002
  +# !  Sun Jun 23 13:55:55 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
   -3836,7 +3836,7 
   'name' = 'modperl_trace',
   'args' = [
 {
  -'type' = 'char *',
  +'type' = 'const char *',
   'name' = 'func'
 },
 {
   -5473,6 +5473,31 
 {
   'type' = 'const char *',
   'name' = 'val'
  +  }
  +]
  +  },
  +  {
  +'return_type' = '__inline__',
  +'name' = 'mpxs_apr_thread_mutex_create',
  +'attr' = [
  +  'static'
  +],
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'SV *',
  +'name' = 'classname'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'pool'
  +  },
  +  {
  +'type' = 'unsigned int',
  +'name' = 'flags'
 }
   ]
 },
  
  
  



cvs commit: modperl-2.0/t/response/TestAPR threadmutex.pm

2002-06-23 Thread dougm

dougm   2002/06/23 14:29:18

  Modified:t/apr.cvsignore
  Added:   t/response/TestAPR threadmutex.pm
  Log:
  add tests for APR::ThreadMutex
  
  Revision  ChangesPath
  1.6   +1 -0  modperl-2.0/t/apr/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/apr/.cvsignore,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- .cvsignore22 May 2002 16:30:40 -  1.5
  +++ .cvsignore23 Jun 2002 21:29:18 -  1.6
   -10,3 +10,4 
   util.t
   uuid.t
   os.t
  +threadmutex.t
  
  
  
  1.1  modperl-2.0/t/response/TestAPR/threadmutex.pm
  
  Index: threadmutex.pm
  ===
  package TestAPR::threadmutex;
  
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  use Apache::TestUtil;
  
  use Apache::Const -compile = 'OK';
  use APR::Const -compile = qw(EBUSY SUCCESS);
  
  sub handler {
  my $r = shift;
  
  plan $r, tests = 4, 'APR::ThreadMutex';
  
  require APR::ThreadMutex;
  
  my $mutex = APR::ThreadMutex-new($r-pool);
  
  ok $mutex;
  
  ok t_cmp($mutex-lock, APR::SUCCESS,
   'lock == APR::SUCCESS');
  
  ok t_cmp($mutex-trylock, APR::EBUSY,
   'trylock == APR::EBUSY');
  
  ok t_cmp($mutex-unlock, APR::SUCCESS,
   'unlock == APR::SUCCESS');
  
  Apache::OK;
  }
  
  1;
  
  
  



cvs commit: modperl-2.0/xs/maps apr_functions.map

2002-06-23 Thread dougm

dougm   2002/06/23 15:00:04

  Modified:xs/maps  apr_functions.map
  Log:
  moving ThreadMutex into same area as Global,Proc Mutex
  
  Revision  ChangesPath
  1.45  +9 -9  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- apr_functions.map 23 Jun 2002 21:28:14 -  1.44
  +++ apr_functions.map 23 Jun 2002 22:00:03 -  1.45
   -209,6 +209,15 
apr_global_mutex_trylock
apr_global_mutex_unlock
   
  +MODULE=APR::ThreadMutex   PREFIX=apr_thread_mutex_
  + apr_thread_mutex_t *:apr_thread_mutex_create | mpxs_ | \
  + SV *:classname, pool, flags=APR_THREAD_MUTEX_DEFAULT | new
  + void:apr_thread_mutex_destroy | | | apr_thread_mutex_DESTROY
  + apr_thread_mutex_lock
  + apr_thread_mutex_trylock
  + apr_thread_mutex_unlock
  + apr_thread_mutex_pool_get
  +
   !MODULE=APR::ProcMutex
apr_proc_mutex_child_init
apr_proc_mutex_create
   -343,15 +352,6 
   -apr_proc_other_child_unregister
   -apr_proc_other_child_check
   -apr_proc_wait_all_procs
  -
  -MODULE=APR::ThreadMutex   PREFIX=apr_thread_mutex_
  - apr_thread_mutex_t *:apr_thread_mutex_create | mpxs_ | \
  - SV *:classname, pool, flags=APR_THREAD_MUTEX_DEFAULT | new
  - void:apr_thread_mutex_destroy | | | apr_thread_mutex_DESTROY
  - apr_thread_mutex_lock
  - apr_thread_mutex_trylock
  - apr_thread_mutex_unlock
  - apr_thread_mutex_pool_get
   
   -MODULE=APR::Thread
apr_thread_create
  
  
  



cvs commit: modperl-2.0 Changes

2002-06-21 Thread dougm

dougm   2002/06/21 09:39:44

  Modified:.Changes
  Log:
  update Changes
  
  Revision  ChangesPath
  1.27  +10 -0 modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Changes   17 Jun 2002 20:00:44 -  1.26
  +++ Changes   21 Jun 2002 16:39:44 -  1.27
   -10,6 +10,16 
   
   =item 1.99_04-dev
   
  +various APR PerlIO updates [Stas Bekman]
  +
  +stop using an apr_pool_t to allocate items for the interpreter pool,
  +safer for threaded MPMs and prevents leaks when interpreters are
  +removed from due to PerlInterpMax{Requests,Spare}
  +
  +implement modperl_sys_dlclose() to avoid apr/pool overhead/thread issues
  +
  +get the -DPERL_CORE optimization working again
  +
   PERL_SET_CONTEXT to the parent interpreter when cloning interpreters at
   request time, else dTHX might be NULL during clone in the given thread,
   which would crash the server.
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_log.c modperl_log.h

2002-06-21 Thread dougm

dougm   2002/06/21 13:30:27

  Modified:src/modules/perl modperl_log.c modperl_log.h
  Log:
  modperl_trace needs to use const for the function name (gcc3.1 warns)
  
  Revision  ChangesPath
  1.7   +1 -1  modperl-2.0/src/modules/perl/modperl_log.c
  
  Index: modperl_log.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_log.c 12 May 2002 23:01:32 -  1.6
  +++ modperl_log.c 21 Jun 2002 20:30:27 -  1.7
   -19,7 +19,7 
   return debug_level;  
   }
   
  -void modperl_trace(char *func, const char *fmt, ...)
  +void modperl_trace(const char *func, const char *fmt, ...)
   {
   char vstr[8192];
   apr_size_t vstr_len = 0;
  
  
  
  1.9   +1 -1  modperl-2.0/src/modules/perl/modperl_log.h
  
  Index: modperl_log.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_log.h 12 May 2002 23:01:32 -  1.8
  +++ modperl_log.h 21 Jun 2002 20:30:27 -  1.9
   -34,7 +34,7 
   extern unsigned long MP_debug_level;
   #endif
   
  -void modperl_trace(char *func, const char *fmt, ...);
  +void modperl_trace(const char *func, const char *fmt, ...);
   
   void modperl_trace_level_set(server_rec *s, const char *level);
   
  
  
  



cvs commit: modperl-2.0/lib mod_perl.pm

2002-06-21 Thread dougm

dougm   2002/06/21 15:35:49

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.29  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Changes   21 Jun 2002 22:25:48 -  1.28
  +++ Changes   21 Jun 2002 22:35:49 -  1.29
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.99_05-dev
  +
   =item 1.99_04 - June 21, 2002
   
   various APR PerlIO updates [Stas Bekman]
  
  
  
  1.5   +1 -1  modperl-2.0/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/mod_perl.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_perl.pm   16 Jun 2002 00:02:58 -  1.4
  +++ mod_perl.pm   21 Jun 2002 22:35:49 -  1.5
   -4,7 +4,7 
   use strict;
   
   BEGIN {
  -our $VERSION = 1.9904;
  +our $VERSION = 1.9905;
   }
   
   1;
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_sys.c modperl_sys.h

2002-06-20 Thread dougm

dougm   2002/06/20 17:05:17

  Added:   src/modules/perl modperl_sys.c modperl_sys.h
  Log:
  rolling our own modperl_sys_dlclose() to avoid apr/pool overhead/thread issues
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_sys.c
  
  Index: modperl_sys.c
  ===
  #include mod_perl.h
  
  /*
   * Perl does not provide this abstraction.
   * APR does, but requires a pool.  efforts to expose this area of apr
   * failed.  so we roll our own.  *sigh*
   */
  int modperl_sys_dlclose(void *handle)
  {
  #if defined(MP_SYS_DL_DLOPEN)
  #ifdef I_DLFCN
  #include dlfcn.h
  #else
  #include nlist.h
  #include link.h
  #endif
  return dlclose(handle) == 0;
  #elif defined(MP_SYS_DL_DYLD)
  return NSUnlinkModule(handle, FALSE);
  #elif defined(MP_SYS_DL_HPUX)
  shl_unload((shl_t)handle);
  return 1;
  #elif defined(MP_SYS_DL_WIN32)
  return FreeLibrary(handle);
  #elif defined(MP_SYS_DL_BEOS)
  return unload_add_on(handle)  B_NO_ERROR;
  #elif defined(MP_SYS_DL_DLLLOAD)
  return dllfree(handle) == 0;
  #elif defined(MP_SYS_DL_AIX)
  return dlclose(handle) == 0;
  #else
  #error modperl_sys_dlclose not defined on this platform
  return 0;
  #endif
  }
  
  
  
  1.1  modperl-2.0/src/modules/perl/modperl_sys.h
  
  Index: modperl_sys.h
  ===
  #ifndef MODPERL_SYS_H
  #define MODPERL_SYS_H
  
  /*
   * system specific type stuff.
   * hopefully won't be much here since Perl/APR/Apache
   * take care of most portablity issues.
   */
  int modperl_sys_dlclose(void *handle);
  
  #endif /* MODPERL_SYS_H */
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.h

2002-06-20 Thread dougm

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/xs/tables/current/ModPerl FunctionTable.pm

2002-06-20 Thread dougm

dougm   2002/06/20 17:07:25

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.73  +11 -1 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- FunctionTable.pm  16 Jun 2002 01:09:18 -  1.72
  +++ FunctionTable.pm  21 Jun 2002 00:07:24 -  1.73
   -2,7 +2,7 
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Sat Jun 15 17:57:19 2002
  +# !  Thu Jun 20 16:54:53 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
   -3581,6 +3581,16 
 {
   'type' = 'SV *',
   'name' = 'sv'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'int',
  +'name' = 'modperl_sys_dlclose',
  +'args' = [
  +  {
  +'type' = 'void *',
  +'name' = 'handle'
 }
   ]
 },
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_interp.c modperl_util.c modperl_util.h

2002-06-20 Thread dougm

dougm   2002/06/20 17:44:24

  Modified:src/modules/perl mod_perl.c modperl_interp.c modperl_util.c
modperl_util.h
  Log:
  use our own modperl_sys_dlclose instead of apr_dso_unload which
  requires us to create our own pool.
  
  Revision  ChangesPath
  1.127 +3 -5  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- mod_perl.c16 Jun 2002 01:07:37 -  1.126
  +++ mod_perl.c21 Jun 2002 00:44:24 -  1.127
   -5,18 +5,16 
   {
   modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
   PerlInterpreter *perl = (PerlInterpreter *)cdata-data;
  -apr_array_header_t *handles;
  +void **handles;
   
  -handles = modperl_xs_dl_handles_get(aTHX_ cdata-pool);
  +handles = modperl_xs_dl_handles_get(aTHX);
   
   MP_TRACE_i(MP_FUNC, destroying interpreter=0x%lx\n,
  (unsigned long)perl);
   
   modperl_perl_destruct(perl);
   
  -if (handles) {
  -modperl_xs_dl_handles_close(cdata-pool, handles);
  -}
  +modperl_xs_dl_handles_close(handles);
   
   modperl_env_unload();
   
  
  
  
  1.47  +3 -14 modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- modperl_interp.c  17 Jun 2002 20:00:44 -  1.46
  +++ modperl_interp.c  21 Jun 2002 00:44:24 -  1.47
   -80,8 +80,7 
   
   void modperl_interp_destroy(modperl_interp_t *interp)
   {
  -apr_pool_t *p = NULL;
  -apr_array_header_t *handles;
  +void **handles;
   dTHXa(interp-perl);
   
   PERL_SET_CONTEXT(interp-perl);
   -93,21 +92,11 
   MP_TRACE_i(MP_FUNC, *error - still in use!*\n);
   }
   
  -/* we cant use interp-mip-ap_pool without locking
  - * apr_pool_create() will mutex lock for us
  - * XXX: could roll something without using apr_pool_t
  - * to avoid locking
  - */
  -(void)apr_pool_create(p, NULL);
  -handles = modperl_xs_dl_handles_get(aTHX_ p);
  +handles = modperl_xs_dl_handles_get(aTHX);
   
   modperl_perl_destruct(interp-perl);
   
  -if (handles) {
  -modperl_xs_dl_handles_close(p, handles);
  -}
  -
  -apr_pool_destroy(p);
  +modperl_xs_dl_handles_close(handles);
   }
   
   apr_status_t modperl_interp_cleanup(void *data)
  
  
  
  1.47  +12 -13modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- modperl_util.c19 Jun 2002 05:18:04 -  1.46
  +++ modperl_util.c21 Jun 2002 00:44:24 -  1.47
   -300,12 +300,12 
   }
   }
   
  -apr_array_header_t *modperl_xs_dl_handles_get(pTHX_ apr_pool_t *p)
  +void **modperl_xs_dl_handles_get(pTHX)
   {
   I32 i;
   AV *librefs = get_av(dl_librefs, FALSE);
   AV *modules = get_av(dl_modules, FALSE);
  -apr_array_header_t *handles;
  +void **handles;
   
   if (!librefs) {
MP_TRACE_g(MP_FUNC,
   -319,7 +319,7 
   return NULL;
   }
   
  -handles = apr_array_make(p, AvFILL(librefs)-1, sizeof(void *));
  +handles = (void **)malloc(sizeof(void *) * (AvFILL(librefs)+2));
   
   for (i=0; i=AvFILL(librefs); i++) {
void *handle;
   -337,17 +337,19 
MP_TRACE_g(MP_FUNC, %s dl handle == 0x%lx\n,
  SvPVX(module_sv), (unsigned long)handle);
if (handle) {
  - *(void **)apr_array_push(handles) = handle;
  + handles[i] = handle;
}
   }
   
   av_clear(modules);
   av_clear(librefs);
   
  +handles[i] = (void *)0;
  +
   return handles;
   }
   
  -void modperl_xs_dl_handles_close(apr_pool_t *p, apr_array_header_t *handles)
  +void modperl_xs_dl_handles_close(void **handles)
   {
   int i;
   
   -355,15 +357,12 
return;
   }
   
  -for (i=0; i  handles-nelts; i++) {
  -apr_dso_handle_t *dso = NULL;
  -void *handle = ((void **)handles-elts)[i];
  -
  -MP_TRACE_g(MP_FUNC, close 0x%lx\n, (unsigned long)handle);
  -
  -apr_os_dso_handle_put(dso, (apr_os_dso_handle_t )handle, p);
  -apr_dso_unload(dso);
  +for (i=0; handles[i]; i++) {
  +MP_TRACE_g(MP_FUNC, close 0x%lx\n, (unsigned long)handles[i]);
  +modperl_sys_dlclose(handles[i]);
   }
  +
  +free(handles);
   }
   
   modperl_cleanup_data_t

cvs commit: modperl-2.0/src/modules/perl modperl_sys.c

2002-06-20 Thread dougm

dougm   2002/06/20 18:32:56

  Modified:src/modules/perl modperl_sys.c
  Log:
  hpux fix
  
  Revision  ChangesPath
  1.3   +1 -0  modperl-2.0/src/modules/perl/modperl_sys.c
  
  Index: modperl_sys.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_sys.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_sys.c 21 Jun 2002 00:48:01 -  1.2
  +++ modperl_sys.c 21 Jun 2002 01:32:56 -  1.3
   -18,6 +18,7 
   #elif defined(MP_SYS_DL_DYLD)
   return NSUnLinkModule(handle, FALSE);
   #elif defined(MP_SYS_DL_HPUX)
  +#include dl.h
   shl_unload((shl_t)handle);
   return 1;
   #elif defined(MP_SYS_DL_WIN32)
  
  
  



cvs commit: modperl-2.0/xs/APR/PerlIO apr_perlio.c

2002-06-20 Thread dougm

dougm   2002/06/20 19:06:48

  Modified:xs/APR/PerlIO apr_perlio.c
  Log:
  bleedperl now has a binmode PerlIO function
  
  Revision  ChangesPath
  1.15  +1 -0  modperl-2.0/xs/APR/PerlIO/apr_perlio.c
  
  Index: apr_perlio.c
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- apr_perlio.c  31 May 2002 15:41:40 -  1.14
  +++ apr_perlio.c  21 Jun 2002 02:06:48 -  1.15
   -321,6 +321,7 
   PerlIOBase_pushed,
   PerlIOAPR_popped,
   PerlIOAPR_open,
  +NULL,   /* XXX: binmode? */
   NULL,  /* no getarg needed */
   PerlIOAPR_fileno,
   PerlIOAPR_dup,
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_interp.c modperl_interp.h modperl_tipool.c modperl_tipool.h modperl_types.h

2002-06-20 Thread dougm

dougm   2002/06/20 20:02:54

  Modified:src/modules/perl modperl_interp.c modperl_interp.h
modperl_tipool.c modperl_tipool.h modperl_types.h
  Log:
  stop using an apr_pool_t to allocate items for the interpreter pool:
  -even though we lock, the pool is read by modules other than mod_perl
  -when a PerlInterpreter is released to to PerlInterp{MaxRequests,MinSpare}
  the pool item allocation leaks because the server pool is not
  cleared until restart
  
  Revision  ChangesPath
  1.48  +9 -7  modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- modperl_interp.c  21 Jun 2002 00:44:24 -  1.47
  +++ modperl_interp.c  21 Jun 2002 03:02:54 -  1.48
   -35,14 +35,15 
   modperl_xs_dl_handles_clear(aTHX);
   }
   
  -modperl_interp_t *modperl_interp_new(apr_pool_t *p,
  - modperl_interp_pool_t *mip,
  +modperl_interp_t *modperl_interp_new(modperl_interp_pool_t *mip,
PerlInterpreter *perl)
   {
   UV clone_flags = 0;
   modperl_interp_t *interp = 
  -(modperl_interp_t *)apr_pcalloc(p, sizeof(*interp));
  -
  +(modperl_interp_t *)malloc(sizeof(*interp));
  +
  +memset(interp, '\0', sizeof(*interp));
  +
   interp-mip = mip;
   interp-refcnt = 0; /* for use by APR::Pool-cleanup_register */
   
   -97,6 +98,8 
   modperl_perl_destruct(interp-perl);
   
   modperl_xs_dl_handles_close(handles);
  +
  +free(interp);
   }
   
   apr_status_t modperl_interp_cleanup(void *data)
   -162,7 +165,7 
   {
   modperl_interp_pool_t *mip = (modperl_interp_pool_t *)data;
   MP_TRACE_i(MP_FUNC, adding new interpreter to the pool\n);
  -return (void *)modperl_interp_new(mip-ap_pool, mip, mip-parent-perl);
  +return (void *)modperl_interp_new(mip, mip-parent-perl);
   }
   
   static void interp_pool_shrink(modperl_tipool_t *tipool, void *data,
   -206,9 +209,8 
  interp_pool_func, mip);
   
   mip-tipool = tipool;
  -mip-ap_pool = p;
   mip-server  = s;
  -mip-parent = modperl_interp_new(p, mip, NULL);
  +mip-parent = modperl_interp_new(mip, NULL);
   aTHX = mip-parent-perl = perl;
   
   /* this happens post-config in mod_perl.c:modperl_init_clones() */
  
  
  
  1.16  +1 -2  modperl-2.0/src/modules/perl/modperl_interp.h
  
  Index: modperl_interp.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- modperl_interp.h  13 Jun 2002 02:59:05 -  1.15
  +++ modperl_interp.h  21 Jun 2002 03:02:54 -  1.16
   -23,8 +23,7 
   
   void modperl_interp_clone_init(modperl_interp_t *interp);
   
  -modperl_interp_t *modperl_interp_new(apr_pool_t *p,
  - modperl_interp_pool_t *mip,
  +modperl_interp_t *modperl_interp_new(modperl_interp_pool_t *mip,
PerlInterpreter *perl);
   
   void modperl_interp_destroy(modperl_interp_t *interp);
  
  
  
  1.8   +6 -4  modperl-2.0/src/modules/perl/modperl_tipool.c
  
  Index: modperl_tipool.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_tipool.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_tipool.c  8 Mar 2002 02:48:01 -   1.7
  +++ modperl_tipool.c  21 Jun 2002 03:02:54 -  1.8
   -15,10 +15,11 
* this is another proof-of-concept, plenty of room for improvement here
*/
   
  -modperl_list_t *modperl_list_new(apr_pool_t *p)
  +modperl_list_t *modperl_list_new()
   {
   modperl_list_t *listp = 
  -(modperl_list_t *)apr_pcalloc(p, sizeof(*listp));
  +(modperl_list_t *)malloc(sizeof(*listp));
  +memset(listp, '\0', sizeof(*listp));
   return listp;
   }
   
   -151,7 +152,6 
   modperl_tipool_t *tipool =
   (modperl_tipool_t *)apr_pcalloc(p, sizeof(*tipool));
   
  -tipool-ap_pool = p;
   tipool-cfg = cfg;
   tipool-func = func;
   tipool-data = data;
   -201,7 +201,7 
   
   void modperl_tipool_add(modperl_tipool_t *tipool, void *data)
   {
  -modperl_list_t *listp = modperl_list_new(tipool-ap_pool);
  +modperl_list_t *listp = modperl_list_new();
   
   listp-data = data;
   
   -339,6 +339,8 
   (*tipool-func-tipool_destroy)(tipool, tipool-data,
   listp-data);
   }
  +
  +free(listp); /* gone for good */
   
   if (max_requests

cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-06-20 Thread dougm

dougm   2002/06/20 20:04:36

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.74  +4 -21 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- FunctionTable.pm  21 Jun 2002 00:07:24 -  1.73
  +++ FunctionTable.pm  21 Jun 2002 03:04:36 -  1.74
   -2,7 +2,7 
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Thu Jun 20 16:54:53 2002
  +# !  Thu Jun 20 19:51:30 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
   -2275,10 +2275,6 
   'name' = 'modperl_interp_new',
   'args' = [
 {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
  -  },
  -  {
   'type' = 'modperl_interp_pool_t *',
   'name' = 'mip'
 },
   -2470,12 +2466,7 
 {
   'return_type' = 'modperl_list_t *',
   'name' = 'modperl_list_new',
  -'args' = [
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
  -  }
  -]
  +'args' = []
 },
 {
   'return_type' = 'modperl_list_t *',
   -3975,26 +3966,18 
   'name' = 'modperl_xs_dl_handles_close',
   'args' = [
 {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
  -  },
  -  {
  -'type' = 'apr_array_header_t *',
  +'type' = 'void **',
   'name' = 'handles'
 }
   ]
 },
 {
  -'return_type' = 'apr_array_header_t *',
  +'return_type' = 'void **',
   'name' = 'modperl_xs_dl_handles_get',
   'args' = [
 {
   'type' = 'PerlInterpreter *',
   'name' = 'my_perl'
  -  },
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
 }
   ]
 },
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_interp.c

2002-06-20 Thread dougm

dougm   2002/06/20 20:46:46

  Modified:src/modules/perl modperl_interp.c
  Log:
  cannot dereference mip-parent after it has been free-d
  
  Revision  ChangesPath
  1.49  +0 -2  modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- modperl_interp.c  21 Jun 2002 03:02:54 -  1.48
  +++ modperl_interp.c  21 Jun 2002 03:46:46 -  1.49
   -152,8 +152,6 
   modperl_interp_destroy(mip-parent);
   }
   
  -mip-parent-perl = NULL;
  -
   modperl_env_unload();
   
   modperl_perl_pp_unset_all();
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_interp.c

2002-06-20 Thread dougm

dougm   2002/06/20 21:16:51

  Modified:src/modules/perl mod_perl.c modperl_interp.c
  Log:
  move modperl_pp_{set,unset}_all and modperl_init_{init,unload} to
  modperl_sys_{init,term} functions that only happen once per-parent
  process
  
  Revision  ChangesPath
  1.128 +16 -5 modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- mod_perl.c21 Jun 2002 00:44:24 -  1.127
  +++ mod_perl.c21 Jun 2002 04:16:51 -  1.128
   -202,10 +202,6 
   return;
   }
   
  -modperl_perl_pp_set_all();
  -
  -modperl_env_init();
  -
   base_perl = modperl_startup(base_server, p);
   
   #ifdef USE_ITHREADS
   -330,6 +326,10 
   modperl_tls_create_request_rec(pconf);
   }
   
  +/*
  + * modperl_sys_{init,term} are things that happen
  + * once per-parent process, not per-interpreter
  + */
   static apr_status_t modperl_sys_init(void)
   {
   #if 0 /*XXX*/
   -345,11 +345,22 
   }
   #endif
   #endif
  +
  +/* modifies PL_ppaddr */
  +modperl_perl_pp_set_all();
  +
  +/* modifies PL_vtbl_env{elem} */
  +modperl_env_init();
  +
   return APR_SUCCESS;
   }
   
   static apr_status_t modperl_sys_term(void *data)
   {
  +modperl_env_unload();
  +
  +modperl_perl_pp_unset_all();
  +
   #if 0 /*XXX*/
   PERL_SYS_TERM();
   #endif
   -362,7 +373,7 
   apr_pool_create(server_pool, pconf);
   
   modperl_sys_init();
  -apr_pool_cleanup_register(server_pool, NULL,
  +apr_pool_cleanup_register(pconf, NULL,
 modperl_sys_term, apr_pool_cleanup_null);
   modperl_init_globals(s, pconf);
   modperl_init(s, pconf);
  
  
  
  1.50  +0 -4  modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- modperl_interp.c  21 Jun 2002 03:46:46 -  1.49
  +++ modperl_interp.c  21 Jun 2002 04:16:51 -  1.50
   -152,10 +152,6 
   modperl_interp_destroy(mip-parent);
   }
   
  -modperl_env_unload();
  -
  -modperl_perl_pp_unset_all();
  -
   return APR_SUCCESS;
   }
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-18 Thread dougm

dougm   2002/06/18 18:26:28

  Modified:lib/Apache Build.pm
  Log:
  need to check ccflags rather than optimize for -DDEBUGGING
  
  Revision  ChangesPath
  1.100 +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- Build.pm  17 Jun 2002 19:42:49 -  1.99
  +++ Build.pm  19 Jun 2002 01:26:28 -  1.100
   -285,7 +285,7 
   $val ||= $Config{optimize};
   
   if ($self-{MP_DEBUG}) {
  -return ' ' unless $val =~ /-DDEBUGGING/;
  +return ' ' unless $Config{ccflags} =~ /-DDEBUGGING/;
   }
   
   $val;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-18 Thread dougm

dougm   2002/06/18 18:32:58

  Modified:lib/Apache Build.pm
  Log:
  only win32 has -DDEBUGGING in both optimize and ccflags
  
  Revision  ChangesPath
  1.101 +2 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- Build.pm  19 Jun 2002 01:26:28 -  1.100
  +++ Build.pm  19 Jun 2002 01:32:58 -  1.101
   -252,7 +252,8 
   $fixup-(\$cflags);
   }
   
  -if ($self-{MP_DEBUG}) {
  +if (WIN32 and $self-{MP_DEBUG}) {
  +#only win32 has -DDEBUGGING in both optimize and ccflags
   my $optim = $Config{optimize};
   
   unless ($optim =~ /-DDEBUGGING/) {
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_perl_includes.h modperl_util.c

2002-06-18 Thread dougm

dougm   2002/06/18 19:02:24

  Modified:src/modules/perl modperl_perl_includes.h modperl_util.c
  Log:
  use mg_find to look for ~ magic in modperl_xs_sv2request_rec as there may be other 
magic in the chain
  
  Revision  ChangesPath
  1.15  +4 -0  modperl-2.0/src/modules/perl/modperl_perl_includes.h
  
  Index: modperl_perl_includes.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_includes.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- modperl_perl_includes.h   31 May 2002 01:06:39 -  1.14
  +++ modperl_perl_includes.h   19 Jun 2002 02:02:24 -  1.15
   -67,6 +67,10 
   #   define PERL_MAGIC_tied 'P'
   #endif
   
  +#ifndef PERL_MAGIC_ext
  +#   define PERL_MAGIC_ext '~'
  +#endif
  +
   #if defined(__APPLE__)  !defined(PERL_CORE)  !defined(environ)
   #   include crt_externs.h
   #   define environ (*_NSGetEnviron())
  
  
  
  1.45  +2 -2  modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- modperl_util.c31 May 2002 01:06:39 -  1.44
  +++ modperl_util.c19 Jun 2002 02:02:24 -  1.45
   -120,8 +120,8 
   return r;
   }
   
  -if ((mg = SvMAGIC(sv))) {
  -return MgTypeExt(mg) ? (request_rec *)mg-mg_ptr : NULL;
  +if ((mg = mg_find(sv, PERL_MAGIC_ext))) {
  +return (request_rec *)mg-mg_ptr;
   }
   else {
   if (classname  !sv_derived_from(in, classname)) {
  
  
  



cvs commit: modperl-2.0/xs/Apache/Log Apache__Log.h

2002-06-18 Thread dougm

dougm   2002/06/18 22:18:04

  Modified:lib/ModPerl WrapXS.pm
   src/modules/perl mod_perl.h modperl_perl_includes.h
modperl_util.c modperl_util.h
   xs/Apache/Log Apache__Log.h
  Log:
  get the -DPERL_CORE optimization working again
  
  Revision  ChangesPath
  1.47  +1 -1  modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- WrapXS.pm 11 Jun 2002 16:27:57 -  1.46
  +++ WrapXS.pm 19 Jun 2002 05:18:04 -  1.47
   -397,7 +397,7 
   my $str = ;
   
   if (my $boot = $self-typemap-{function_map}-{boot}-{$module}) {
  -$str = 'mpxs_' . $self-cname($module) . _BOOT(aTHXo);\n;
  +$str = 'mpxs_' . $self-cname($module) . _BOOT(aTHX);\n;
   }
   
   $str;
  
  
  
  1.47  +1 -1  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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- mod_perl.h16 Jun 2002 01:07:37 -  1.46
  +++ mod_perl.h19 Jun 2002 05:18:04 -  1.47
   -75,7 +75,7 
   apr_pool_t *modperl_server_pool(void);
   PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p);
   int modperl_perl_destruct_level(void);
  -void xs_init(pTHXo);
  +void xs_init(pTHX);
   
   void modperl_response_init(request_rec *r);
   void modperl_response_finish(request_rec *r);
  
  
  
  1.16  +2 -0  modperl-2.0/src/modules/perl/modperl_perl_includes.h
  
  Index: modperl_perl_includes.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_includes.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- modperl_perl_includes.h   19 Jun 2002 02:02:24 -  1.15
  +++ modperl_perl_includes.h   19 Jun 2002 05:18:04 -  1.16
   -9,6 +9,8 
   
   #define PERLIO_NOT_STDIO 0
   
  +#include config.h
  +
   /*
* sizeof(struct PerlInterpreter) changes #ifdef USE_LARGE_FILES
* apache-2.0 cannot be compiled with lfs because of sendfile.h
  
  
  
  1.46  +1 -1  modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- modperl_util.c19 Jun 2002 02:02:24 -  1.45
  +++ modperl_util.c19 Jun 2002 05:18:04 -  1.46
   -292,7 +292,7 
   #define dl_librefs DynaLoader::dl_librefs
   #define dl_modules DynaLoader::dl_modules
   
  -void modperl_xs_dl_handles_clear(pTHXo)
  +void modperl_xs_dl_handles_clear(pTHX)
   {
   AV *librefs = get_av(dl_librefs, FALSE);
   if (librefs) {
  
  
  
  1.34  +1 -1  modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- modperl_util.h23 May 2002 22:18:47 -  1.33
  +++ modperl_util.h19 Jun 2002 05:18:04 -  1.34
   -73,7 +73,7 
   
   char *modperl_server_desc(server_rec *s, apr_pool_t *p);
   
  -void modperl_xs_dl_handles_clear(pTHXo);
  +void modperl_xs_dl_handles_clear(pTHX);
   
   apr_array_header_t *modperl_xs_dl_handles_get(pTHX_ apr_pool_t *p);
   
  
  
  
  1.10  +1 -1  modperl-2.0/xs/Apache/Log/Apache__Log.h
  
  Index: Apache__Log.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Log/Apache__Log.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Apache__Log.h 26 Mar 2002 03:37:47 -  1.9
  +++ Apache__Log.h 19 Jun 2002 05:18:04 -  1.10
   -1,4 +1,4 
  -static void mpxs_Apache__Log_BOOT(pTHXo)
  +static void mpxs_Apache__Log_BOOT(pTHX)
   {
   av_push(get_av(Apache::Log::Request::ISA,TRUE), 
   newSVpv(Apache::Log,11));
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 10:26:29

  Modified:lib/Apache Build.pm
  Log:
  remove -undefined suppress from ldflags on darwin (should never be there)
  
  Revision  ChangesPath
  1.97  +7 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- Build.pm  30 May 2002 06:00:49 -  1.96
  +++ Build.pm  15 Jun 2002 17:26:29 -  1.97
   -170,7 +170,13 
   my $config = tied %Config;
   my $ldflags = $config-{ldflags};
   
  -$config-{ldflags} = '' if WIN32; #same as lddlflags
  +if (WIN32) {
  +$config-{ldflags} = ''; #same as lddlflags
  +}
  +elsif (DARWIN) {
  +#not sure how this can happen, but it shouldn't
  +$config-{ldflags} =~ s/-undefined suppress//;
  +}
   
   my $ldopts = ExtUtils::Embed::ldopts();
   chomp $ldopts;
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2002-06-15 Thread dougm

dougm   2002/06/15 13:59:06

  Modified:src/modules/perl mod_perl.c
  Log:
  fix modperl_boot prototype
  
  Revision  ChangesPath
  1.125 +1 -2  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- mod_perl.c12 Jun 2002 21:13:10 -  1.124
  +++ mod_perl.c15 Jun 2002 20:59:06 -  1.125
   -95,11 +95,10 
   
   #endif /* MP_REFGEN_FIXUP */
   
  -static void modperl_boot(void *data)
  +static void modperl_boot(pTHX_ void *data)
   {
   MP_dBOOT_DATA;
   MP_dSCFG(s);
  -dTHX; /* XXX: not too worried since this only happens at startup */
   int i;
   
   #ifdef MP_REFGEN_FIXUP
  
  
  



cvs commit: modperl-2.0/lib/ModPerl Manifest.pm

2002-06-15 Thread dougm

dougm   2002/06/15 16:36:52

  Modified:lib/ModPerl Manifest.pm
  Log:
  include TestAPR::util in the dist as it is already skipping the 
apr_generate_random_bytes test
  
  Revision  ChangesPath
  1.4   +0 -2  modperl-2.0/lib/ModPerl/Manifest.pm
  
  Index: Manifest.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Manifest.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Manifest.pm   7 Apr 2002 00:49:38 -   1.3
  +++ Manifest.pm   15 Jun 2002 23:36:52 -  1.4
   -90,5 +90,3 
   patches/
   #very few will have Chatbot::Eliza installed
   eliza
  -#apr_generate_random_bytes does not currently work on all platforms
  -TestAPR/util.pm
  
  
  



cvs commit: modperl-2.0/t/response/TestAPR perlio.pm

2002-06-15 Thread dougm

dougm   2002/06/15 16:48:58

  Modified:t/response/TestAPR perlio.pm
  Log:
  disabling tests until perlio issues are sorted out
  
  Revision  ChangesPath
  1.10  +3 -3  modperl-2.0/t/response/TestAPR/perlio.pm
  
  Index: perlio.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- perlio.pm 15 Jun 2002 19:08:21 -  1.9
  +++ perlio.pm 15 Jun 2002 23:48:58 -  1.10
   -22,12 +22,12 
   return Apache::OK;
   }
   
  -my $tests = 11;
  +my $tests = 2; #XXX 11;
   my $lfs_tests = 3;
   
   #$tests += $lfs_tests if USE_LARGE_FILES; #XXX
   
  -plan $r, tests = $tests, todo = [5,8], have_perl 'iolayers';
  +plan $r, tests = $tests, have_perl 'iolayers';
   
   my $vars = Apache::Test::config()-{vars};
   my $dir  = catfile $vars-{documentroot}, perlio;
   -66,7 +66,7 
expected failure);
   }
   }
  -
  +return Apache::OK; #XXX remove when perlio issues are sorted out
   # seek/tell() tests
   #XXX: feel free to enable if largefile support is not enabled in Perl
   if (0) {
  
  
  



cvs commit: modperl-2.0 Changes

2002-06-15 Thread dougm

dougm   2002/06/15 16:56:20

  Modified:.Changes
  Log:
  _03 release
  
  Revision  ChangesPath
  1.24  +1 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Changes   15 Jun 2002 02:09:26 -  1.23
  +++ Changes   15 Jun 2002 23:56:20 -  1.24
   -8,7 +8,7 
   
   =over 3
   
  -=item 1.99_03-dev
  +=item 1.99_03 - June 15, 2002
   
   win32 fix for the global Apache-request object to make sure it uses
   the thread local storage mechanism
  
  
  



cvs commit: modperl-2.0/lib mod_perl.pm

2002-06-15 Thread dougm

dougm   2002/06/15 17:02:58

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.25  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Changes   15 Jun 2002 23:56:20 -  1.24
  +++ Changes   16 Jun 2002 00:02:57 -  1.25
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.99_04-dev
  +
   =item 1.99_03 - June 15, 2002
   
   win32 fix for the global Apache-request object to make sure it uses
  
  
  
  1.4   +1 -1  modperl-2.0/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/mod_perl.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_perl.pm   2 Jun 2002 03:25:53 -   1.3
  +++ mod_perl.pm   16 Jun 2002 00:02:58 -  1.4
   -4,7 +4,7 
   use strict;
   
   BEGIN {
  -our $VERSION = 1.9903;
  +our $VERSION = 1.9904;
   }
   
   1;
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_perl_pp.c modperl_perl_pp.h

2002-06-15 Thread dougm

dougm   2002/06/15 18:07:21

  Added:   src/modules/perl modperl_perl_pp.c modperl_perl_pp.h
  Log:
  new module where any PL_ppaddr modifications are done
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_perl_pp.c
  
  Index: modperl_perl_pp.c
  ===
  #include mod_perl.h
  
  static enum opcode MP_pp_map[] = {
  #ifdef MP_REFGEN_FIXUP
  OP_SREFGEN,
  #endif
  };
  
  typedef OP * MP_FUNC_T(modperl_pp_t)(pTHX);
  
  static modperl_pp_t MP_PERL_ppaddr[MP_OP_max];
  
  #ifdef MP_REFGEN_FIXUP
  
  /*
   * nasty workaround for bug fixed in bleedperl (11536 + 11553)
   * XXX: when 5.8.0 is released + stable, we will require 5.8.0
   * if ithreads are enabled.
   */
  
  static OP *modperl_pp_srefgen(pTHX)
  {
  dSP;
  OP *o;
  SV *sv = *SP;
  
  if (SvPADTMP(sv)  IS_PADGV(sv)) {
  /* prevent S_refto from making a copy of the GV,
   * tricking it to SvREFCNT_inc and point to this one instead.
   */
  SvPADTMP_off(sv);
  }
  else {
  sv = Nullsv;
  }
  
  /* o = Perl_pp_srefgen(aTHX) */
  o = MP_PERL_ppaddr[MP_OP_SREFGEN](aTHX);
  
  if (sv) {
  /* restore original flags */
  SvPADTMP_on(sv);
  }
  
  return o;
  }
  
  #endif /* MP_REFGEN_FIXUP */
  
  static modperl_pp_t MP_ppaddr[] = {
  #ifdef MP_REFGEN_FIXUP
  MEMBER_TO_FPTR(modperl_pp_srefgen),
  #endif
  };
  
  void modperl_perl_pp_set(modperl_perl_opcode_e idx)
  {
  int pl_idx = MP_pp_map[idx];
  
  /* save original */
  MP_PERL_ppaddr[idx] = PL_ppaddr[pl_idx];
  
  /* replace with our own */
  PL_ppaddr[pl_idx] = MP_ppaddr[idx];
  }
  
  void modperl_perl_pp_set_all(void)
  {
  int i;
  
  for (i=0; iMP_OP_max; i++) {
  modperl_perl_pp_set(i);
  }
  }
  
  void modperl_perl_pp_unset(modperl_perl_opcode_e idx)
  {
  int pl_idx = MP_pp_map[idx];
  
  /* restore original */
  PL_ppaddr[pl_idx] = MP_PERL_ppaddr[idx];
  }
  
  void modperl_perl_pp_unset_all(void)
  {
  int i;
  
  for (i=0; iMP_OP_max; i++) {
  modperl_perl_pp_unset(i);
  }
  }
  
  
  
  1.1  modperl-2.0/src/modules/perl/modperl_perl_pp.h
  
  Index: modperl_perl_pp.h
  ===
  #ifndef MODPERL_PERL_PP_H
  #define MODPERL_PERL_PP_H
  
  #if defined(USE_ITHREADS)  defined(MP_PERL_5_6_x)
  #   define MP_REFGEN_FIXUP
  #endif
  
  typedef enum {
  #ifdef MP_REFGEN_FIXUP
  MP_OP_SREFGEN,
  #endif
  MP_OP_max
  } modperl_perl_opcode_e;
  
  void modperl_perl_pp_set(modperl_perl_opcode_e idx);
  
  void modperl_perl_pp_set_all(void);
  
  void modperl_perl_pp_unset(modperl_perl_opcode_e idx);
  
  void modperl_perl_pp_unset_all(void);
  
  #endif /* MODPERL_PERL_PP_H */
  
  
  



cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-06-15 Thread dougm

dougm   2002/06/15 18:09:18

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.72  +54 -19modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- FunctionTable.pm  3 Jun 2002 23:46:44 -   1.71
  +++ FunctionTable.pm  16 Jun 2002 01:09:18 -  1.72
   -2,7 +2,7 
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Sat May 25 11:12:06 2002
  +# !  Sat Jun 15 17:57:19 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
   -1355,6 +1355,11 
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'modperl_env_unload',
  +'args' = []
  +  },
  +  {
   'return_type' = 'int',
   'name' = 'modperl_errsv',
   'args' = [
   -2082,6 +2087,24 
   ]
 },
 {
  +'return_type' = 'int',
  +'name' = 'modperl_hook_pre_config',
  +'args' = [
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'p'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'plog'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'ptemp'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'modperl_init',
   'args' = [
   -3175,6 +3198,36 
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_set',
  +'args' = [
  +  {
  +'type' = 'modperl_perl_opcode_e',
  +'name' = 'idx'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_set_all',
  +'args' = []
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_unset',
  +'args' = [
  +  {
  +'type' = 'modperl_perl_opcode_e',
  +'name' = 'idx'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_unset_all',
  +'args' = []
  +  },
  +  {
   'return_type' = 'SV *',
   'name' = 'modperl_perl_sv_setref_uv',
   'attr' = [
   -3228,24 +3281,6 
 {
   'type' = 'request_rec *',
   'name' = 'r'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'int',
  -'name' = 'modperl_hook_pre_config',
  -'args' = [
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
  -  },
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'plog'
  -  },
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'ptemp'
 }
   ]
 },
  
  
  



cvs commit: modperl-2.0/lib/ModPerl Code.pm

2002-06-15 Thread dougm

dougm   2002/06/15 18:09:46

  Modified:lib/ModPerl Code.pm
  Log:
  integrate modperl_perl_pp module
  
  Revision  ChangesPath
  1.82  +1 -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.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Code.pm   21 May 2002 00:33:33 -  1.81
  +++ Code.pm   16 Jun 2002 01:09:46 -  1.82
   -563,7 +563,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 perl_global perl_pp);
   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] }
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_perl_pp.c modperl_perl_pp.h

2002-06-15 Thread dougm

dougm   2002/06/15 18:20:50

  Modified:src/modules/perl modperl_perl_pp.c modperl_perl_pp.h
  Log:
  stub modperl_pp_require
  
  Revision  ChangesPath
  1.2   +8 -0  modperl-2.0/src/modules/perl/modperl_perl_pp.c
  
  Index: modperl_perl_pp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_pp.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl_pp.c 16 Jun 2002 01:07:21 -  1.1
  +++ modperl_perl_pp.c 16 Jun 2002 01:20:50 -  1.2
   -4,6 +4,7 
   #ifdef MP_REFGEN_FIXUP
   OP_SREFGEN,
   #endif
  +OP_REQUIRE
   };
   
   typedef OP * MP_FUNC_T(modperl_pp_t)(pTHX);
   -47,10 +48,17 
   
   #endif /* MP_REFGEN_FIXUP */
   
  +static OP *modperl_pp_require(pTHX)
  +{
  +/* nothing yet */
  +return MP_PERL_ppaddr[MP_OP_REQUIRE](aTHX);
  +}
  +
   static modperl_pp_t MP_ppaddr[] = {
   #ifdef MP_REFGEN_FIXUP
   MEMBER_TO_FPTR(modperl_pp_srefgen),
   #endif
  +MEMBER_TO_FPTR(modperl_pp_require)
   };
   
   void modperl_perl_pp_set(modperl_perl_opcode_e idx)
  
  
  
  1.2   +1 -0  modperl-2.0/src/modules/perl/modperl_perl_pp.h
  
  Index: modperl_perl_pp.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_pp.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl_pp.h 16 Jun 2002 01:07:21 -  1.1
  +++ modperl_perl_pp.h 16 Jun 2002 01:20:50 -  1.2
   -9,6 +9,7 
   #ifdef MP_REFGEN_FIXUP
   MP_OP_SREFGEN,
   #endif
  +MP_OP_REQUIRE,
   MP_OP_max
   } modperl_perl_opcode_e;
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_perl_pp.c

2002-06-15 Thread dougm

dougm   2002/06/15 18:34:02

  Modified:src/modules/perl modperl_perl_pp.c
  Log:
  MP_FUNC_T not needed, infact breaks win32
  
  Revision  ChangesPath
  1.3   +1 -1  modperl-2.0/src/modules/perl/modperl_perl_pp.c
  
  Index: modperl_perl_pp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_pp.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl_pp.c 16 Jun 2002 01:20:50 -  1.2
  +++ modperl_perl_pp.c 16 Jun 2002 01:34:02 -  1.3
   -7,7 +7,7 
   OP_REQUIRE
   };
   
  -typedef OP * MP_FUNC_T(modperl_pp_t)(pTHX);
  +typedef OP * (*modperl_pp_t)(pTHX);
   
   static modperl_pp_t MP_PERL_ppaddr[MP_OP_max];
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 18:58:50

  Modified:lib/Apache Build.pm
  Log:
  hmm, darwin ldflags fixup was not quite good enough
  
  Revision  ChangesPath
  1.98  +4 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- Build.pm  15 Jun 2002 17:26:29 -  1.97
  +++ Build.pm  16 Jun 2002 01:58:50 -  1.98
   -175,7 +175,10 
   }
   elsif (DARWIN) {
   #not sure how this can happen, but it shouldn't
  -$config-{ldflags} =~ s/-undefined suppress//;
  +my bogus_flags = 'flat_namespace', 'bundle', 'undefined suppress';
  +for my $flag (bogus_flags) {
  +$config-{ldflags} =~ s/-$flag\s*//;
  +}
   }
   
   my $ldopts = ExtUtils::Embed::ldopts();
  
  
  



cvs commit: modperl-2.0 Changes

2002-06-14 Thread dougm

dougm   2002/06/14 19:09:26

  Modified:.Changes
  Log:
  update Changes
  
  Revision  ChangesPath
  1.23  +3 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Changes   13 Jun 2002 02:59:05 -  1.22
  +++ Changes   15 Jun 2002 02:09:26 -  1.23
   -10,6 +10,9 
   
   =item 1.99_03-dev
   
  +win32 fix for the global Apache-request object to make sure it uses
  +the thread local storage mechanism
  +
   add a reference count mechanism to interpreters for use in threaded MPMs,
   so if APR::Pool cleanups have been registered the interpreter is not
   putback into the interpreter pool until all cleanups have run.
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2002-06-12 Thread dougm

dougm   2002/06/12 14:13:11

  Modified:src/modules/perl mod_perl.c
  Log:
  unbuffer STDERR
  
  Revision  ChangesPath
  1.124 +2 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- mod_perl.c6 Jun 2002 16:45:41 -   1.123
  +++ mod_perl.c12 Jun 2002 21:13:10 -  1.124
   -129,6 +129,8 
*/
   modperl_require_module(aTHX_ DynaLoader, FALSE);
   #endif
  +
  +IoFLUSH_on(PL_stderrgv); /* unbuffer STDERR */
   }
   
   static void modperl_xs_init(pTHX)
  
  
  



cvs commit: modperl-2.0 Changes

2002-06-12 Thread dougm

dougm   2002/06/12 16:37:55

  Modified:.Changes
  Log:
  update Changes
  
  Revision  ChangesPath
  1.21  +6 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Changes   5 Jun 2002 01:36:37 -   1.20
  +++ Changes   12 Jun 2002 23:37:55 -  1.21
  @@ -10,6 +10,12 @@
   
   =item 1.99_03-dev
   
  +unbuffer STDERR (by turning on autoflush by default)
  +
  +add support for Perl*Handler +Apache::Foo
  +
  +fix open_logs,post_config,child_init hooks to run in the proper order
  +
   adjust to apr_bucket_type_t changes in 2.0.37-dev
   [Mladen Turk [EMAIL PROTECTED]]
   
  
  
  



cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm

2002-06-11 Thread dougm

dougm   2002/06/11 09:27:57

  Modified:lib/ModPerl WrapXS.pm
  Log:
  be better prepared for GvUNIQUE support
  
  Revision  ChangesPath
  1.46  +3 -3  modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- WrapXS.pm 29 May 2002 16:31:44 -  1.45
  +++ WrapXS.pm 11 Jun 2002 16:27:57 -  1.46
   -3,7 +3,7 
   use strict;
   use warnings FATAL = 'all';
   
  -use constant GvSHARED = 0; #$^V gt v5.7.0;
  +use constant GvUNIQUE = 0; #$] = 5.008;
   use Apache::TestTrace;
   use Apache::Build ();
   use ModPerl::Code ();
   -409,7 +409,7 
   my($self, $name) = _;
   my $str = ;
   return $str if $name =~ /$notshared$/o;
  -$str = ATTRS: shared\n if GvSHARED;
  +$str = ATTRS: unique\n if GvUNIQUE;
   $str;
   }
   
   -471,7 +471,7 
   if (my $newxs = $self-{newXS}-{$module}) {
   for my $xs ($newxs) {
   print $fh qq{   cv = newXS($xs-[0], $xs-[1], __FILE__);\n};
  -print $fh qq{   GvSHARED_on(CvGV(cv));\n} if GvSHARED;
  +print $fh qq{   GvUNIQUE_on(CvGV(cv));\n} if GvUNIQUE;
   }
   }
   
  
  
  



Re: Perl_Tstack_sp_ptr

2002-06-11 Thread dougm

On Wed, 12 Jun 2002, Stas Bekman wrote:

 so the problem that I see on linux is unrelated?

dunno, i built with -Duseshrplib and seems ok linkage wise.  tho 
some ModPerl-Registry are tests failing with the same problem in 
special_blocks:
# testing : ModPerl::Registry is not running BEGIN blocks on the second req
# expected: ''
# received: undef
not ok 6





cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2002-06-06 Thread dougm

dougm   2002/06/06 09:45:41

  Modified:src/modules/perl mod_perl.c
  Log:
  need to run open_logs,post_config,child_init hooks APR_HOOKS_FIRST so
  they are run before those in modperl_hooks.c
  
  Revision  ChangesPath
  1.123 +3 -3  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.122
  retrieving revision 1.123
  diff -u -r1.122 -r1.123
  --- mod_perl.c4 Jun 2002 16:16:50 -   1.122
  +++ mod_perl.c6 Jun 2002 16:45:41 -   1.123
   -530,10 +530,10 
  NULL, NULL, APR_HOOK_MIDDLE);
   
   ap_hook_open_logs(modperl_hook_init,
  -  NULL, NULL, APR_HOOK_MIDDLE);
  +  NULL, NULL, APR_HOOK_FIRST);
   
   ap_hook_post_config(modperl_hook_post_config,
  -NULL, NULL, APR_HOOK_MIDDLE);
  +NULL, NULL, APR_HOOK_FIRST);
   
   ap_hook_handler(modperl_response_handler,
   NULL, NULL, APR_HOOK_MIDDLE);
   -576,7 +576,7 
 NULL, NULL, APR_HOOK_FIRST);
   
   ap_hook_child_init(modperl_hook_child_init,
  -   NULL, NULL, APR_HOOK_MIDDLE);
  +   NULL, NULL, APR_HOOK_FIRST);
   
   modperl_register_handler_hooks();
   }
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_handler.c

2002-06-06 Thread dougm

dougm   2002/06/06 10:32:51

  Modified:src/modules/perl modperl_handler.c
  Log:
  add support for Perl*Handler +Apache::Foo
  
  Revision  ChangesPath
  1.11  +14 -0 modperl-2.0/src/modules/perl/modperl_handler.c
  
  Index: modperl_handler.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_handler.c 21 Oct 2001 22:11:34 -  1.10
  +++ modperl_handler.c 6 Jun 2002 17:32:51 -   1.11
   -5,6 +5,20 
   modperl_handler_t *handler = 
   (modperl_handler_t *)apr_pcalloc(p, sizeof(*handler));
   
  +switch (*name) {
  +  case '+':
  +++name;
  +MpHandlerAUTOLOAD_On(handler);
  +break;
  +  case '-':
  +++name;
  +/* XXX: currently a noop; should disable autoload of given handler
  + * if PerlOptions +AutoLoad is configured
  + */
  +MpHandlerAUTOLOAD_Off(handler);
  +break;
  +}
  +
   handler-name = name;
   MP_TRACE_h(MP_FUNC, new handler %s\n, handler-name);
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2002-06-04 Thread dougm

dougm   2002/06/04 09:16:51

  Modified:src/modules/perl mod_perl.c
  Log:
  need to copy MODPERL2 for the ap_server_config_defines
  
  Revision  ChangesPath
  1.122 +2 -1  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- mod_perl.c3 Jun 2002 23:41:18 -   1.121
  +++ mod_perl.c4 Jun 2002 16:16:50 -   1.122
   -426,7 +426,8 
   apr_pool_t *ptemp)
   {
   /* for IfDefine MODPERL2 and Apache-define(MODPERL2) */
  -*(char **)apr_array_push(ap_server_config_defines) = MODPERL2;
  +*(char **)apr_array_push(ap_server_config_defines) =
  +apr_pstrdup(p, MODPERL2);
   
   /* XXX: htf can we have PerlPreConfigHandler
* without first configuring mod_perl ?
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_bucket.c

2002-06-04 Thread dougm

dougm   2002/06/04 18:36:37

  Modified:.Changes
   src/modules/perl modperl_bucket.c
  Log:
  Submitted by: Mladen Turk [EMAIL PROTECTED]
  Reviewed by:  dougm
  adjust to apr_bucket_type_t changes in 2.0.37-dev
  
  Revision  ChangesPath
  1.20  +3 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Changes   4 Jun 2002 12:43:41 -   1.19
  +++ Changes   5 Jun 2002 01:36:37 -   1.20
  @@ -10,12 +10,14 @@
   
   =item 1.99_03-dev
   
  +adjust to apr_bucket_type_t changes in 2.0.37-dev
  +[Mladen Turk [EMAIL PROTECTED]]
  +
   add MODPERL2 config define, as if the server had been started with -DMODPERL2
   
   compat additions and fixes: $r-lookup_{file,uri}, $r-is_main, Apache-define
   
   added compat for Apache::log_error [Stas Bekman]
  -
   
   =item 1.99_02 - June 1, 2002
   
  
  
  
  1.8   +3 -0  modperl-2.0/src/modules/perl/modperl_bucket.c
  
  Index: modperl_bucket.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_bucket.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_bucket.c  24 Sep 2001 03:32:55 -  1.7
  +++ modperl_bucket.c  5 Jun 2002 01:36:37 -   1.8
  @@ -49,6 +49,9 @@
   
   static const apr_bucket_type_t modperl_bucket_sv_type = {
   mod_perl SV bucket, 4,
  +#if MODULE_MAGIC_NUMBER = 20020602
  +APR_BUCKET_DATA,
  +#endif
   modperl_bucket_sv_destroy,
   modperl_bucket_sv_read,
   apr_bucket_setaside_notimpl,
  
  
  



cvs commit: modperl-2.0/t/response/TestApache compat2.pm

2002-06-03 Thread dougm

dougm   2002/06/03 11:27:03

  Modified:lib/Apache compat.pm
   t/response/TestApache compat2.pm
  Log:
  add $r-is_main compat method
  
  Revision  ChangesPath
  1.59  +2 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- compat.pm 3 Jun 2002 18:23:16 -   1.58
  +++ compat.pm 3 Jun 2002 18:27:03 -   1.59
   -321,6 +321,8 
   $r-send_fd_length($fh, -1);
   }
   
  +sub is_main { !shift-main }
  +
   package Apache::File;
   
   use Fcntl ();
  
  
  
  1.15  +4 -1  modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- compat2.pm30 May 2002 04:05:06 -  1.14
  +++ compat2.pm3 Jun 2002 18:27:03 -   1.15
   -24,7 +24,7 
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 45;
  +plan $r, tests = 46;
   
   $r-send_http_header('text/plain');
   
   -230,6 +230,9 
   my $t_class = ref $t;
   
   ok t_cmp('APR::Table', $t_class, Apache::Table-new);
  +
  +ok t_cmp(!$r-main, $r-is_main,
  + '$r-is_main');
   
   #note these are not actually part of the tests
   #since i think on platforms where crypt is not supported,
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c mod_perl.h

2002-06-03 Thread dougm

dougm   2002/06/03 16:41:18

  Modified:src/modules/perl mod_perl.c mod_perl.h
  Log:
  add MODPERL2 config define, as if the server had been started with -DMODPERL2
  
  Revision  ChangesPath
  1.121 +10 -2 modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- mod_perl.c30 May 2002 23:35:02 -  1.120
  +++ mod_perl.c3 Jun 2002 23:41:18 -   1.121
   -422,12 +422,17 
   return OK;
   }
   
  -void modperl_pre_config_handler(apr_pool_t *p, apr_pool_t *plog,
  -apr_pool_t *ptemp)
  +int modperl_hook_pre_config(apr_pool_t *p, apr_pool_t *plog,
  +apr_pool_t *ptemp)
   {
  +/* for IfDefine MODPERL2 and Apache-define(MODPERL2) */
  +*(char **)apr_array_push(ap_server_config_defines) = MODPERL2;
  +
   /* XXX: htf can we have PerlPreConfigHandler
* without first configuring mod_perl ?
*/
  +
  +return OK;
   }
   
   static int modperl_hook_pre_connection(conn_rec *c, void *csd)
   -520,6 +525,9 
   
   void modperl_register_hooks(apr_pool_t *p)
   {
  +ap_hook_pre_config(modperl_hook_pre_config,
  +   NULL, NULL, APR_HOOK_MIDDLE);
  +
   ap_hook_open_logs(modperl_hook_init,
 NULL, NULL, APR_HOOK_MIDDLE);
   
  
  
  
  1.44  +2 -2  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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- mod_perl.h31 May 2002 15:41:11 -  1.43
  +++ mod_perl.h3 Jun 2002 23:41:18 -   1.44
   -64,8 +64,8 
   void modperl_init(server_rec *s, apr_pool_t *p);
   int modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
 apr_pool_t *ptemp, server_rec *s);
  -void modperl_pre_config_handler(apr_pool_t *p, apr_pool_t *plog,
  -apr_pool_t *ptemp);
  +int modperl_hook_pre_config(apr_pool_t *p, apr_pool_t *plog,
  +apr_pool_t *ptemp);
   void modperl_register_hooks(apr_pool_t *p);
   apr_pool_t *modperl_server_pool(void);
   PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p);
  
  
  



cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-06-03 Thread dougm

dougm   2002/06/03 16:46:44

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  need to update pre_config hook namechange for win32 .def
  
  Revision  ChangesPath
  1.71  +2 -2  modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- FunctionTable.pm  30 May 2002 02:33:48 -  1.70
  +++ FunctionTable.pm  3 Jun 2002 23:46:44 -   1.71
   -3232,8 +3232,8 
   ]
 },
 {
  -'return_type' = 'void',
  -'name' = 'modperl_pre_config_handler',
  +'return_type' = 'int',
  +'name' = 'modperl_hook_pre_config',
   'args' = [
 {
   'type' = 'apr_pool_t *',
  
  
  



cvs commit: modperl-2.0/todo api.txt

2002-06-03 Thread dougm

dougm   2002/06/03 17:44:24

  Modified:lib/Apache compat.pm
   t/response/TestApache compat2.pm
   todo api.txt
  Log:
  add Apache-define compat method
  
  Revision  ChangesPath
  1.60  +5 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- compat.pm 3 Jun 2002 18:27:03 -   1.59
  +++ compat.pm 4 Jun 2002 00:44:23 -   1.60
   -99,6 +99,11 
   return Symbol::gensym();
   }
   
  +sub define {
  +shift if _ == 2;
  +exists_config_define(_);
  +}
  +
   package Apache::Constants;
   
   use Apache::Const ();
  
  
  
  1.16  +5 -1  modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- compat2.pm3 Jun 2002 18:27:03 -   1.15
  +++ compat2.pm4 Jun 2002 00:44:23 -   1.16
   -24,7 +24,7 
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 46;
  +plan $r, tests = 47;
   
   $r-send_http_header('text/plain');
   
   -233,6 +233,10 
   
   ok t_cmp(!$r-main, $r-is_main,
'$r-is_main');
  +
  +ok t_cmp(Apache::exists_config_define('MODPERL2'),
  + Apache-define('MODPERL2'),
  + 'Apache-define');
   
   #note these are not actually part of the tests
   #since i think on platforms where crypt is not supported,
  
  
  
  1.24  +0 -4  modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- api.txt   25 May 2002 17:49:03 -  1.23
  +++ api.txt   4 Jun 2002 00:44:23 -   1.24
   -40,10 +40,6 
   1.x ht_time compat.  should we just leave as is or see if ht_time can
   be changed to not require a pool?
   
  -Apache-define:
  -exists as Apache::exists_config_define, which should stay,
  -Apache::compat could implement a wrapper.
  -
   $r-document_root:
   cannot currently be modified.  requires locking since it is part of
   the per-server config structure which is shared between threads
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_env.c

2002-06-01 Thread dougm

dougm   2002/06/01 16:42:08

  Modified:src/modules/perl modperl_env.c
  Log:
  pass the PATH and TZ environment variables at startup by default as 1.xx did
  
  Revision  ChangesPath
  1.25  +22 -0 modperl-2.0/src/modules/perl/modperl_env.c
  
  Index: modperl_env.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- modperl_env.c 30 May 2002 23:35:02 -  1.24
  +++ modperl_env.c 1 Jun 2002 23:42:07 -   1.25
   -85,10 +85,32 
   modperl_env_tie(mg_flags);
   }
   
  +/* list of environment variables to pass by default */
  +static const char *MP_env_pass_defaults[] = {
  +PATH, TZ, NULL
  +};
  +
   void modperl_env_configure_server(pTHX_ apr_pool_t *p, server_rec *s)
   {
   /* XXX: propagate scfg-SetEnv to environ */
   MP_dSCFG(s);
  +int i = 0;
  +
  +for (i=0; MP_env_pass_defaults[i]; i++) {
  +const char *key = MP_env_pass_defaults[i];
  +char *val;
  +
  +if (apr_table_get(scfg-SetEnv, key) ||
  +apr_table_get(scfg-PassEnv, key))
  +{
  +continue; /* already configured */
  +}
  +
  +if ((val = getenv(key))) {
  +apr_table_set(scfg-PassEnv, key, val);
  +}
  +}
  +
   modperl_env_table_populate(aTHX_ scfg-SetEnv);
   modperl_env_table_populate(aTHX_ scfg-PassEnv);
   }
  
  
  



cvs commit: modperl-2.0 Changes

2002-06-01 Thread dougm

dougm   2002/06/01 20:20:35

  Modified:.Changes
  Log:
  update Changes
  
  Revision  ChangesPath
  1.15  +12 -0 modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Changes   29 May 2002 16:31:44 -  1.14
  +++ Changes   2 Jun 2002 03:20:35 -   1.15
  @@ -10,6 +10,18 @@
   
   =item 1.99_02-dev
   
  +pass the PATH and TZ environment variables at startup by default as 1.xx did
  +
  +fix ModPerl::Util::exit segv with 5.6.0
  +
  +no longer support 5.7.x perl development versions
  +
  +added compat for Apache::Table-new
  +
  +various fixes to compile/run on darwin
  +
  +server-scope Perl{Set,Pass}Env config now propagated to %ENV at startup
  +
   use SvOK(sv) instead of sv == PL_sv_undef to detect undef values in xs
   [Stephen Clouse [EMAIL PROTECTED]]
   
  
  
  



cvs commit: modperl-2.0 Changes

2002-06-01 Thread dougm

dougm   2002/06/01 20:21:43

  Modified:.Changes
  Log:
  releasing 1.99_02
  
  Revision  ChangesPath
  1.16  +1 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Changes   2 Jun 2002 03:20:35 -   1.15
  +++ Changes   2 Jun 2002 03:21:43 -   1.16
   -8,7 +8,7 
   
   =over 3
   
  -=item 1.99_02-dev
  +=item 1.99_02 - June 1, 2002
   
   pass the PATH and TZ environment variables at startup by default as 1.xx did
   
  
  
  



cvs commit: modperl-2.0/lib mod_perl.pm

2002-06-01 Thread dougm

dougm   2002/06/01 20:25:53

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.17  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Changes   2 Jun 2002 03:21:43 -   1.16
  +++ Changes   2 Jun 2002 03:25:53 -   1.17
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.99_03-dev
  +
   =item 1.99_02 - June 1, 2002
   
   pass the PATH and TZ environment variables at startup by default as 1.xx did
  
  
  
  1.3   +1 -1  modperl-2.0/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/mod_perl.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_perl.pm   7 Apr 2002 05:08:31 -   1.2
  +++ mod_perl.pm   2 Jun 2002 03:25:53 -   1.3
   -4,7 +4,7 
   use strict;
   
   BEGIN {
  -our $VERSION = 1.9902;
  +our $VERSION = 1.9903;
   }
   
   1;
  
  
  



cvs commit: modperl/lib mod_perl.pm

2002-06-01 Thread dougm

dougm   2002/06/01 20:02:51

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version to 1.27
  
  Revision  ChangesPath
  1.649 +1 -1  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.648
  retrieving revision 1.649
  diff -u -r1.648 -r1.649
  --- Changes   2 Jun 2002 02:59:37 -   1.648
  +++ Changes   2 Jun 2002 03:02:51 -   1.649
   -8,7 +8,7 
   
   =over 3
   
  -=item 1.26_01-dev
  +=item 1.27 - June 1, 2002
   
   workaround Cwd bug in 5.8.0-RC1 that breaks apache configuration on solaris
   
  
  
  
  1.54  +1 -1  modperl/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl/lib/mod_perl.pm,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_perl.pm   12 Jul 2001 02:27:28 -  1.53
  +++ mod_perl.pm   2 Jun 2002 03:02:51 -   1.54
   -4,7 +4,7 
   use DynaLoader ();
   
   BEGIN {
  -$mod_perl::VERSION = 1.2601;
  +$mod_perl::VERSION = 1.27;
   }
   
   sub boot {
  
  
  



cvs commit: modperl/lib mod_perl.pm

2002-06-01 Thread dougm

dougm   2002/06/01 20:07:13

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.650 +2 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.649
  retrieving revision 1.650
  diff -u -r1.649 -r1.650
  --- Changes   2 Jun 2002 03:02:51 -   1.649
  +++ Changes   2 Jun 2002 03:07:13 -   1.650
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.27_01-dev
  +
   =item 1.27 - June 1, 2002
   
   workaround Cwd bug in 5.8.0-RC1 that breaks apache configuration on solaris
  
  
  
  1.55  +1 -1  modperl/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl/lib/mod_perl.pm,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mod_perl.pm   2 Jun 2002 03:02:51 -   1.54
  +++ mod_perl.pm   2 Jun 2002 03:07:13 -   1.55
   -4,7 +4,7 
   use DynaLoader ();
   
   BEGIN {
  -$mod_perl::VERSION = 1.27;
  +$mod_perl::VERSION = 1.2701;
   }
   
   sub boot {
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.h

2002-05-31 Thread dougm

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/xs/APR/PerlIO apr_perlio.c

2002-05-31 Thread dougm

dougm   2002/05/31 08:41:40

  Modified:xs/APR/PerlIO apr_perlio.c
  Log:
  seek is ok if both perl and apr have largefiles enabled
  
  Revision  ChangesPath
  1.14  +1 -1  modperl-2.0/xs/APR/PerlIO/apr_perlio.c
  
  Index: apr_perlio.c
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- apr_perlio.c  31 May 2002 02:20:29 -  1.13
  +++ apr_perlio.c  31 May 2002 15:41:40 -  1.14
   -152,7 +152,7 
   IV code;
   apr_off_t seek_offset = 0;
   
  -#ifdef USE_LARGE_FILES
  +#if MP_LARGE_FILES_PERL_ONLY
   if (offset != 0) {
   Perl_croak(aTHX_ PerlIO::APR::seek with non-zero offset
   not supported with -Duselargefiles);
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_perl_includes.h

2002-05-29 Thread dougm

dougm   02/05/29 18:23:28

  Modified:src/modules/perl modperl_perl_includes.h
  Log:
  define environ on darwin if needed
  
  Revision  ChangesPath
  1.13  +5 -0  modperl-2.0/src/modules/perl/modperl_perl_includes.h
  
  Index: modperl_perl_includes.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_includes.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- modperl_perl_includes.h   23 May 2002 22:40:47 -  1.12
  +++ modperl_perl_includes.h   30 May 2002 01:23:28 -  1.13
   -63,4 +63,9 
   #   define PERL_MAGIC_tied 'P'
   #endif
   
  +#if defined(__APPLE__)  !defined(PERL_CORE)  !defined(environ)
  +#   include crt_externs.h
  +#   define environ (*_NSGetEnviron())
  +#endif
  +
   #endif /* MODPERL_PERL_INCLUDES_H */
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-29 Thread dougm

dougm   02/05/29 18:52:55

  Modified:lib/Apache Build.pm
  Log:
  darwin does not like ranlib on mod_perl.so
  
  Revision  ChangesPath
  1.95  +9 -4  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- Build.pm  29 May 2002 03:26:40 -  1.94
  +++ Build.pm  30 May 2002 01:52:55 -  1.95
   -20,6 +20,7 
   use constant HAS_ITHREADS =
   $Config{useithreads}  ($Config{useithreads} eq 'define');
   
  +use constant DARWIN = $^O eq 'darwin';
   use constant WIN32 = $^O eq 'MSWin32';
   use constant MSVC  = WIN32()  ($Config{cc} eq 'cl');
   
   -863,10 +864,14 
   
   sub dynamic_link_default {
   my $self = shift;
  -return $self-dynamic_link_header_default . 'EOF';
  - -o $
  - $(MODPERL_RANLIB) $
  -EOF
  +
  +my $link = $self-dynamic_link_header_default . \t . '-o $';
  +
  +my $ranlib = \t . '$(MODPERL_RANLIB) $';
  +
  +$link .= \n . $ranlib unless DARWIN;
  +
  +$link;
   }
   
   sub dynamic_link_MSWin32 {
  
  
  



cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-05-29 Thread dougm

dougm   02/05/29 19:33:49

  Modified:src/modules/perl modperl_filter.c modperl_filter.h
   xs/APR/Bucket APR__Bucket.h
   xs/Apache/RequestIO Apache__RequestIO.h
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  use apr_size_t rather than apr_ssize_t for apr_bucket_read
  (gets rid of some warnings on darwin)
  
  Revision  ChangesPath
  1.35  +10 -10modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- modperl_filter.c  6 Apr 2002 01:19:15 -   1.34
  +++ modperl_filter.c  30 May 2002 02:33:48 -  1.35
   -3,7 +3,7 
   /* simple buffer api */
   
   MP_INLINE apr_status_t modperl_wbucket_pass(modperl_wbucket_t *wb,
  -const char *buf, apr_ssize_t len)
  +const char *buf, apr_size_t len)
   {
   apr_bucket_alloc_t *ba = (*wb-filters)-c-bucket_alloc;
   apr_bucket_brigade *bb;
   -52,9 +52,9 
   
   MP_INLINE apr_status_t modperl_wbucket_write(modperl_wbucket_t *wb,
const char *buf,
  - apr_ssize_t *wlen)
  + apr_size_t *wlen)
   {
  -apr_ssize_t len = *wlen;
  +apr_size_t len = *wlen;
   *wlen = 0;
   
   if ((len + wb-outcnt)  sizeof(wb-outbuf)) {
   -226,13 +226,13 
   return 0;
   }
   
  -MP_INLINE apr_ssize_t modperl_output_filter_read(pTHX_
  - modperl_filter_t *filter,
  - SV *buffer,
  - apr_ssize_t wanted)
  +MP_INLINE apr_size_t modperl_output_filter_read(pTHX_
  +modperl_filter_t *filter,
  +SV *buffer,
  +apr_size_t wanted)
   {
   int num_buckets = 0;
  -apr_ssize_t len = 0;
  +apr_size_t len = 0;
   
   (void)SvUPGRADE(buffer, SVt_PV);
   SvPOK_only(buffer);
   -268,7 +268,7 
   
   while (1) {
   const char *buf;
  -apr_ssize_t buf_len;
  +apr_size_t buf_len;
   
   if (!get_bucket(filter)) {
   break;
   -361,7 +361,7 
   
   MP_INLINE apr_status_t modperl_output_filter_write(modperl_filter_t *filter,
  const char *buf,
  -   apr_ssize_t *len)
  +   apr_size_t *len)
   {
   return modperl_wbucket_write(filter-wbucket, buf, len);
   }
  
  
  
  1.14  +7 -7  modperl-2.0/src/modules/perl/modperl_filter.h
  
  Index: modperl_filter.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- modperl_filter.h  6 Apr 2002 01:19:15 -   1.13
  +++ modperl_filter.h  30 May 2002 02:33:48 -  1.14
   -12,13 +12,13 
   
   /* simple buffer api */
   MP_INLINE apr_status_t modperl_wbucket_pass(modperl_wbucket_t *b,
  -const char *buf, apr_ssize_t len);
  +const char *buf, apr_size_t len);
   
   MP_INLINE apr_status_t modperl_wbucket_flush(modperl_wbucket_t *b);
   
   MP_INLINE apr_status_t modperl_wbucket_write(modperl_wbucket_t *b,
const char *buf,
  - apr_ssize_t *wlen);
  + apr_size_t *wlen);
   
   /* generic filter routines */
   
   -43,14 +43,14 
   
   MP_INLINE apr_status_t modperl_output_filter_flush(modperl_filter_t *filter);
   
  -MP_INLINE apr_ssize_t modperl_output_filter_read(pTHX_
  - modperl_filter_t *filter,
  - SV *buffer,
  - apr_ssize_t wanted);
  +MP_INLINE apr_size_t modperl_output_filter_read(pTHX_
  +modperl_filter_t *filter,
  +SV *buffer,
  +apr_size_t wanted);
   
   MP_INLINE apr_status_t modperl_output_filter_write(modperl_filter_t *filter,
  const char *buf,
  -   apr_ssize_t *len

cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-29 Thread dougm

dougm   02/05/29 20:54:08

  Modified:lib/Apache compat.pm
  Log:
  prevent inclusion of Apache::Table
  
  Revision  ChangesPath
  1.56  +2 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- compat.pm 25 May 2002 17:49:03 -  1.55
  +++ compat.pm 30 May 2002 03:54:08 -  1.56
   -43,6 +43,8 
   $INC{'Apache/Constants.pm'} = __FILE__;
   
   $INC{'Apache/File.pm'} = __FILE__;
  +
  +$INC{'Apache/Table.pm'} = __FILE__;
   }
   
   sub request {
  
  
  



cvs commit: modperl-2.0/t/response/TestApache compat2.pm

2002-05-29 Thread dougm

dougm   02/05/29 21:05:07

  Modified:lib/Apache compat.pm
   t/response/TestApache compat2.pm
  Log:
  add compat for Apache::Table-new
  
  Revision  ChangesPath
  1.57  +8 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- compat.pm 30 May 2002 03:54:08 -  1.56
  +++ compat.pm 30 May 2002 04:05:06 -  1.57
   -472,5 +472,13 
   APR::URI-parse($r-pool, $uri);
   }
   
  +package Apache::Table;
  +
  +sub new {
  +my($class, $r, $nelts) = _;
  +$nelts ||= 10;
  +APR::Table::make($r-pool, $nelts);
  +}
  +
   1;
   __END__
  
  
  
  1.14  +6 -1  modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- compat2.pm25 May 2002 17:49:03 -  1.13
  +++ compat2.pm30 May 2002 04:05:06 -  1.14
   -24,7 +24,7 
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 44;
  +plan $r, tests = 45;
   
   $r-send_http_header('text/plain');
   
   -225,6 +225,11 
   my $ptime = Apache::Util::parsedate($fmtdate);
   
   ok t_cmp($time, $ptime, Apache::Util::parsedate);
  +
  +my $t = Apache::Table-new($r);
  +my $t_class = ref $t;
  +
  +ok t_cmp('APR::Table', $t_class, Apache::Table-new);
   
   #note these are not actually part of the tests
   #since i think on platforms where crypt is not supported,
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-29 Thread dougm

dougm   02/05/29 23:00:49

  Modified:lib/Apache Build.pm
  Log:
  prevent possible fatal warning seen in 5.6.0/darwin in MM-init_others
  
  Revision  ChangesPath
  1.96  +4 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- Build.pm  30 May 2002 01:52:55 -  1.95
  +++ Build.pm  30 May 2002 06:00:49 -  1.96
   -824,6 +824,9 
   $$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
   }
   
  +#help prevent warnings
  +my mm_init_vars = (BASEEXT = '');
  +
   sub make_tools {
   my($self, $fh) = _;
   
   -832,7 +835,7 
   }
   
   require ExtUtils::MakeMaker;
  -my $mm = bless {}, 'MM';
  +my $mm = bless { mm_init_vars }, 'MM';
   $mm-init_others;
   
   for (qw(rm_f mv ld ar cp test_f)) {
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_env.c

2002-05-27 Thread dougm

dougm   02/05/27 11:39:03

  Modified:src/modules/perl modperl_env.c
  Log:
  propagate scfg-SetEnv to %ENV
  
  Revision  ChangesPath
  1.21  +26 -18modperl-2.0/src/modules/perl/modperl_env.c
  
  Index: modperl_env.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- modperl_env.c 19 Nov 2001 00:07:28 -  1.20
  +++ modperl_env.c 27 May 2002 18:39:03 -  1.21
   -62,9 +62,34 
   modperl_env_tie(mg_flags);
   }
   
  +static void modperl_env_table_populate(pTHX_ apr_table_t *table)
  +{
  +HV *hv = ENVHV;
  +U32 mg_flags;
  +int i;
  +const apr_array_header_t *array;
  +apr_table_entry_t *elts;
  +
  +modperl_env_untie(mg_flags);
  +
  +array = apr_table_elts(table);
  +elts  = (apr_table_entry_t *)array-elts;
  +
  +for (i = 0; i  array-nelts; i++) {
  + if (!elts[i].key || !elts[i].val) {
  +continue;
  +}
  +modperl_env_hv_store(aTHX_ hv, elts[i]);
  +}
  +
  +modperl_env_tie(mg_flags);
  +}
  +
   void modperl_env_configure_server(pTHX_ apr_pool_t *p, server_rec *s)
   {
   /* XXX: propagate scfg-SetEnv to environ */
  +MP_dSCFG(s);
  +modperl_env_table_populate(aTHX_ scfg-SetEnv);
   }
   
   #define overlay_subprocess_env(r, tab) \
   -106,11 +131,6 
   void modperl_env_request_populate(pTHX_ request_rec *r)
   {
   MP_dRCFG;
  -HV *hv = ENVHV;
  -U32 mg_flags;
  -int i;
  -const apr_array_header_t *array;
  -apr_table_entry_t *elts;
   
   if (MpReqSETUP_ENV(rcfg)) {
   return;
   -124,19 +144,7 
   ap_add_common_vars(r);
   ap_add_cgi_vars(r);
   
  -modperl_env_untie(mg_flags);
  -
  -array = apr_table_elts(r-subprocess_env);
  -elts  = (apr_table_entry_t *)array-elts;
  -
  -for (i = 0; i  array-nelts; i++) {
  - if (!elts[i].key || !elts[i].val) {
  -continue;
  -}
  -modperl_env_hv_store(aTHX_ hv, elts[i]);
  -}
  -
  -modperl_env_tie(mg_flags);
  +modperl_env_table_populate(aTHX_ r-subprocess_env);
   
   #ifdef MP_COMPAT_1X
   modperl_env_default_populate(aTHX); /* reset GATEWAY_INTERFACE */
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_env.c

2002-05-27 Thread dougm

dougm   02/05/27 17:35:00

  Modified:src/modules/perl modperl_env.c
  Log:
  untabify
  
  Revision  ChangesPath
  1.23  +1 -1  modperl-2.0/src/modules/perl/modperl_env.c
  
  Index: modperl_env.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- modperl_env.c 27 May 2002 20:19:40 -  1.22
  +++ modperl_env.c 28 May 2002 00:35:00 -  1.23
   -76,7 +76,7 
   elts  = (apr_table_entry_t *)array-elts;
   
   for (i = 0; i  array-nelts; i++) {
  - if (!elts[i].key || !elts[i].val) {
  +if (!elts[i].key || !elts[i].val) {
   continue;
   }
   modperl_env_hv_store(aTHX_ hv, elts[i]);
  
  
  



cvs commit: modperl-2.0/xs/maps apache_functions.map

2002-05-24 Thread dougm

dougm   02/05/24 09:58:10

  Modified:xs/maps  apache_functions.map
  Log:
  rename Apache::Util::os_escape_path to Apache::Util::escape_path and
  reorder args path, p, partial, defaulting partial=TRUE
  
  Revision  ChangesPath
  1.53  +1 -1  modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- apache_functions.map  19 May 2002 23:59:52 -  1.52
  +++ apache_functions.map  24 May 2002 16:58:10 -  1.53
   -280,7 +280,7 
   !ap_rfc1413
ap_escape_html
#escape_uri
  - ap_os_escape_path
  + ap_os_escape_path | | path, p, partial=TRUE | escape_path
   !ap_explode_recent_gmt
   !ap_explode_recent_localtime
   !ap_recent_ctime
  
  
  



cvs commit: modperl-2.0/t/response/TestApache compat2.pm

2002-05-24 Thread dougm

dougm   02/05/24 09:58:42

  Modified:lib/Apache compat.pm
   t/response/TestApache compat2.pm
  Log:
  add Apache::Util::escape_uri compat function and tests
  
  Revision  ChangesPath
  1.50  +7 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- compat.pm 24 May 2002 16:49:29 -  1.49
  +++ compat.pm 24 May 2002 16:58:41 -  1.50
   -26,6 +26,7 
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
   use Apache::Response ();
  +use Apache::Util ();
   use Apache::Log ();
   use Apache::URI ();
   use APR::Table ();
   -414,6 +415,12 
   }
   
   *unescape_uri = \Apache::unescape_url;
  +
  +sub escape_uri {
  +my $path = shift;
  +my $r = Apache::compat::request('Apache::Util::escape_uri');
  +Apache::Util::escape_path($path, $r-pool);
  +}
   
   sub Apache::URI::parse {
   my($class, $r, $uri) = _;
  
  
  
  1.8   +9 -2  modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- compat2.pm19 May 2002 11:41:53 -  1.7
  +++ compat2.pm24 May 2002 16:58:42 -  1.8
   -24,7 +24,7 
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 39;
  +plan $r, tests = 41;
   
   $r-send_http_header('text/plain');
   
   -192,8 +192,15 
   }
   }
   
  -my $uri = http://foo.com/a%20file.html;;
  +my $uri = http://foo.com/a file.html;
  +(my $esc_uri = $uri) =~ s/ /\%20/g;
   my $uri2 = $uri;
  +
  +$uri = Apache::Util::escape_uri($uri);
  +$uri2 = Apache::Util::escape_path($uri2, $r-pool);
  +
  +ok t_cmp($esc_uri, $uri, Apache::Util::escape_uri);
  +ok t_cmp($esc_uri, $uri2, Apache::Util::escape_path);
   
   ok t_cmp(Apache::unescape_url($uri),
Apache::Util::unescape_uri($uri2),
  
  
  



cvs commit: modperl-2.0/xs/maps apache_functions.map

2002-05-24 Thread dougm

dougm   02/05/24 10:37:08

  Modified:lib/Apache compat.pm
   t/response/TestApache compat2.pm
   xs/maps  apache_functions.map
  Log:
  rename ht_time to format_time for the moment to provide 1.x ht_time
  compat since we now require a pool
  
  Revision  ChangesPath
  1.52  +12 -0 modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- compat.pm 24 May 2002 17:19:09 -  1.51
  +++ compat.pm 24 May 2002 17:37:08 -  1.52
   -440,6 +440,18 
   $html;
   }
   
  +sub ht_time {
  +my($t, $fmt, $gmt) = _;
  +
  +$t   ||= time;
  +$fmt ||= '%a, %d %b %Y %H:%M:%S %Z';
  +$gmt = 1 unless _ == 3;
  +
  +my $r = Apache::compat::request('Apache::Util::ht_time');
  +
  +return Apache::Util::format_time($t, $fmt, $gmt, $r-pool);
  +}
  +
   sub Apache::URI::parse {
   my($class, $r, $uri) = _;
   
  
  
  
  1.10  +6 -1  modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- compat2.pm24 May 2002 17:19:09 -  1.9
  +++ compat2.pm24 May 2002 17:37:08 -  1.10
   -24,7 +24,7 
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 42;
  +plan $r, tests = 43;
   
   $r-send_http_header('text/plain');
   
   -215,6 +215,11 
   
   ok t_cmp($esc_html, Apache::Util::escape_html($html),
Apache::Util::escape_html);
  +
  +
  +my $fmtdate = Apache::Util::ht_time();
  +
  +ok t_cmp($fmtdate, $fmtdate, Apache::Util::ht_time);
   
   OK;
   }
  
  
  
  1.55  +1 -1  modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- apache_functions.map  24 May 2002 17:19:09 -  1.54
  +++ apache_functions.map  24 May 2002 17:37:08 -  1.55
   -276,7 +276,7 
   -ap_set_deprecated
   
   MODULE=Apache::Util 
  - ap_ht_time
  + ap_ht_time | | t, fmt, gmt, p | format_time
   !ap_rfc1413
   !ap_escape_html | | s, p
#escape_uri
  
  
  



cvs commit: modperl-2.0/t/response/TestAPR util.pm

2002-05-24 Thread dougm

dougm   02/05/24 11:08:21

  Modified:t/response/TestAPR util.pm
  Log:
  adjust APR::password_validate test
  
  Revision  ChangesPath
  1.6   +4 -3  modperl-2.0/t/response/TestAPR/util.pm
  
  Index: util.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/util.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- util.pm   20 May 2002 22:27:17 -  1.5
  +++ util.pm   24 May 2002 18:08:21 -  1.6
   -9,6 +9,7 
   use APR::Util ();
   
   use Apache::Const -compile = 'OK';
  +use APR::Const -compile = 'EMISMATCH';
   
   sub handler {
   my $r = shift;
   -20,11 +21,11 
   #my $bytes = APR::generate_random_bytes($blen);
   #ok length($bytes) == $blen;
   
  -my $status = APR::password_validate(one, two);
  +ok ! APR::password_validate(one, two);
   
  -ok $status != 0;
  +my $status = APR::EMISMATCH;
   
  -my $str= APR::strerror($status);
  +my $str = APR::strerror($status);
   
   t_debug strerror=$str\n;
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_util.c modperl_util.h

2002-05-23 Thread dougm

dougm   02/05/23 15:18:48

  Modified:src/modules/perl modperl_util.c modperl_util.h
  Log:
  add modperl_perl_sv_setref_uv function
  
  Revision  ChangesPath
  1.42  +8 -0  modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- modperl_util.c19 May 2002 02:10:13 -  1.41
  +++ modperl_util.c23 May 2002 22:18:47 -  1.42
   -164,6 +164,14 
   return sv;
   }
   
  +/* XXX: sv_setref_uv does not exist in 5.6.x */
  +MP_INLINE SV *modperl_perl_sv_setref_uv(pTHX_ SV *rv,
  +const char *classname, UV uv)
  +{
  +sv_setuv(newSVrv(rv, classname), uv);
  +return rv;
  +}
  +
   apr_pool_t *modperl_sv2pool(pTHX_ SV *obj)
   {
   apr_pool_t *p = NULL;
  
  
  
  1.33  +3 -0  modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- modperl_util.h13 May 2002 03:17:54 -  1.32
  +++ modperl_util.h23 May 2002 22:18:47 -  1.33
   -59,6 +59,9 
   
   MP_INLINE SV *modperl_ptr2obj(pTHX_ char *classname, void *ptr);
   
  +MP_INLINE SV *modperl_perl_sv_setref_uv(pTHX_ SV *rv,
  +const char *classname, UV uv);
  +
   apr_pool_t *modperl_sv2pool(pTHX_ SV *obj);
   
   char *modperl_apr_strerror(apr_status_t rv);
  
  
  



cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm

2002-05-23 Thread dougm

dougm   02/05/23 15:19:52

  Modified:lib/ModPerl WrapXS.pm
  Log:
  UV is better than IV for apr_os_thread_t
  
  Revision  ChangesPath
  1.44  +1 -0  modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- WrapXS.pm 23 May 2002 00:43:35 -  1.43
  +++ WrapXS.pm 23 May 2002 22:19:52 -  1.44
   -521,6 +521,7 
   'Apache::RequestRec' = 'T_APACHEOBJ',
   'apr_time_t' = 'T_APR_TIME',
   'APR::Table' = 'T_HASHOBJ',
  +'APR::OS::Thread' = 'T_UVOBJ',
   );
   
   sub write_typemap {
  
  
  



cvs commit: modperl-2.0/t/conf modperl_extra.pl

2002-05-23 Thread dougm

dougm   02/05/23 15:40:48

  Modified:lib/APR  XSLoader.pm
   lib/Apache XSLoader.pm
   src/modules/perl mod_perl.c modperl_perl_includes.h
   t/conf   modperl_extra.pl
  Log:
  better workaround for 5.6.x DynaLoader vs. XSLoader issue
  
  Revision  ChangesPath
  1.3   +0 -1  modperl-2.0/lib/APR/XSLoader.pm
  
  Index: XSLoader.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/APR/XSLoader.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSLoader.pm   16 Apr 2002 23:29:18 -  1.2
  +++ XSLoader.pm   23 May 2002 22:40:47 -  1.3
   -3,7 +3,6 
   use strict;
   use warnings FATAL = 'all';
   
  -use DynaLoader (); #XXX workaround for 5.6.1 bug
   use XSLoader ();
   
   BEGIN {
  
  
  
  1.3   +0 -1  modperl-2.0/lib/Apache/XSLoader.pm
  
  Index: XSLoader.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/XSLoader.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSLoader.pm   16 Apr 2002 23:29:18 -  1.2
  +++ XSLoader.pm   23 May 2002 22:40:47 -  1.3
   -3,7 +3,6 
   use strict;
   use warnings FATAL = 'all';
   
  -use DynaLoader (); #XXX workaround for 5.6.1 bug
   use XSLoader ();
   
   BEGIN {
  
  
  
  1.118 +8 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- mod_perl.c23 May 2002 17:30:26 -  1.117
  +++ mod_perl.c23 May 2002 22:40:47 -  1.118
   -119,6 +119,14 
   
   newCONSTSUB(PL_defstash, Apache::MPM_IS_THREADED,
   newSViv(scfg-threaded_mpm));
  +
  +#ifdef MP_PERL_5_6_x
  +/* make sure DynaLoader is loaded before XSLoader
  + * to workaround bug in 5.6.1 that can trigger a segv
  + * when using modperl as a dso
  + */
  +modperl_require_module(aTHX_ DynaLoader, FALSE);
  +#endif
   }
   
   static void modperl_xs_init(pTHX)
  
  
  
  1.12  +5 -1  modperl-2.0/src/modules/perl/modperl_perl_includes.h
  
  Index: modperl_perl_includes.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_includes.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- modperl_perl_includes.h   11 May 2002 18:55:41 -  1.11
  +++ modperl_perl_includes.h   23 May 2002 22:40:47 -  1.12
   -40,7 +40,11 
   #include perl.h
   #include XSUB.h
   
  -#if (PERL_REVISION == 5)  (PERL_VERSION == 6)  (PERL_SUBVERSION == 1)
  +#if (PERL_REVISION == 5)  (PERL_VERSION == 6)
  +#   define MP_PERL_5_6_x
  +#endif
  +
  +#if defined(MP_PERL_5_6_x)  (PERL_SUBVERSION == 1)
   #   define MP_PERL_5_6_1
   #endif
   
  
  
  
  1.16  +3 -0  modperl-2.0/t/conf/modperl_extra.pl
  
  Index: modperl_extra.pl
  ===
  RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- modperl_extra.pl  18 May 2002 02:14:47 -  1.15
  +++ modperl_extra.pl  23 May 2002 22:40:47 -  1.16
   -1,3 +1,6 
  +use Socket (); #test DynaLoader vs. XSLoader workaround for 5.6.x
  +use IO::File ();
  +
   use Apache2 ();
   
   use ModPerl::Util (); #for CORE::GLOBAL::exit
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2002-05-23 Thread dougm

dougm   02/05/23 16:01:55

  Modified:src/modules/perl mod_perl.c
  Log:
  pp_srefgen workaround should be applied to 5.6.x not just 5.6.1
  
  Revision  ChangesPath
  1.119 +1 -1  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.118
  retrieving revision 1.119
  diff -u -r1.118 -r1.119
  --- mod_perl.c23 May 2002 22:40:47 -  1.118
  +++ mod_perl.c23 May 2002 23:01:55 -  1.119
   -42,7 +42,7 
   apr_pool_t *p = MP_boot_data.p; \
   server_rec *s = MP_boot_data.s
   
  -#if defined(USE_ITHREADS)  defined(MP_PERL_5_6_1)
  +#if defined(USE_ITHREADS)  defined(MP_PERL_5_6_x)
   #   define MP_REFGEN_FIXUP
   #endif
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-23 Thread dougm

dougm   02/05/23 16:36:31

  Modified:lib/Apache Build.pm
  Log:
  leave out libperl dep if it isnt found in the properl place
  
  Revision  ChangesPath
  1.93  +9 -5  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- Build.pm  23 May 2002 02:35:19 -  1.92
  +++ Build.pm  23 May 2002 23:36:31 -  1.93
   -940,11 +940,15 
   print $fh $self-canon_make_attr(lib_$type, $libs{$type});
   }
   
  -print $fh $self-canon_make_attr('libperl',
  - join '/',
  - $self-perl_config('archlibexp'),
  - 'CORE',
  - $self-perl_config('libperl'));
  +my $libperl = join '/',
  +  $self-perl_config('archlibexp'), 'CORE', $self-perl_config('libperl');
  +
  +#this is only used for deps, if libperl has changed, relink mod_perl.so
  +#not all perl dists put libperl where it should be, so just leave this
  +#out if it isn't in the proper place
  +if (-e $libperl) {
  +print $fh $self-canon_make_attr('libperl', $libperl);
  +}
   
   for my $method (qw(ccopts ldopts inc)) {
   print $fh $self-canon_make_attr($method, $self-$method());
  
  
  



cvs commit: modperl-2.0/t/response/TestModperl methodname.pm

2002-05-23 Thread dougm

dougm   02/05/23 19:33:06

  Modified:src/modules/perl modperl_mgv.c
   t/response/TestModperl methodname.pm
  Log:
  if Class-method syntax is used for a Perl*Handler, the :method
  attribute is not required (and we had been segfaulting without it)
  
  Revision  ChangesPath
  1.17  +4 -3  modperl-2.0/src/modules/perl/modperl_mgv.c
  
  Index: modperl_mgv.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_mgv.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- modperl_mgv.c 18 May 2002 01:49:37 -  1.16
  +++ modperl_mgv.c 24 May 2002 02:33:06 -  1.17
   -303,9 +303,10 
   if ((gv = gv_fetchmethod(stash, handler_name))  (cv = GvCV(gv))) {
   if (CvFLAGS(cv)  CVf_METHOD) { /* sub foo : method {}; */
   MpHandlerMETHOD_On(handler);
  -if (!handler-mgv_obj) {
  -modperl_mgv_new_name(handler-mgv_obj, p, HvNAME(stash));
  -}
  +}
  +
  +if (MpHandlerMETHOD(handler)  !handler-mgv_obj) {
  +modperl_mgv_new_name(handler-mgv_obj, p, HvNAME(stash));
   }
   
   handler-attrs = (U32)MP_CODE_ATTRS(cv);
  
  
  
  1.2   +2 -1  modperl-2.0/t/response/TestModperl/methodname.pm
  
  Index: methodname.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/methodname.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- methodname.pm 18 May 2002 02:07:42 -  1.1
  +++ methodname.pm 24 May 2002 02:33:06 -  1.2
   -10,7 +10,8 
   
   use TestModperl::method ();
   
  -sub response : method {
  +#no : method attribute required when - config syntax is used
  +sub response {
   TestModperl::method::handler(_);
   }
   
  
  
  



cvs commit: modperl-2.0 Changes

2002-05-23 Thread dougm

dougm   02/05/23 19:47:01

  Modified:.Changes
  Log:
  update Changes
  
  Revision  ChangesPath
  1.12  +32 -0 modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Changes   19 May 2002 11:41:53 -  1.11
  +++ Changes   24 May 2002 02:47:01 -  1.12
  @@ -10,7 +10,39 @@
   
   =item 1.99_02-dev
   
  +added Apache::MPM_IS_THREADED constant
  +
  +added compat function for Apache::Constants::SERVER_VERSION
  +
  +added Apache::Constants::export stub for compat
  +
  +added noop stubs for timeout functions removed from 2.0:
  +$r-{soft,hard,reset,kill}_timeout
  +
  +turned on PerlOptions +GlobalRequest by default for perl-script handler
  +unless it is explicitly turned off with PerlOptions -GlobalRequest
  +
  +added APR::OS::thread_current function
  +
  +added support for 1.x $r-subprocess_env functionality
  +
  +added support for $r-push_handlers(PerlHandler = ...)
  +
  +added support for $r-proxyreq to detect proxy requests
  +
  +$r-content_type($val) now calls ap_set_content_type underneath
  +
   add the err_header_out() wrapper to Apache::compat + corresponding tests
  +[Stas Bekman]
  +
  +fix $r-dir_config lookup of values set in the server context
  +
  +added Apache::REDIRECT shortcut constant
  +
  +various fixes for method handlers
  +
  +use Apache::ServerUtil in Apache::compat so Apache-server works in compat
  +mode [Dave Rolsky [EMAIL PROTECTED]]
   
   add Apache::Util::unescape_uri alias to Apache::unescape_url in Apache::compat
   
  
  
  



  1   2   3   4   5   6   7   8   >