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

2001-10-21 Thread dougm

dougm   01/10/21 18:38:06

  Modified:lib/Apache Build.pm
   lib/ModPerl MM.pm
  Log:
  win32 .xs -  .dll's need to link against libmodperl.lib
  
  Revision  ChangesPath
  1.68  +13 -0 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.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- Build.pm  2001/10/22 01:34:57 1.67
  +++ Build.pm  2001/10/22 01:38:06 1.68
  @@ -801,6 +801,19 @@
   $libs-($self);
   }
   
  +sub modperl_libs_MSWin32 {
  +my $self = shift;
  +#XXX: install/use libmodperl.lib for 3rd party xs modules
  +$self-{cwd}/src/modules/perl/libmodperl.lib;
  +}
  +
  +sub modperl_libs {
  +my $self = shift;
  +my $libs = \{modperl_libs_$^O};
  +return  unless defined $libs;
  +$libs-($self);
  +}
  +
   sub write_src_makefile {
   my $self = shift;
   my $code = ModPerl::Code-new;
  
  
  
  1.14  +1 -1  modperl-2.0/lib/ModPerl/MM.pm
  
  Index: MM.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- MM.pm 2001/10/22 00:10:13 1.13
  +++ MM.pm 2001/10/22 01:38:06 1.14
  @@ -63,7 +63,7 @@
   }
   }
   
  -my $libs = $build-apache_libs;
  +my $libs = join ' ', $build-apache_libs, $build-modperl_libs;
   my $ccflags = $build-perl_ccopts . $build-ap_ccopts;
   
   my @opts = (
  
  
  



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

2001-10-21 Thread dougm

dougm   01/10/21 20:41:38

  Modified:src/modules/perl modperl_const.h
   xs/APR/Const Const.xs
   xs/Apache/Const Const.xs
   xs/ModPerl/Const Const.xs
  Log:
  tweak {ModPerl,APR,Apache}::Const so XS_modperl_const_compile is not directly 
referenced outside ModPerl/Const.so
  
  Revision  ChangesPath
  1.2   +5 -0  modperl-2.0/src/modules/perl/modperl_const.h
  
  Index: modperl_const.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_const.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_const.h   2001/04/11 22:48:29 1.1
  +++ modperl_const.h   2001/10/22 03:41:37 1.2
  @@ -9,4 +9,9 @@
   
   XS(XS_modperl_const_compile);
   
  +#define MP_newModPerlConstXS(name) \
  +   newXS(name ::Const::compile, \
  + CvXSUB(get_cv(ModPerl::Const::compile, TRUE)), \
  + __FILE__)
  +
   #endif /* MODPERL_CONST_H */
  
  
  
  1.3   +2 -1  modperl-2.0/xs/APR/Const/Const.xs
  
  Index: Const.xs
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/Const/Const.xs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Const.xs  2001/06/17 03:39:19 1.2
  +++ Const.xs  2001/10/22 03:41:37 1.3
  @@ -6,4 +6,5 @@
   PROTOTYPES: disable
   
   BOOT:
  -newXS(APR::Const::compile, XS_modperl_const_compile, __FILE__);
  +MP_newModPerlConstXS(APR);
  +
  
  
  
  1.4   +1 -1  modperl-2.0/xs/Apache/Const/Const.xs
  
  Index: Const.xs
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Const/Const.xs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Const.xs  2001/06/16 19:14:09 1.3
  +++ Const.xs  2001/10/22 03:41:37 1.4
  @@ -6,4 +6,4 @@
   PROTOTYPES: disable
   
   BOOT:
  -newXS(Apache::Const::compile, XS_modperl_const_compile, __FILE__);
  +MP_newModPerlConstXS(Apache);
  
  
  
  1.4   +8 -0  modperl-2.0/xs/ModPerl/Const/Const.xs
  
  Index: Const.xs
  ===
  RCS file: /home/cvs/modperl-2.0/xs/ModPerl/Const/Const.xs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Const.xs  2001/06/16 19:14:08 1.3
  +++ Const.xs  2001/10/22 03:41:38 1.4
  @@ -1,6 +1,14 @@
   #include mod_perl.h
  +#include modperl_const.h
   
   MODULE = ModPerl::ConstPACKAGE = ModPerl::Const
   
   PROTOTYPES: disable
  +
  +BOOT:
  +#XXX:
  +#currently used just for {APR,Apache}/Const.{so,dll} to lookup
  +#XS_modperl_const_compile
  +#linking is fun.
  +newXS(ModPerl::Const::compile, XS_modperl_const_compile, __FILE__);
   
  
  
  



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

2001-10-21 Thread dougm

dougm   01/10/21 20:49:49

  Modified:lib/Apache Build.pm
  Log:
  cosmetic: add missing \t in win32 Makefile
  
  Revision  ChangesPath
  1.69  +1 -3  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.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Build.pm  2001/10/22 01:38:06 1.68
  +++ Build.pm  2001/10/22 03:49:49 1.69
  @@ -775,9 +775,7 @@
   my $self = shift;
   my $defs = $self-export_files_MSWin32;
   return $self-dynamic_link_header_default .
  -   $defs . 'EOF';
  - -out:$@
  -EOF
  +   \t$defs . ' -out:$@';
   }
   
   sub dynamic_link {
  
  
  



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

2001-10-21 Thread dougm

dougm   01/10/21 20:57:59

  Modified:lib/Apache Build.pm
  Log:
  clean win32 files (libmodperl.{lib,exp}
  
  Revision  ChangesPath
  1.70  +3 -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.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Build.pm  2001/10/22 03:49:49 1.69
  +++ Build.pm  2001/10/22 03:57:59 1.70
  @@ -899,7 +899,9 @@
-c $*.c  $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
   
   clean:
  - $(MODPERL_RM_F) *.a *.so *.xsc *$(MODPERL_OBJ_EXT) *.lo *.i *.s \
  + $(MODPERL_RM_F) *.a *.so *.xsc \
  + $(MODPERL_LIBNAME).exp $(MODPERL_LIBNAME).lib \
  + *$(MODPERL_OBJ_EXT) *.lo *.i *.s \
$(MODPERL_CLEAN_FILES) \
$(MODPERL_XS_CLEAN_FILES)
   
  
  
  



cvs commit: modperl-2.0/t/conf .cvsignore

2001-10-21 Thread dougm

dougm   01/10/21 20:58:26

  Modified:src/modules/perl .cvsignore
   t/conf   .cvsignore
  Log:
  ignores
  
  Revision  ChangesPath
  1.9   +2 -0  modperl-2.0/src/modules/perl/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/.cvsignore,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- .cvsignore2001/04/12 00:30:06 1.8
  +++ .cvsignore2001/10/22 03:58:26 1.9
  @@ -13,6 +13,8 @@
   *.a
   *.so
   *.i
  +*.exp
  +*.lib
   TAGS
   modperl_constants.h
   modperl_constants.c
  
  
  
  1.3   +1 -0  modperl-2.0/t/conf/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/conf/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore2001/09/12 17:11:48 1.2
  +++ .cvsignore2001/10/22 03:58:26 1.3
  @@ -1,5 +1,6 @@
   httpd.conf
   extra.conf
  +mime.types
   modperl_inc.pl
   modperl_startup.pl
   apache_test_config.pm
  
  
  



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

2001-10-21 Thread dougm

dougm   01/10/21 22:42:23

  Modified:src/modules/perl modperl_const.c
  Log:
  XSRETURN_YES in ModPerl::Const::import makes win32 blowup; XSRETURN_EMPTY is ok
  
  Revision  ChangesPath
  1.8   +1 -1  modperl-2.0/src/modules/perl/modperl_const.c
  
  Index: modperl_const.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_const.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_const.c   2001/05/04 03:44:23 1.7
  +++ modperl_const.c   2001/10/22 05:42:23 1.8
  @@ -106,5 +106,5 @@
   (void)modperl_const_compile(aTHX_ classname, arg, SvPV(ST(i), n_a));
   }
   
  -XSRETURN_YES;
  +XSRETURN_EMPTY;
   }
  
  
  



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

2001-10-20 Thread dougm

dougm   01/10/20 22:24:52

  Modified:lib/Apache Build.pm
  Log:
  avoid use of unintialized value
  
  Revision  ChangesPath
  1.60  +12 -2 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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- Build.pm  2001/10/21 04:47:47 1.59
  +++ Build.pm  2001/10/21 05:24:52 1.60
  @@ -707,6 +707,11 @@
 (qw(cc cpprun rm ranlib lib_ext obj_ext cccdlflags lddlflags),
  values %perl_config_pm_alias);
   
  +sub mm_replace {
  +my $val = shift;
  +$$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
  +}
  +
   sub make_tools {
   my($self, $fh) = @_;
   
  @@ -725,8 +730,13 @@
   
   for (qw(rm_f mv ld ar)) {
   my $val = $mm-{\U$_};
  -$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
  -print $fh $self-canon_make_attr($_ = $val || $Config{$_});
  +if ($val) {
  +mm_replace(\$val);
  +}
  +else {
  +$val = $Config{$_};
  +}
  +print $fh $self-canon_make_attr($_ = $val);
   }
   }
   
  
  
  



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

2001-10-20 Thread dougm

dougm   01/10/20 22:46:20

  Modified:lib/ModPerl WrapXS.pm
  Log:
  leave certain (e.g. ithreads only) functions out of the export lists
  
  Revision  ChangesPath
  1.28  +15 -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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- WrapXS.pm 2001/10/21 05:29:46 1.27
  +++ WrapXS.pm 2001/10/21 05:46:20 1.28
  @@ -640,6 +640,18 @@
  $val\n;
   }
   
  +#C::Scan doesnt always pickup static __inline__ of mpxs_ functions
  +#certain functions are only defined #ifdef USE_ITHREADS
  +#XXX might need a modperl_ithreads.{def,exp} if any xs modules reference
  +#these functions
  +
  +my $skip_exports = join '|', qw{
  +mpxs_
  +modperl_cmd_interp_
  +modperl_interp_ modperl_list_ modperl_tipool_
  +modperl_mgv_
  +};
  +
   sub write_export_file {
   my($self, $ext) = @_;
   
  @@ -661,9 +673,11 @@
   
   for my $entry (@$table) {
   next if $self-func_is_static($entry);
  +my $name = $entry-{name};
  +next if $name =~ /^($skip_exports)/o;
   my $fh = $self-func_is_inline($entry) ?
 $exp_inline_fh : $exp_fh;
  -print $fh $self-$format($entry-{name});
  +print $fh $self-$format($name);
   }
   
   for my $fh ($exp_fh, $exp_inline_fh) {
  
  
  



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

2001-10-20 Thread dougm

dougm   01/10/20 19:50:15

  Modified:lib/Apache Build.pm
  Log:
  use more Config.pm/MakeMaker variables to make win32 happier
  
  Revision  ChangesPath
  1.55  +8 -8  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.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- Build.pm  2001/10/20 18:59:28 1.54
  +++ Build.pm  2001/10/21 02:50:15 1.55
  @@ -704,7 +704,7 @@
   my $mm_replace = join '|', keys %perl_config_pm_alias;
   
   my @perl_config_pm =
  -  (qw(cc cpprun ld ar rm ranlib lib_ext dlext cccdlflags lddlflags),
  +  (qw(cc cpprun rm ranlib lib_ext dlext obj_ext cccdlflags lddlflags),
  values %perl_config_pm_alias);
   
   sub make_tools {
  @@ -723,7 +723,7 @@
   my $mm = bless {}, 'MM';
   $mm-init_others;
   
  -for (qw(RM_F MV)) {
  +for (qw(RM_F MV LD AR)) {
   my $val = $mm-{$_};
   $val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
   print $fh $self-canon_make_attr($_ = $val);
  @@ -797,13 +797,13 @@
$(MODPERL_PIC_OBJS) $(MODPERL_LDOPTS)
$(MODPERL_RANLIB) $@
   
  -.SUFFIXES: .xs .c .o .lo .i .s
  +.SUFFIXES: .xs .c $(MODPERL_OBJ_EXT) .lo .i .s
   
   .c.lo:
$(MODPERL_CC) $(MODPERL_CCFLAGS_SHLIB) \
  - -c $  $(MODPERL_MV) $*.o $*.lo
  + -c $  $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
   
  -.c.o:
  +.c$(MODPERL_OBJ_EXT):
$(MODPERL_CC) $(MODPERL_CCFLAGS) -c $
   
   .c.i:
  @@ -815,17 +815,17 @@
   .xs.c:
$(MODPERL_XSUBPP) $*.xs $@
   
  -.xs.o:
  +.xs$(MODPERL_OBJ_EXT):
$(MODPERL_XSUBPP) $*.xs $*.c
$(MODPERL_CC) $(MODPERL_CCFLAGS) -c $*.c
   
   .xs.lo:
$(MODPERL_XSUBPP) $*.xs $*.c
$(MODPERL_CC) $(MODPERL_CCFLAGS_SHLIB) \
  - -c $*.c  $(MODPERL_MV) $*.o $*.lo
  + -c $*.c  $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
   
   clean:
  - $(MODPERL_RM_F) *.a *.so *.xsc *.o *.lo *.i *.s \
  + $(MODPERL_RM_F) *.a *.so *.xsc *$(MODPERL_OBJ_EXT) *.lo *.i *.s \
$(MODPERL_CLEAN_FILES) \
$(MODPERL_XS_CLEAN_FILES)
   
  
  
  



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

2001-10-20 Thread dougm

dougm   01/10/20 22:48:13

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.38  +1 -43 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.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- FunctionTable.pm  2001/10/21 05:05:50 1.37
  +++ FunctionTable.pm  2001/10/21 05:48:13 1.38
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Sat Oct 20 22:13:10 2001
  +# !  Sat Oct 20 22:58:03 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -2955,48 +2955,6 @@
 {
   'type' = 'U32',
   'name' = 'hash'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'void',
  -'name' = 'modperl_perl_ids_get',
  -'args' = [
  -  {
  -'type' = 'modperl_perl_ids_t *',
  -'name' = 'ids'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'void',
  -'name' = 'modperl_perl_init_ids',
  -'args' = [
  -  {
  -'type' = 'PerlInterpreter *',
  -'name' = 'my_perl'
  -  },
  -  {
  -'type' = 'modperl_perl_ids_t *',
  -'name' = 'ids'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'modperl_perl_init_ids_mip',
  -'args' = [
  -  {
  -'type' = 'PerlInterpreter *',
  -'name' = 'my_perl'
  -  },
  -  {
  -'type' = 'modperl_interp_pool_t *',
  -'name' = 'mip'
  -  },
  -  {
  -'type' = 'void *',
  -'name' = 'data'
 }
   ]
 },
  
  
  



cvs commit: modperl-2.0/pod modperl_dev.pod

2001-10-20 Thread dougm

dougm   01/10/20 11:30:40

  Modified:lib/ModPerl BuildOptions.pm
   pod  modperl_dev.pod
  Log:
  default to building mod_perl as a dso
  
  Revision  ChangesPath
  1.10  +4 -1  modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BuildOptions.pm   2001/09/08 18:00:49 1.9
  +++ BuildOptions.pm   2001/10/20 18:30:39 1.10
  @@ -23,6 +23,8 @@
   if ($build-{MP_DEBUG} and $build-{MP_USE_GTOP}) {
   $build-{MP_USE_GTOP} = 0 unless $build-find_dlfile('gtop');
   }
  +
  +$build-{MP_USE_DSO} = 1 unless $build-{MP_USE_STATIC};
   }
   
   sub parse {
  @@ -151,7 +153,8 @@
   MAINTAINER   Maintainer mode: DEBUG=1 -DAP_DEBUG -Wall ...
   CCOPTS   Add to compiler flags
   TRACETurn on tracing
  -USE_DSO  Build mod_perl as a dso
  +USE_DSO  Build mod_perl as a dso
  +USE_STATIC   Build mod_perl static
   INST_APACHE2 Install *.pm relative to Apache2/ directory
   PROMPT_DEFAULT   Accept default value for all would-be prompts
   OPTIONS_FILE Read options from given file
  
  
  
  1.43  +6 -2  modperl-2.0/pod/modperl_dev.pod
  
  Index: modperl_dev.pod
  ===
  RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- modperl_dev.pod   2001/10/19 02:17:10 1.42
  +++ modperl_dev.pod   2001/10/20 18:30:40 1.43
  @@ -66,7 +66,7 @@
   =head2 Create the build environment
   
 % cd modperl-2.0
  -  % perl Makefile.PL MP_GENERATE_XS=1 MP_USE_DSO=1 \
  +  % perl Makefile.PL MP_GENERATE_XS=1 \
   MP_APXS=$apache_prefix/bin/apxs  make
   
   Ioptions an optional list of (key,value) pairs.
  @@ -85,7 +85,11 @@
   
   =item MP_USE_DSO
   
  -Build mod_perl as a DSO
  +Build mod_perl as a DSO (default)
  +
  +=item MP_USE_STATIC
  +
  +Build mod_perl static
   
   =item MP_STATIC_EXTS
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_handler.h modperl_perl_global.h modperl_types.h

2001-10-19 Thread dougm

dougm   01/10/19 09:40:45

  Modified:src/modules/perl modperl_handler.h modperl_perl_global.h
modperl_types.h
  Log:
  get rid of hpux warnings:
  Dangling comma not allowed by ANSI standard, ignored.
  
  Revision  ChangesPath
  1.8   +1 -1  modperl-2.0/src/modules/perl/modperl_handler.h
  
  Index: modperl_handler.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_handler.h 2001/04/19 17:57:15 1.7
  +++ modperl_handler.h 2001/10/19 16:40:44 1.8
  @@ -4,7 +4,7 @@
   typedef enum {
   MP_HANDLER_ACTION_GET,
   MP_HANDLER_ACTION_PUSH,
  -MP_HANDLER_ACTION_SET,
  +MP_HANDLER_ACTION_SET
   } modperl_handler_action_e;
   
   #define modperl_handler_array_new(p) \
  
  
  
  1.10  +1 -1  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_perl_global.h 2001/10/13 19:02:03 1.9
  +++ modperl_perl_global.h 2001/10/19 16:40:44 1.10
  @@ -9,7 +9,7 @@
   } modperl_modglobal_key_t;
   
   typedef enum {
  -MP_MODGLOBAL_END,
  +MP_MODGLOBAL_END
   } modperl_modglobal_key_e;
   
   typedef struct {
  
  
  
  1.52  +2 -2  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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- modperl_types.h   2001/09/28 19:51:40 1.51
  +++ modperl_types.h   2001/10/19 16:40:44 1.52
  @@ -107,7 +107,7 @@
   MP_INTERP_SCOPE_HANDLER,
   MP_INTERP_SCOPE_SUBREQUEST,
   MP_INTERP_SCOPE_REQUEST,
  -MP_INTERP_SCOPE_CONNECTION,
  +MP_INTERP_SCOPE_CONNECTION
   } modperl_interp_scope_e;
   
   typedef struct {
  @@ -176,7 +176,7 @@
   
   typedef enum {
   MP_INPUT_FILTER_MODE,
  -MP_OUTPUT_FILTER_MODE,
  +MP_OUTPUT_FILTER_MODE
   } modperl_filter_mode_e;
   
   typedef struct {
  
  
  



cvs commit: modperl-2.0 Makefile.PL

2001-10-17 Thread dougm

dougm   01/10/17 10:38:07

  Modified:.Makefile.PL
  Log:
  undo undo of explicit DIR in WriteMakefile; problem seems to have gone away
  
  Revision  ChangesPath
  1.45  +1 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- Makefile.PL   2001/10/15 16:50:47 1.44
  +++ Makefile.PL   2001/10/17 17:38:07 1.45
  @@ -27,7 +27,7 @@
   ModPerl::MM::WriteMakefile(
   NAME = 'mod_perl',
   VERSION = $VERSION,
  -#DIR = get_dirs_with_makefile(@remote_makefile_dirs),
  +DIR = get_dirs_with_makefile(@remote_makefile_dirs),
   macro = {
   MODPERL_SRC   = $code-path,
   PERL  = $build-perl_config('perlpath'),
  
  
  



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

2001-10-16 Thread dougm

dougm   01/10/16 20:20:02

  Added:   t/modperl interp.t
   t/response/TestModperl interp.pm
  Log:
  add a test that uses the same interpreter each time
  
  Revision  ChangesPath
  1.1  modperl-2.0/t/modperl/interp.t
  
  Index: interp.t
  ===
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  use Apache::TestRequest;
  
  use constant INTERP = 'X-PerlInterpreter';
  
  plan tests = 3, \have_lwp;
  
  my $url = /TestModperl::interp;
  
  #request an interpreter instance
  my $res = GET $url, INTERP, 'init';
  
  #use this interpreter id to select the same interpreter in requests below
  my $interp = $res-header(INTERP);
  
  print using interp: $interp\n;
  
  print $res-content;
  
  my $found_interp = ;
  my $find_interp = sub {
  $res-code == 200 and (($found_interp = $res-header(INTERP)) eq $interp);
  };
  
  for (1..2) {
  my $times = 0;
  
  do {
  #loop until we get a response from our interpreter instance
  $res = GET $url, INTERP, $interp;
  
  #trace info
  unless ($find_interp-()) {
  print $found_interp ?
wrong interpreter: $found_interp\n :
no interpreter\n;
  }
  
  if ($times++  15) { #prevent endless loop
  die unable to find interp $interp\n;
  }
  } while (not $find_interp-());
  
  print $res-content; #ok $value++
  }
  
  
  
  
  1.1  modperl-2.0/t/response/TestModperl/interp.pm
  
  Index: interp.pm
  ===
  package TestModperl::interp;
  
  use warnings FATAL = 'all';
  use strict;
  
  use APR::UUID ();
  use Apache::Const -compile = qw(OK NOT_FOUND SERVER_ERROR);
  
  use constant INTERP = 'X-PerlInterpreter';
  
  my $interp_id = ;
  my $value = 0;
  
  sub fixup {
  my $r = shift;
  my $interp = $r-headers_in-get(INTERP);
  my $rc = Apache::OK;
  
  unless ($interp) {
  #shouldn't be requesting this without an INTERP header
  return Apache::SERVER_ERROR;
  }
  
  my $id = $interp_id;
  if ($interp eq 'init') { #first request for an interpreter instance
  #unique id for this instance
  $interp_id = $id = APR::UUID-new-format;
  $value = 0; #reset our global data
  }
  elsif ($interp ne $interp_id) {
  #this is not the request interpreter instance
  $rc = Apache::NOT_FOUND;
  }
  
  #so client can save the created instance id or check the existing value
  $r-headers_out-set(INTERP, $id);
  
  return $rc;
  }
  
  sub handler {
  my $r = shift;
  
  #test the actual global data
  $value++;
  $r-puts(ok $value\n);
  
  Apache::OK;
  }
  
  1;
  __END__
  PerlFixupHandler TestModperl::interp::fixup
  
  
  



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

2001-10-13 Thread dougm

dougm   01/10/13 11:55:03

  Modified:src/modules/perl modperl_perl_global.c modperl_perl_global.h
  Log:
  s/hv_fetch/hv_fetch_he/g
  
  Revision  ChangesPath
  1.10  +24 -9 modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_perl_global.c 2001/10/08 21:09:08 1.9
  +++ modperl_perl_global.c 2001/10/13 18:55:03 1.10
  @@ -12,8 +12,14 @@
   
   /* XXX: PL_modglobal thingers might be useful elsewhere */
   
  +#define MP_MODGLOBAL_FETCH(gkey) \
  +hv_fetch_he(PL_modglobal, (char *)gkey-val, gkey-len, gkey-hash)
  +
  +#define MP_MODGLOBAL_STORE_HV(gkey) \
  +(HV*)*hv_store(PL_modglobal, gkey-val, gkey-len, (SV*)newHV(), gkey-hash)
  +
   #define MP_MODGLOBAL_ENT(key) \
  -{key, ModPerl:: key, (sizeof(ModPerl::)-1)+(sizeof(key)-1)}
  +{key, ModPerl:: key, (sizeof(ModPerl::)-1)+(sizeof(key)-1), 0}
   
   static modperl_modglobal_key_t MP_modglobal_keys[] = {
   MP_MODGLOBAL_ENT(END),
  @@ -36,18 +42,18 @@
   static AV *modperl_perl_global_avcv_fetch(pTHX_ modperl_modglobal_key_t *gkey,
 const char *package, I32 packlen)
   {
  -SV **svp = hv_fetch(PL_modglobal, gkey-val, gkey-len, FALSE);
  +HE *he = MP_MODGLOBAL_FETCH(gkey);
   HV *hv;
   
  -if (!(svp  (hv = (HV*)*svp))) {
  +if (!(he  (hv = (HV*)HeVAL(he {
   return Nullav;
   }
   
  -if (!(svp = hv_fetch(hv, package, packlen, FALSE))) {
  +if (!(he = hv_fetch_he(hv, (char *)package, packlen, 0))) {
   return Nullav;
   }
   
  -return (AV*)*svp;
  +return (AV*)HeVAL(he);
   }
   
   void modperl_perl_global_avcv_call(pTHX_ modperl_modglobal_key_t *gkey,
  @@ -76,6 +82,7 @@
   
   static int modperl_perl_global_avcv_set(pTHX_ SV *sv, MAGIC *mg)
   {
  +HE *he;
   HV *hv;
   AV *mav, *av = (AV*)sv;
   const char *package = HvNAME(PL_curstash);
  @@ -83,11 +90,19 @@
   modperl_modglobal_key_t *gkey =
   (modperl_modglobal_key_t *)mg-mg_ptr;
   
  -hv = (HV*)*hv_fetch(PL_modglobal, gkey-val, gkey-len, TRUE);
  -(void)SvUPGRADE((SV*)hv, SVt_PVHV);
  +if ((he = MP_MODGLOBAL_FETCH(gkey))) {
  +hv = (HV*)HeVAL(he);
  +}
  +else {
  +hv = MP_MODGLOBAL_STORE_HV(gkey);
  +}
   
  -mav = (AV*)*hv_fetch(hv, package, packlen, TRUE);
  -(void)SvUPGRADE((SV*)mav, SVt_PVAV);
  +if ((he = hv_fetch_he(hv, (char *)package, packlen, 0))) {
  +mav = (AV*)HeVAL(he);
  +}
  +else {
  +mav = (AV*)*hv_store(hv, package, packlen, (SV*)newAV(), 0);
  +}
   
   /* $cv = pop @av */
   sv = AvARRAY(av)[AvFILLp(av)];
  
  
  
  1.8   +1 -0  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_perl_global.h 2001/10/07 22:07:15 1.7
  +++ modperl_perl_global.h 2001/10/13 18:55:03 1.8
  @@ -5,6 +5,7 @@
   const char *name;
   const char *val;
   I32 len;
  +U32 hash;
   } modperl_modglobal_key_t;
   
   typedef enum {
  
  
  



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

2001-10-13 Thread dougm

dougm   01/10/13 12:02:03

  Modified:src/modules/perl mod_perl.c modperl_perl_global.c
modperl_perl_global.h
  Log:
  calculate hash of MP_modglobal_keys keys at startup
  
  Revision  ChangesPath
  1.91  +1 -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.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- mod_perl.c2001/10/11 04:47:30 1.90
  +++ mod_perl.c2001/10/13 19:02:03 1.91
  @@ -332,6 +332,7 @@
   ap_add_version_component(pconf,
Perl_form(aTHX_ Perl/v%vd, PL_patchlevel));
   modperl_mgv_hash_handlers(pconf, s);
  +modperl_modglobal_hash_keys();
   #ifdef USE_ITHREADS
   modperl_init_clones(s, pconf);
   #endif
  
  
  
  1.11  +10 -0 modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_perl_global.c 2001/10/13 18:55:03 1.10
  +++ modperl_perl_global.c 2001/10/13 19:02:03 1.11
  @@ -26,6 +26,16 @@
   { NULL },
   };
   
  +void modperl_modglobal_hash_keys(void)
  +{
  +modperl_modglobal_key_t *gkey = MP_modglobal_keys;
  +
  +while (gkey-name) {
  +PERL_HASH(gkey-hash, gkey-val, gkey-len);
  +gkey++;
  +}
  +}
  +
   modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name)
   {
   int i;
  
  
  
  1.9   +2 -0  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_perl_global.h 2001/10/13 18:55:03 1.8
  +++ modperl_perl_global.h 2001/10/13 19:02:03 1.9
  @@ -49,6 +49,8 @@
   modperl_perl_global_svpv_t rs;
   } modperl_perl_globals_t;
   
  +void modperl_modglobal_hash_keys(void);
  +
   modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name);
   
   void modperl_perl_global_request_save(pTHX_ request_rec *r);
  
  
  



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

2001-10-13 Thread dougm

dougm   01/10/13 12:05:16

  Modified:src/modules/perl modperl_perl_global.c
  Log:
  use consistent style to iterate over MP_modglobal_keys
  
  Revision  ChangesPath
  1.12  +5 -4  modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- modperl_perl_global.c 2001/10/13 19:02:03 1.11
  +++ modperl_perl_global.c 2001/10/13 19:05:16 1.12
  @@ -38,12 +38,13 @@
   
   modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name)
   {
  -int i;
  +modperl_modglobal_key_t *gkey = MP_modglobal_keys;
   
  -for (i=0; MP_modglobal_keys[i].name; i++) {
  -if (strEQ(MP_modglobal_keys[i].name, name)) {
  -return MP_modglobal_keys[i];
  +while (gkey-name) {
  +if (strEQ(gkey-name, name)) {
  +return gkey;
   }
  +gkey++;
   }
   
   return NULL;
  
  
  



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

2001-10-13 Thread dougm

dougm   01/10/13 12:12:17

  Modified:src/modules/perl modperl_env.c
  Log:
  s/modperl_env_const_vars/MP_env_const_vars/g
  
  Revision  ChangesPath
  1.14  +4 -4  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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- modperl_env.c 2001/10/13 19:11:32 1.13
  +++ modperl_env.c 2001/10/13 19:12:17 1.14
  @@ -31,7 +31,7 @@
   #define MP_ENV_ENT(k,v) \
   { k, sizeof(k)-1, v, sizeof(v)-1, 0 }
   
  -static modperl_env_ent_t modperl_env_const_vars[] = {
  +static modperl_env_ent_t MP_env_const_vars[] = {
   #ifdef MP_COMPAT_1X
   MP_ENV_ENT(GATEWAY_INTERFACE, CGI-Perl/1.1),
   #endif
  @@ -41,7 +41,7 @@
   
   void modperl_env_hash_keys(void)
   {
  -modperl_env_ent_t *ent = modperl_env_const_vars;
  +modperl_env_ent_t *ent = MP_env_const_vars;
   
   while (ent-key) {
   PERL_HASH(ent-hash, ent-key, ent-klen);
  @@ -69,8 +69,8 @@
   
   modperl_env_untie(mg_flags);
   
  -for (i = 0; modperl_env_const_vars[i].key; i++) {
  -const modperl_env_ent_t *ent = modperl_env_const_vars[i];
  +for (i = 0; MP_env_const_vars[i].key; i++) {
  +const modperl_env_ent_t *ent = MP_env_const_vars[i];
   
   hv_store(hv, ent-key, ent-klen,
newSVpvn(ent-val, ent-vlen), ent-hash);
  
  
  



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

2001-10-13 Thread dougm

dougm   01/10/13 12:14:58

  Modified:src/modules/perl modperl_env.c
  Log:
  use consistent style to iterate over MP_env_const_vars
  
  Revision  ChangesPath
  1.15  +3 -4  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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- modperl_env.c 2001/10/13 19:12:17 1.14
  +++ modperl_env.c 2001/10/13 19:14:58 1.15
  @@ -63,17 +63,16 @@
   
   void modperl_env_default_populate(pTHX)
   {
  +modperl_env_ent_t *ent = MP_env_const_vars;
   HV *hv = ENVHV;
   U32 mg_flags;
  -int i;
   
   modperl_env_untie(mg_flags);
   
  -for (i = 0; MP_env_const_vars[i].key; i++) {
  -const modperl_env_ent_t *ent = MP_env_const_vars[i];
  -
  +while (ent-key) {
   hv_store(hv, ent-key, ent-klen,
newSVpvn(ent-val, ent-vlen), ent-hash);
  +ent++;
   }
   
   modperl_env_tie(mg_flags);
  
  
  



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

2001-10-12 Thread dougm

dougm   01/10/12 20:22:15

  Modified:src/modules/perl modperl_mgv.c modperl_util.c modperl_util.h
  Log:
  making modperl_perl_hv_fetch_he a public function
  
  Revision  ChangesPath
  1.15  +0 -33 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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- modperl_mgv.c 2001/04/25 03:13:58 1.14
  +++ modperl_mgv.c 2001/10/13 03:22:15 1.15
  @@ -17,39 +17,6 @@
   #define modperl_mgv_new_namen(mgv, p, n) \
   modperl_mgv_new_w_name(mgv, p, n, 0)
   
  -/*
  - * similar to hv_fetch_ent, but takes string key and key len rather than SV
  - * also skips magic and utf8 fu, since we are only dealing with symbol tables
  - */
  -static HE *S_hv_fetch_he(pTHX_ HV *hv,
  - register char *key,
  - register I32 klen,
  - register U32 hash)
  -{
  -register XPVHV *xhv;
  -register HE *entry;
  -
  -xhv = (XPVHV *)SvANY(hv);
  -if (!xhv-xhv_array) {
  -return 0;
  -}
  -entry = ((HE**)xhv-xhv_array)[hash  (I32) xhv-xhv_max];
  -
  -for (; entry; entry = HeNEXT(entry)) {
  -if (HeHASH(entry) != hash)
  -continue;
  -if (HeKLEN(entry) != klen)
  -continue;
  -if (HeKEY(entry) != key  memNE(HeKEY(entry),key,klen))
  -continue;
  -return entry;
  -}
  -
  -return 0;
  -}
  -
  -#define hv_fetch_he(hv,k,l,h) S_hv_fetch_he(aTHX_ hv,k,l,h)
  -
   int modperl_mgv_equal(modperl_mgv_t *mgv1,
 modperl_mgv_t *mgv2)
   {
  
  
  
  1.26  +35 -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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- modperl_util.c2001/10/08 23:34:07 1.25
  +++ modperl_util.c2001/10/13 03:22:15 1.26
  @@ -399,6 +399,41 @@
   }
   }
   
  +/*
  + * similar to hv_fetch_ent, but takes string key and key len rather than SV
  + * also skips magic and utf8 fu, since we are only dealing with internal tables
  + */
  +HE *modperl_perl_hv_fetch_he(pTHX_ HV *hv,
  + register char *key,
  + register I32 klen,
  + register U32 hash)
  +{
  +register XPVHV *xhv;
  +register HE *entry;
  +
  +xhv = (XPVHV *)SvANY(hv);
  +if (!xhv-xhv_array) {
  +return 0;
  +}
  +
  +entry = ((HE**)xhv-xhv_array)[hash  (I32)xhv-xhv_max];
  +
  +for (; entry; entry = HeNEXT(entry)) {
  +if (HeHASH(entry) != hash) {
  +continue;
  +}
  +if (HeKLEN(entry) != klen) {
  +continue;
  +}
  +if (HeKEY(entry) != key  memNE(HeKEY(entry), key, klen)) {
  +continue;
  +}
  +return entry;
  +}
  +
  +return 0;
  +}
  +
   void modperl_perl_call_list(pTHX_ AV *subs, const char *name)
   {
   I32 i, oldscope = PL_scopestack_ix;
  
  
  
  1.25  +8 -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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- modperl_util.h2001/10/08 23:34:07 1.24
  +++ modperl_util.h2001/10/13 03:22:15 1.25
  @@ -68,6 +68,14 @@
   
   MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src);
   
  +HE *modperl_perl_hv_fetch_he(pTHX_ HV *hv,
  + register char *key,
  + register I32 klen,
  + register U32 hash);
  +
  +#define hv_fetch_he(hv,k,l,h) \
  +modperl_perl_hv_fetch_he(aTHX_ hv, k, l, h)
  +
   void modperl_perl_call_list(pTHX_ AV *subs, const char *name);
   
   void modperl_perl_exit(pTHX_ int status);
  
  
  



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

2001-10-11 Thread dougm

dougm   01/10/11 08:38:23

  Modified:src/modules/perl modperl_config.h
  Log:
  add MP_dTHX macro
  
  Revision  ChangesPath
  1.28  +10 -0 modperl-2.0/src/modules/perl/modperl_config.h
  
  Index: modperl_config.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- modperl_config.h  2001/08/08 16:20:31 1.27
  +++ modperl_config.h  2001/10/11 15:38:23 1.28
  @@ -59,6 +59,16 @@
   #   define MP_dSCFG_dTHX dTHXa(scfg-perl)
   #endif
   
  +/* hopefully this macro will not need to be used often */
  +#ifdef USE_ITHREADS
  +#   define MP_dTHX \
  +modperl_interp_t *interp = \
  +   modperl_interp_select(r, r-connection, r-server); \
  +dTHXa(interp-perl)
  +#else
  +#   define MP_dTHX dNOOP
  +#endif
  +
   int modperl_config_apply_PerlModule(server_rec *s,
   modperl_config_srv_t *scfg,
   PerlInterpreter *perl, apr_pool_t *p);
  
  
  



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

2001-10-11 Thread dougm

dougm   01/10/11 12:32:43

  Modified:lib/Apache Build.pm
  Log:
  fixup ldopts for hpux
  
  Revision  ChangesPath
  1.48  +8 -0  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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Build.pm  2001/09/13 02:01:31 1.47
  +++ Build.pm  2001/10/11 19:32:43 1.48
  @@ -127,6 +127,14 @@
   my $ldopts = ExtUtils::Embed::ldopts();
   chomp $ldopts;
   
  +if ($^O eq 'hpux' and $Config{ld} eq 'ld') {
  +while ($ldopts =~ s/-Wl,(\S+)/$1/) {
  +my $cp = $1;
  +(my $repl = $cp) =~ s/,/ /g;
  +$ldopts =~ s/\Q$cp/$repl/;
  +}
  +}
  +
   if ($self-{MP_USE_GTOP}) {
   $ldopts .= $self-gtop_ldopts;
   }
  
  
  



cvs commit: modperl-2.0 Makefile.PL

2001-10-11 Thread dougm

dougm   01/10/11 12:48:08

  Modified:.Makefile.PL
  Log:
  add os specific sanity checks starting with hpux
  
  Revision  ChangesPath
  1.43  +19 -0 modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Makefile.PL   2001/10/11 03:29:32 1.42
  +++ Makefile.PL   2001/10/11 19:48:08 1.43
  @@ -181,6 +181,7 @@
   
   $build-lib_check('gdbm');
   malloc_check();
  +os_check();
   }
   
   sub malloc_check {
  @@ -200,6 +201,24 @@
   }
   }
   
  +sub os_check {
  +my $check = \{os_check_$^O};
  +return unless defined $check;
  +$check-()
  +}
  +
  +sub os_check_hpux {
  +my $ccflags = $build-perl_config('ccflags');
  +
  +if ($build-{MP_USE_DSO} and $Config{ld} eq 'ld') {
  +unless ($ccflags =~ /\+z/i) {
  +$build-phat_warn(EOF);
  +mod_perl is unlikely to link with your libperl, suggestions:
  +*) Rebuild Perl with Configure -Accflags=+Z ...
  +EOF
  +}
  +}
  +}
   
   # by default only Makefile.PL's in the first level sub-dirs are
   # discovered. If you want to reach a Makefile.PL's in some remote
  
  
  



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

2001-10-11 Thread dougm

dougm   01/10/11 17:23:51

  Modified:lib/Apache Build.pm
  Log:
  fixup hpux cflags
  
  Revision  ChangesPath
  1.49  +16 -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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Build.pm  2001/10/11 19:32:43 1.48
  +++ Build.pm  2001/10/12 00:23:50 1.49
  @@ -178,10 +178,25 @@
   $ccopts;
   }
   
  +sub ccopts_hpux {
  +my $cflags = shift;
  +#return if $Config{cc} eq 'gcc'; #XXX?
  +return if $$cflags =~ /(-Ae|\+e)/;
  +$$cflags .=  -Ae;
  +}
  +
   sub ccopts {
   my($self) = @_;
  +
  +my $cflags = $self-strip_lfs(ExtUtils::Embed::ccopts()) .
  +  $self-ap_ccopts;
  +
  +my $fixup = \{ccopts_$^O};
  +if (defined $fixup) {
  +$fixup-(\$cflags);
  +}
   
  -$self-strip_lfs(ExtUtils::Embed::ccopts()) . $self-ap_ccopts;
  +$cflags;
   }
   
   sub perl_config {
  
  
  



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

2001-10-10 Thread dougm

dougm   01/10/09 10:58:44

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.35  +25 -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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- FunctionTable.pm  2001/10/08 17:58:16 1.34
  +++ FunctionTable.pm  2001/10/09 17:58:44 1.35
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Mon Oct  8 11:03:58 2001
  +# !  Tue Oct  9 09:27:24 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -2755,6 +2755,30 @@
 {
   'type' = 'const char *',
   'name' = 'name'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_core_global_init',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_exit',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'status'
 }
   ]
 },
  
  
  



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

2001-10-10 Thread dougm

dougm   01/10/08 17:13:00

  Modified:src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h
  Log:
  *CORE::GLOBAL::exit = \ModPerl::Util::exit
  
  Revision  ChangesPath
  1.88  +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.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- mod_perl.c2001/10/07 19:04:20 1.87
  +++ mod_perl.c2001/10/09 00:13:00 1.88
  @@ -39,6 +39,8 @@
   
   modperl_env_default_populate(aTHX);
   
  +modperl_perl_core_global_init(aTHX);
  +
   for (i=0; MP_xs_loaders[i]; i++) {
   char *name = Perl_form(aTHX_ MP_xs_loader_name, MP_xs_loaders[i]);
   newCONSTSUB(PL_defstash, name, newSViv(1));
  
  
  
  1.5   +26 -0 modperl-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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_perl.c2001/09/16 17:28:43 1.4
  +++ modperl_perl.c2001/10/09 00:13:00 1.5
  @@ -4,6 +4,32 @@
* others (larger tweaks) are in their own modules, e.g. modperl_env.c
*/
   
  +typedef struct {
  +const char *name;
  +const char *sub_name;
  +const char *core_name;
  +} modperl_perl_core_global_t;
  +
  +#define MP_PERL_CORE_GLOBAL_ENT(name) \
  +{ name, ModPerl::Util:: name, CORE::GLOBAL:: name }
  +
  +static modperl_perl_core_global_t MP_perl_core_global_entries[] = {
  +MP_PERL_CORE_GLOBAL_ENT(exit),
  +{ NULL },
  +};
  +
  +void modperl_perl_core_global_init(pTHX)
  +{
  +modperl_perl_core_global_t *cglobals = MP_perl_core_global_entries;
  +
  +while (cglobals-name) {
  +GV *gv = gv_fetchpv(cglobals-core_name, TRUE, SVt_PVCV);
  +GvCV(gv) = get_cv(cglobals-sub_name, TRUE);
  +GvIMPORTED_CV_on(gv);
  +cglobals++;
  +}
  +}
  +
   void modperl_perl_ids_get(modperl_perl_ids_t *ids)
   {
   ids-pid  = (I32)getpid();
  
  
  
  1.5   +2 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_perl.h2001/09/16 17:28:43 1.4
  +++ modperl_perl.h2001/10/09 00:13:00 1.5
  @@ -7,6 +7,8 @@
   Gid_t gid, egid;
   } modperl_perl_ids_t;
   
  +void modperl_perl_core_global_init(pTHX);
  +
   void modperl_perl_ids_get(modperl_perl_ids_t *ids);
   
   void modperl_perl_init_ids(pTHX_ modperl_perl_ids_t *ids);
  
  
  



cvs commit: modperl-2.0 Makefile.PL

2001-10-10 Thread dougm

dougm   01/10/10 20:29:32

  Modified:.Makefile.PL
  Log:
  the DIR = [] patch does not work, backing it out for now.
  
  Revision  ChangesPath
  1.42  +1 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Makefile.PL   2001/10/09 18:28:37 1.41
  +++ Makefile.PL   2001/10/11 03:29:32 1.42
  @@ -27,7 +27,7 @@
   ModPerl::MM::WriteMakefile(
   NAME = 'mod_perl',
   VERSION = $VERSION,
  -DIR = get_dirs_with_makefile(@remote_makefile_dirs),
  +#DIR = get_dirs_with_makefile(@remote_makefile_dirs),
   macro = {
   MODPERL_SRC   = $code-path,
   PERL  = $build-perl_config('perlpath'),
  
  
  



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

2001-10-09 Thread dougm

dougm   01/10/08 22:42:49

  Modified:lib/Apache compat.pm
  Log:
  use __FILE__ instead of 1 for dummy %INC values
  
  Revision  ChangesPath
  1.22  +2 -2  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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- compat.pm 2001/10/08 23:51:21 1.21
  +++ compat.pm 2001/10/09 05:42:49 1.22
  @@ -28,9 +28,9 @@
   use mod_perl ();
   
   BEGIN {
  -$INC{'Apache.pm'} = 1;
  +$INC{'Apache.pm'} = __FILE__;
   
  -$INC{'Apache/Constants.pm'} = 1;
  +$INC{'Apache/Constants.pm'} = __FILE__;
   }
   
   package Apache;
  
  
  



cvs commit: modperl-2.0 Makefile.PL

2001-10-09 Thread dougm

dougm   01/10/09 11:28:37

  Modified:.Makefile.PL
  Log:
  clean xs/*.def and xs/*.exp
  
  Revision  ChangesPath
  1.41  +1 -0  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Makefile.PL   2001/10/04 10:51:46 1.40
  +++ Makefile.PL   2001/10/09 18:28:37 1.41
  @@ -140,6 +140,7 @@
   my $path = $code-path;
   
   return [@{ $build-clean_files }, @scripts,
  +xs/*.exp, xs/*.def,
 map { $path/$_} @{ $code-clean_files }];
   }
   
  
  
  



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

2001-10-08 Thread dougm

dougm   01/10/08 10:04:46

  Modified:lib/ModPerl WrapXS.pm
  Log:
  default to Apache::XSLoader if class does not have its own (e.g. ModPerl::)
  
  Revision  ChangesPath
  1.24  +3 -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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- WrapXS.pm 2001/10/07 22:39:09 1.23
  +++ WrapXS.pm 2001/10/08 17:04:46 1.24
  @@ -483,6 +483,9 @@
   }
   
   my $base   = (split '::', $module)[0];
  +unless (-e lib/$base/XSLoader.pm) {
  +$base = 'Apache';
  +}
   my $loader = join '::', $base, 'XSLoader';
   
   my $fh = $self-open_class_file($module, '.pm');
  
  
  



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

2001-10-08 Thread dougm

dougm   01/10/08 10:39:54

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.33  +10 -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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- FunctionTable.pm  2001/10/07 23:02:41 1.32
  +++ FunctionTable.pm  2001/10/08 17:39:54 1.33
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Sun Oct  7 15:51:20 2001
  +# !  Mon Oct  8 10:46:14 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -4712,8 +4712,16 @@
   'name' = 'mpxs_special_list_do',
   'args' = [
 {
  -'type' = '',
  +'type' = 'PerlInterpreter *',
   'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'name'
  +  },
  +  {
  +'type' = 'SV *',
  +'name' = 'package'
 },
 {
   'type' = 'mpxs_special_list_do_t',
  
  
  



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

2001-10-08 Thread dougm

dougm   01/10/08 16:34:07

  Modified:src/modules/perl modperl_util.c modperl_util.h
  Log:
  add modperl_perl_exit() function
  
  Revision  ChangesPath
  1.25  +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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- modperl_util.c2001/10/07 20:24:21 1.24
  +++ modperl_util.c2001/10/08 23:34:07 1.25
  @@ -422,6 +422,14 @@
   }
   }
   
  +void modperl_perl_exit(pTHX_ int status)
  +{
  +ENTER;
  +SAVESPTR(PL_diehook);
  +PL_diehook = Nullsv; 
  +Perl_croak(aTHX_ NULL);
  +}
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
char *key, SV *sv_val)
   {
  
  
  
  1.24  +2 -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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- modperl_util.h2001/10/07 20:24:21 1.23
  +++ modperl_util.h2001/10/08 23:34:07 1.24
  @@ -70,6 +70,8 @@
   
   void modperl_perl_call_list(pTHX_ AV *subs, const char *name);
   
  +void modperl_perl_exit(pTHX_ int status);
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
char *key, SV *sv_val);
   
  
  
  



cvs commit: modperl-2.0/xs/ModPerl/Util - New directory

2001-10-08 Thread dougm

dougm   01/10/08 10:57:28

  modperl-2.0/xs/ModPerl/Util - New directory



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

2001-10-08 Thread dougm

dougm   01/10/08 10:58:17

  Modified:lib/Apache compat.pm
   xs/maps  modperl_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  integrate ModPerl::Util and add Apache::untaint compat functionality
  
  Revision  ChangesPath
  1.19  +3 -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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- compat.pm 2001/10/08 17:33:02 1.18
  +++ compat.pm 2001/10/08 17:58:16 1.19
  @@ -40,6 +40,9 @@
   }
   
   sub untaint {
  +shift;
  +require ModPerl::Util;
  +ModPerl::Util::untaint(@_);
   }
   
   sub module {
  
  
  
  1.22  +3 -0  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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- modperl_functions.map 2001/10/07 23:02:41 1.21
  +++ modperl_functions.map 2001/10/08 17:58:16 1.22
  @@ -1,5 +1,8 @@
   #modperl specfic functions
   
  +MODULE=ModPerl::Util
  + mpxs_ModPerl__Util_untaint | | ...
  +
   MODULE=ModPerl::Global
mpxs_ModPerl__Global_special_list_call
mpxs_ModPerl__Global_special_list_clear
  
  
  
  1.34  +23 -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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- FunctionTable.pm  2001/10/08 17:39:54 1.33
  +++ FunctionTable.pm  2001/10/08 17:58:16 1.34
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Mon Oct  8 10:46:14 2001
  +# !  Mon Oct  8 11:03:58 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -4192,6 +4192,28 @@
 {
   'type' = 'SV *',
   'name' = 'package'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'mpxs_ModPerl__Util_untaint',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'I32',
  +'name' = 'items'
  +  },
  +  {
  +'type' = 'SV **',
  +'name' = 'mark'
  +  },
  +  {
  +'type' = 'SV **',
  +'name' = 'sp'
 }
   ]
 },
  
  
  



cvs commit: modperl-2.0/todo api.txt

2001-10-08 Thread dougm

dougm   01/10/08 11:41:10

  Modified:todo api.txt
  Log:
  2.0 has removed r-content_language
  
  Revision  ChangesPath
  1.10  +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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- api.txt   2001/10/08 18:40:34 1.9
  +++ api.txt   2001/10/08 18:41:10 1.10
  @@ -112,10 +112,6 @@
   Apache-unescape_url{_info}:
   not yet implemented.  should be moved to Apache::Util
   
  -$r-content_language:
  -deprecate in favor of $r-content_languages?
  -would require that apache-2.0 is also rid of r-content_language usage
  -
   apr_array_header_t:
   needs an interface, either methods and/or tied array interface
   
  
  
  



cvs commit: modperl-2.0/t/response/TestModperl - New directory

2001-10-08 Thread dougm

dougm   01/10/08 13:36:47

  modperl-2.0/t/response/TestModperl - New directory



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

2001-10-07 Thread dougm

dougm   01/10/07 12:22:49

  Modified:lib/ModPerl TypeMap.pm
   xs/Apache/Filter Apache__Filter.h
   xs/maps  apache_functions.map apr_functions.map
  Log:
  remove ModPerl::TypeMap::first_class guessing based on return_type
  
  Revision  ChangesPath
  1.11  +0 -2  modperl-2.0/lib/ModPerl/TypeMap.pm
  
  Index: TypeMap.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TypeMap.pm2001/09/15 18:17:31 1.10
  +++ TypeMap.pm2001/10/07 19:22:49 1.11
  @@ -266,8 +266,6 @@
   sub first_class {
   my($self, $func) = @_;
   
  -return $func-{return_type} if $func-{return_type} =~ /::/;
  -
   for my $e (@{ $func-{args} }) {
   next unless $e-{type} =~ /::/;
   #there are alot of util functions that take an APR::Pool
  
  
  
  1.15  +3 -0  modperl-2.0/xs/Apache/Filter/Apache__Filter.h
  
  Index: Apache__Filter.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Filter/Apache__Filter.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Apache__Filter.h  2001/08/30 01:08:24 1.14
  +++ Apache__Filter.h  2001/10/07 19:22:49 1.15
  @@ -1,6 +1,9 @@
   #define mpxs_Apache__RequestRec_add_output_filter(r, name, ctx) \
   ap_add_output_filter(name, ctx, r, NULL)
   
  +#define mpxs_Apache__RequestRec_add_input_filter(r, name, ctx) \
  +ap_add_output_filter(name, ctx, r, NULL)
  +
   #define mp_xs_sv2_modperl_filter(sv) \
   ((SvROK(sv)  (SvTYPE(SvRV(sv)) == SVt_PVMG)) \
   || (Perl_croak(aTHX_ argument is not a blessed reference),0) ? \
  
  
  
  1.32  +3 -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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- apache_functions.map  2001/10/06 01:03:27 1.31
  +++ apache_functions.map  2001/10/07 19:22:49 1.32
  @@ -193,10 +193,12 @@
   MODULE=Apache::Filter PACKAGE=Apache::RequestRec
   ap_filter_t *:DEFINE_add_output_filter | | \
 request_rec *:r, const char *:name, void *:ctx
  +ap_filter_t *:DEFINE_add_input_filter | | \
  +  request_rec *:r, const char *:name, void *:ctx
   
   PACKAGE=guess
   ~ap_add_output_filter
  - ap_add_input_filter
  +~ap_add_input_filter
ap_get_brigade | mpxs_ | \
  filter, bucket, mode=AP_MODE_NONBLOCKING, SV *:readbytes=Nullsv
ap_pass_brigade
  
  
  
  1.24  +1 -1  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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- apr_functions.map 2001/09/28 17:20:32 1.23
  +++ apr_functions.map 2001/10/07 19:22:49 1.24
  @@ -454,7 +454,7 @@
apr_getnameinfo
   -apr_getservbyname
apr_parse_addr_port
  -PACKAGE=guess
  +PACKAGE=APR::IpSubnet
apr_ipsubnet_t *:apr_ipsubnet_create | mpxs_ | \
 SV *:CLASS, p, ipstr, mask_or_numbits=NULL | new
apr_ipsubnet_test
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 13:20:53

  Modified:src/modules/perl modperl_util.c
  Log:
  style nits
  
  Revision  ChangesPath
  1.22  +20 -17modperl-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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- modperl_util.c2001/10/06 23:27:35 1.21
  +++ modperl_util.c2001/10/07 20:20:53 1.22
  @@ -399,51 +399,54 @@
   }
   }
   
  -MP_INLINE
  -SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
  -   char *key, SV *sv_val)
  +MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
  + char *key, SV *sv_val)
   {
  -SV *RETVAL = PL_sv_undef;
  +SV *retval = PL_sv_undef;
   
   if (r  r-per_dir_config) {   
   MP_dDCFG;
  -RETVAL = modperl_table_get_set(aTHX_ dcfg-SetVar, key, sv_val, FALSE);
  +retval = modperl_table_get_set(aTHX_ dcfg-SetVar,
  +   key, sv_val, FALSE);
   }
   
  -if (!SvTRUE(RETVAL)) {
  +if (!SvTRUE(retval)) {
   if (s  s-module_config) {
   MP_dSCFG(s);
  -SvREFCNT_dec(RETVAL); /* in case above did newSV(0) */
  -RETVAL = modperl_table_get_set(aTHX_ scfg-SetVar, key, sv_val, FALSE);
  -} else {
  -RETVAL = PL_sv_undef;
  +SvREFCNT_dec(retval); /* in case above did newSV(0) */
  +retval = modperl_table_get_set(aTHX_ scfg-SetVar,
  +   key, sv_val, FALSE);
   }
  +else {
  +retval = PL_sv_undef;
  +}
   }
   
  -return RETVAL;
  +return retval;
   }
   
   SV *modperl_table_get_set(pTHX_ apr_table_t *table, char *key,
 SV *sv_val, bool do_taint)
   {
  -SV *RETVAL = PL_sv_undef;
  +SV *retval = PL_sv_undef;
   
   if (table == NULL) { 
   /* do nothing */
   }
   else if (key == NULL) { 
  -RETVAL = modperl_hash_tie(aTHX_ APR::Table, Nullsv, (void*)table); 
  +retval = modperl_hash_tie(aTHX_ APR::Table,
  +  Nullsv, (void*)table); 
   }
   else if (sv_val == PL_sv_no) { /* no val was passed */
   char *val; 
   if ((val = (char *)apr_table_get(table, key))) { 
  -RETVAL = newSVpv(val, 0); 
  +retval = newSVpv(val, 0); 
   } 
   else { 
  -RETVAL = newSV(0); 
  +retval = newSV(0); 
   } 
   if (do_taint) { 
  -SvTAINTED_on(RETVAL); 
  +SvTAINTED_on(retval); 
   } 
   }
   else if (sv_val == PL_sv_undef) { /* val was passed in as undef */
  @@ -453,7 +456,7 @@
   apr_table_set(table, key, SvPV_nolen(sv_val));
   } 
   
  -return RETVAL;
  +return retval;
   }
   
   MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name)
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 13:22:02

  Modified:src/modules/perl modperl_util.c modperl_util.h
  Log:
  s/bool/int/ (i dont think bool is portable)
  
  Revision  ChangesPath
  1.23  +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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- modperl_util.c2001/10/07 20:20:53 1.22
  +++ modperl_util.c2001/10/07 20:22:02 1.23
  @@ -426,7 +426,7 @@
   }
   
   SV *modperl_table_get_set(pTHX_ apr_table_t *table, char *key,
  -  SV *sv_val, bool do_taint)
  +  SV *sv_val, int do_taint)
   {
   SV *retval = PL_sv_undef;
   
  
  
  
  1.22  +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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- modperl_util.h2001/10/06 23:27:35 1.21
  +++ modperl_util.h2001/10/07 20:22:02 1.22
  @@ -72,7 +72,7 @@
char *key, SV *sv_val);
   
   SV *modperl_table_get_set(pTHX_ apr_table_t *table, char *key,
  -  SV *sv_val, bool do_taint);
  +  SV *sv_val, int do_taint);
   
   MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name);
   
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 13:24:22

  Modified:src/modules/perl modperl_util.c modperl_util.h
  Log:
  add modperl_perl_call_list() function
  
  Revision  ChangesPath
  1.24  +23 -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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- modperl_util.c2001/10/07 20:22:02 1.23
  +++ modperl_util.c2001/10/07 20:24:21 1.24
  @@ -399,6 +399,29 @@
   }
   }
   
  +void modperl_perl_call_list(pTHX_ AV *subs, const char *name)
  +{
  +I32 i, oldscope = PL_scopestack_ix;
  +SV **ary = AvARRAY(subs);
  +
  +for (i=0; i=AvFILLp(subs); i++) {
  + CV *cv = (CV*)ary[i];
  + SV *atsv = ERRSV;
  +
  + PUSHMARK(PL_stack_sp);
  + call_sv((SV*)cv, G_EVAL|G_DISCARD);
  +
  + if (SvCUR(atsv)) {
  +Perl_sv_catpvf(aTHX_ atsv, %s failed--call queue aborted,
  +   name);
  + while (PL_scopestack_ix  oldscope) {
  + LEAVE;
  +}
  +Perl_croak(aTHX_ %s, SvPVX(atsv));
  + }
  +}
  +}
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
char *key, SV *sv_val)
   {
  
  
  
  1.23  +2 -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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- modperl_util.h2001/10/07 20:22:02 1.22
  +++ modperl_util.h2001/10/07 20:24:21 1.23
  @@ -68,6 +68,8 @@
   
   MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src);
   
  +void modperl_perl_call_list(pTHX_ AV *subs, const char *name);
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
char *key, SV *sv_val);
   
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 14:59:16

  Modified:src/modules/perl modperl_perl_global.c modperl_perl_global.h
  Log:
  implement logic for saving Perl special subroutines (END,BEGIN,CHECK,INIT)
  into the per-interpreter PL_modglobal hash
  
  modperl_perl_global_avcv_call() function to call the subroutines for given
  package
  
  modperl_perl_global_avcv_clear() function to clear the subroutines for given
  package
  
  END blocks are now saved via the new logic
  
  Revision  ChangesPath
  1.6   +130 -0modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- modperl_perl_global.c 2001/10/07 19:04:20 1.5
  +++ modperl_perl_global.c 2001/10/07 21:59:16 1.6
  @@ -6,9 +6,131 @@
   globals-inc.gv= PL_incgv;
   globals-defout.gv = PL_defoutgv;
   globals-rs.sv = PL_rs;
  +globals-end.av= PL_endav;
  +globals-end.key   = MP_MODGLOBAL_END;
   }
   
  +/* XXX: PL_modglobal thingers might be useful elsewhere */
  +
  +#define MP_MODGLOBAL_ENT(key) \
  +{key, ModPerl:: key, (sizeof(ModPerl::)-1)+(sizeof(key)-1), 0}
  +
  +static modperl_modglobal_key_t MP_modglobal_keys[] = {
  +MP_MODGLOBAL_ENT(END),
  +};
  +
  +static AV *modperl_perl_global_avcv_fetch(pTHX_ modperl_modglobal_key_t *gkey,
  +  const char *package, I32 packlen)
  +{
  +SV **svp = hv_fetch(PL_modglobal, gkey-val, gkey-len, FALSE);
  +HV *hv;
  +
  +if (!(svp  (hv = (HV*)*svp))) {
  +return Nullav;
  +}
  +
  +if (!(svp = hv_fetch(hv, package, packlen, FALSE))) {
  +return Nullav;
  +}
  +
  +return (AV*)*svp;
  +}
  +
  +void modperl_perl_global_avcv_call(pTHX_ modperl_modglobal_key_t *gkey,
  +   const char *package, I32 packlen)
  +{
  +AV *av = modperl_perl_global_avcv_fetch(aTHX_ gkey, package, packlen);
  +
  +if (!av) {
  +return;
  +}
  +
  +modperl_perl_call_list(aTHX_ av, gkey-name);
  +}
  +
  +void modperl_perl_global_avcv_clear(pTHX_ modperl_modglobal_key_t *gkey,
  +const char *package, I32 packlen)
  +{
  +AV *av = modperl_perl_global_avcv_fetch(aTHX_ gkey, package, packlen);
  +
  +if (!av) {
  +return;
  +}
  +
  +av_clear(av);
  +}
  +
  +static int modperl_perl_global_avcv_set(pTHX_ SV *sv, MAGIC *mg)
  +{
  +HV *hv;
  +AV *mav, *av = (AV*)sv;
  +const char *package = HvNAME(PL_curstash);
  +I32 packlen = strlen(package);
  +modperl_modglobal_key_t *gkey =
  +(modperl_modglobal_key_t *)mg-mg_ptr;
  +
  +hv = (HV*)*hv_fetch(PL_modglobal, gkey-val, gkey-len, TRUE);
  +(void)SvUPGRADE((SV*)hv, SVt_PVHV);
  +
  +mav = (AV*)*hv_fetch(hv, package, packlen, TRUE);
  +(void)SvUPGRADE((SV*)mav, SVt_PVAV);
  +
  +/* $cv = pop @av */
  +sv = AvARRAY(av)[AvFILLp(av)];
  +AvARRAY(av)[AvFILLp(av)--] = PL_sv_undef;
  +
  +/* push @{ $PL_modglobal{$key}{$package} }, $cv */
  +av_store(mav, AvFILLp(av)+1, sv);
  +
  +return 1;
  +}
  +
  +static MGVTBL modperl_vtbl_global_avcv_t = {
  +0,
  +MEMBER_TO_FPTR(modperl_perl_global_avcv_set),
  +0, 0, 0,
  +};
  +
  +/* XXX: Apache::RegistryLoader type things need access to this
  + * for compiling scripts at startup
  + */
  +static void modperl_perl_global_avcv_tie(pTHX_ modperl_modglobal_key_e key,
  + AV *av)
  +{
  +if (!SvMAGIC((SV*)av)) {
  +MAGIC *mg;
  +Newz(702, mg, 1, MAGIC);
  +mg-mg_virtual = modperl_vtbl_global_avcv_t;
  +mg-mg_ptr = (char *)MP_modglobal_keys[key];
  +mg-mg_len = -1; /* prevent free() of mg-mg_ptr */
  +SvMAGIC((SV*)av) = mg;
  +}
  +
  +SvSMAGICAL_on((SV*)av);
  +}
  +
  +static void modperl_perl_global_avcv_untie(pTHX_ AV *av)
  +{
  +SvSMAGICAL_off((SV*)av);
  +}
  +
  +static void
  +modperl_perl_global_avcv_save(pTHX_ modperl_perl_global_avcv_t *avcv)
  +{
  +avcv-origav = *avcv-av;
  +*avcv-av = newAV(); /* XXX: only need 1 of these AVs per-interpreter */
  +modperl_perl_global_avcv_tie(aTHX_ avcv-key, *avcv-av);
  +}
  +
   static void
  +modperl_perl_global_avcv_restore(pTHX_ modperl_perl_global_avcv_t *avcv)
  +{
  +modperl_perl_global_avcv_untie(aTHX_ *avcv-av);
  +SvREFCNT_dec(*avcv-av); /* XXX: see XXX above */
  +*avcv-av = avcv-origav;
  +}
  +
  +static void
   modperl_perl_global_gvhv_save(pTHX_ modperl_perl_global_gvhv_t *gvhv)
   {
   U32 mg_flags;
  @@ -93,6 +215,7 @@
   }
   
   typedef enum {
  +MP_GLOBAL_AVCV,
   MP_GLOBAL_GVHV,
   MP_GLOBAL_GVAV,
   MP_GLOBAL_GVIO,
  @@ -109,6 +232,7 @@
   STRUCT_OFFSET

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

2001-10-07 Thread dougm

dougm   01/10/07 15:04:07

  Modified:src/modules/perl modperl_perl_global.c modperl_perl_global.h
  Log:
  add modperl_modglobal_lookup() function to lookup a modperl_modglobal_key_t based on 
string name
  
  Revision  ChangesPath
  1.7   +14 -0 modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_perl_global.c 2001/10/07 21:59:16 1.6
  +++ modperl_perl_global.c 2001/10/07 22:04:07 1.7
  @@ -17,7 +17,21 @@
   
   static modperl_modglobal_key_t MP_modglobal_keys[] = {
   MP_MODGLOBAL_ENT(END),
  +{ NULL },
   };
  +
  +modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name)
  +{
  +int i;
  +
  +for (i=0; MP_modglobal_keys[i].name; i++) {
  +if (strEQ(MP_modglobal_keys[i].name, name)) {
  +return MP_modglobal_keys[i];
  +}
  +}
  +
  +return NULL;
  +}
   
   static AV *modperl_perl_global_avcv_fetch(pTHX_ modperl_modglobal_key_t *gkey,
 const char *package, I32 packlen)
  
  
  
  1.6   +2 -0  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- modperl_perl_global.h 2001/10/07 21:59:16 1.5
  +++ modperl_perl_global.h 2001/10/07 22:04:07 1.6
  @@ -49,6 +49,8 @@
   modperl_perl_global_svpv_t rs;
   } modperl_perl_globals_t;
   
  +modperl_modglobal_key_t *modperl_modglobal_lookup(pTHX_ const char *name);
  +
   void modperl_perl_global_request_save(pTHX_ request_rec *r);
   
   void modperl_perl_global_request_restore(pTHX_ request_rec *r);
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 15:07:15

  Modified:src/modules/perl modperl_perl_global.c modperl_perl_global.h
  Log:
  wont be able to use a precomputed hash for modperl_modglobal_key_t's
  
  Revision  ChangesPath
  1.8   +1 -1  modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_perl_global.c 2001/10/07 22:04:07 1.7
  +++ modperl_perl_global.c 2001/10/07 22:07:15 1.8
  @@ -13,7 +13,7 @@
   /* XXX: PL_modglobal thingers might be useful elsewhere */
   
   #define MP_MODGLOBAL_ENT(key) \
  -{key, ModPerl:: key, (sizeof(ModPerl::)-1)+(sizeof(key)-1), 0}
  +{key, ModPerl:: key, (sizeof(ModPerl::)-1)+(sizeof(key)-1)}
   
   static modperl_modglobal_key_t MP_modglobal_keys[] = {
   MP_MODGLOBAL_ENT(END),
  
  
  
  1.7   +0 -1  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_perl_global.h 2001/10/07 22:04:07 1.6
  +++ modperl_perl_global.h 2001/10/07 22:07:15 1.7
  @@ -5,7 +5,6 @@
   const char *name;
   const char *val;
   I32 len;
  -U32 hash;
   } modperl_modglobal_key_t;
   
   typedef enum {
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 15:11:56

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.31  +124 -8modperl-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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- FunctionTable.pm  2001/10/06 01:03:27 1.30
  +++ FunctionTable.pm  2001/10/07 22:11:56 1.31
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Fri Oct  5 17:52:47 2001
  +# !  Sun Oct  7 15:18:16 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -122,6 +122,10 @@
   'name' = 'p'
 },
 {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  },
  +  {
   'type' = 'server_rec *',
   'name' = 's'
 },
  @@ -433,6 +437,24 @@
 },
 {
   'return_type' = 'const char *',
  +'name' = 'modperl_cmd_init_handlers',
  +'args' = [
  +  {
  +'type' = 'cmd_parms *',
  +'name' = 'parms'
  +  },
  +  {
  +'type' = 'void *',
  +'name' = 'mconfig'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'arg'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'const char *',
   'name' = 'modperl_cmd_input_filter_handlers',
   'args' = [
 {
  @@ -2513,6 +2535,20 @@
   ]
 },
 {
  +'return_type' = 'modperl_modglobal_key_t *',
  +'name' = 'modperl_modglobal_lookup',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'name'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'SV *',
   'name' = 'modperl_newSVsv_obj',
   'args' = [
  @@ -2688,34 +2724,114 @@
 },
 {
   'return_type' = 'void',
  -'name' = 'modperl_perl_global_restore',
  +'name' = 'modperl_perl_av_push_elts_ref',
   'args' = [
 {
   'type' = 'PerlInterpreter *',
   'name' = 'my_perl'
 },
 {
  -'type' = 'modperl_perl_globals_t *',
  -'name' = 'globals'
  +'type' = 'AV *',
  +'name' = 'dst'
  +  },
  +  {
  +'type' = 'AV *',
  +'name' = 'src'
 }
   ]
 },
 {
   'return_type' = 'void',
  -'name' = 'modperl_perl_global_save',
  +'name' = 'modperl_perl_call_list',
   'args' = [
 {
   'type' = 'PerlInterpreter *',
   'name' = 'my_perl'
 },
  +  {
  +'type' = 'AV *',
  +'name' = 'subs'
  +  },
 {
  -'type' = 'modperl_perl_globals_t *',
  -'name' = 'globals'
  +'type' = 'const char *',
  +'name' = 'name'
 }
   ]
 },
 {
   'return_type' = 'void',
  +'name' = 'modperl_perl_global_avcv_call',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'modperl_modglobal_key_t *',
  +'name' = 'gkey'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'package'
  +  },
  +  {
  +'type' = 'I32',
  +'name' = 'packlen'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_global_avcv_clear',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'modperl_modglobal_key_t *',
  +'name' = 'gkey'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'package'
  +  },
  +  {
  +'type' = 'I32',
  +'name' = 'packlen'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_global_request_restore',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_global_request_save',
  +'args' = [
  +  {
  +'type' = 'PerlInterpreter *',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
   'name' = 'modperl_perl_ids_get',
   'args' = [
 {
  @@ -3068,7 +3184,7 @@
   'name' = 'sv_val'
 },
 {
  -'type' = 'char',
  +'type' = 'int',
   'name' = 'do_taint'
 }
   ]
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 15:39:09

  Modified:lib/ModPerl ParseSource.pm WrapXS.pm
  Log:
  include ModPerl:: in generated xs
  
  Revision  ChangesPath
  1.3   +1 -1  modperl-2.0/lib/ModPerl/ParseSource.pm
  
  Index: ParseSource.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/ParseSource.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParseSource.pm2001/04/19 17:23:23 1.2
  +++ ParseSource.pm2001/10/07 22:39:09 1.3
  @@ -25,7 +25,7 @@
   #filter/sort
   my @wanted  = grep { /mod_perl\.h/ } @$includes;
   push @wanted, grep { m:xs/modperl_xs_: } @$includes;
  -push @wanted, grep { m:xs/A: } @$includes;
  +push @wanted, grep { m:xs/[AM]: } @$includes;
   \@wanted;
   }
   
  
  
  
  1.23  +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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- WrapXS.pm 2001/09/25 19:44:02 1.22
  +++ WrapXS.pm 2001/10/07 22:39:09 1.23
  @@ -553,7 +553,7 @@
   
   $self-prepare;
   
  -for (qw(ModPerl::WrapXS Apache APR)) {
  +for (qw(ModPerl::WrapXS Apache APR ModPerl)) {
   $self-write_makefilepl($_);
   }
   
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 16:02:41

  Modified:xs/maps  modperl_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Added:   xs/ModPerl/Global ModPerl__Global.h
  Log:
  add ModPerl::Global module with functions to call/clear special lists (END,etc)
  
  Revision  ChangesPath
  1.1  modperl-2.0/xs/ModPerl/Global/ModPerl__Global.h
  
  Index: ModPerl__Global.h
  ===
  typedef void (*mpxs_special_list_do_t)(pTHX_ modperl_modglobal_key_t *,
 const char *, I32);
  
  static int mpxs_special_list_do(pTHX_ const char *name,
  SV *package,
  mpxs_special_list_do_t func)
  {
  STRLEN packlen;
  modperl_modglobal_key_t *gkey = modperl_modglobal_lookup(aTHX_ name);
  
  if (!gkey) {
  return FALSE;
  }
  
  SvPV_force(package, packlen);
  
  func(aTHX_ gkey, SvPVX(package), packlen);
  
  return TRUE;
  }
  
  static
  MP_INLINE int mpxs_ModPerl__Global_special_list_call(const char *name,
   SV *package)
  {
  dTHX; /* XXX */
  return mpxs_special_list_do(aTHX_ name, package,
  modperl_perl_global_avcv_call);
  }
  
  static
  MP_INLINE int mpxs_ModPerl__Global_special_list_clear(const char *name,
SV *package)
  {
  dTHX; /* XXX */
  return mpxs_special_list_do(aTHX_ name, package,
  modperl_perl_global_avcv_clear);
  }
  
  
  
  1.21  +4 -0  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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- modperl_functions.map 2001/09/28 20:11:02 1.20
  +++ modperl_functions.map 2001/10/07 23:02:41 1.21
  @@ -1,5 +1,9 @@
   #modperl specfic functions
   
  +MODULE=ModPerl::Global
  + mpxs_ModPerl__Global_special_list_call
  + mpxs_ModPerl__Global_special_list_clear
  +
   MODULE=Apache::RequestUtil   PACKAGE=guess
mpxs_Apache__RequestRec_push_handlers
mpxs_Apache__RequestRec_set_handlers
  
  
  
  1.32  +43 -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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- FunctionTable.pm  2001/10/07 22:11:56 1.31
  +++ FunctionTable.pm  2001/10/07 23:02:41 1.32
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Sun Oct  7 15:18:16 2001
  +# !  Sun Oct  7 15:51:20 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -4168,6 +4168,34 @@
   ]
 },
 {
  +'return_type' = 'int',
  +'name' = 'mpxs_ModPerl__Global_special_list_call',
  +'args' = [
  +  {
  +'type' = 'const char *',
  +'name' = 'name'
  +  },
  +  {
  +'type' = 'SV *',
  +'name' = 'package'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'int',
  +'name' = 'mpxs_ModPerl__Global_special_list_clear',
  +'args' = [
  +  {
  +'type' = 'const char *',
  +'name' = 'name'
  +  },
  +  {
  +'type' = 'SV *',
  +'name' = 'package'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'mpxs_ap_allow_methods',
   'args' = [
  @@ -4676,6 +4704,20 @@
 {
   'type' = 'apr_read_type_e',
   'name' = 'block'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'int',
  +'name' = 'mpxs_special_list_do',
  +'args' = [
  +  {
  +'type' = '',
  +'name' = 'my_perl'
  +  },
  +  {
  +'type' = 'mpxs_special_list_do_t',
  +'name' = 'func'
 }
   ]
 }
  
  
  



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

2001-10-07 Thread dougm

dougm   01/10/07 12:04:20

  Modified:src/modules/perl mod_perl.c modperl_perl_global.c
modperl_perl_global.h
  Log:
  add modperl_perl_global_request_{restore,save} functions for future use of 
request_rec to manage globals
  
  Revision  ChangesPath
  1.87  +2 -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.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- mod_perl.c2001/10/06 19:43:40 1.86
  +++ mod_perl.c2001/10/07 19:04:20 1.87
  @@ -529,7 +529,7 @@
   rcfg-wbucket.header_parse = 1;
   }
   
  -modperl_perl_global_save(aTHX_ rcfg-perl_globals);
  +modperl_perl_global_request_save(aTHX_ r);
   
   h_stdout = modperl_io_tie_stdout(aTHX_ r);
   h_stdin  = modperl_io_tie_stdin(aTHX_ r);
  @@ -550,7 +550,7 @@
   modperl_env_request_untie(aTHX_ r);
   #endif
   
  -modperl_perl_global_restore(aTHX_ rcfg-perl_globals);
  +modperl_perl_global_request_restore(aTHX_ r);
   
   #ifdef USE_ITHREADS
   if (MpInterpPUTBACK(interp)) {
  
  
  
  1.5   +14 -2 modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_perl_global.c 2001/10/06 23:27:47 1.4
  +++ modperl_perl_global.c 2001/10/07 19:04:20 1.5
  @@ -128,7 +128,7 @@
   apr_uint64_t **ptr = (apr_uint64_t **) \
   ((char *)globals + (int)(long)modperl_perl_global_entries[i].offset)
   
  -void modperl_perl_global_save(pTHX_ modperl_perl_globals_t *globals)
  +static void modperl_perl_global_save(pTHX_ modperl_perl_globals_t *globals)
   {
   int i;
   
  @@ -154,7 +154,7 @@
   }
   }
   
  -void modperl_perl_global_restore(pTHX_ modperl_perl_globals_t *globals)
  +static void modperl_perl_global_restore(pTHX_ modperl_perl_globals_t *globals)
   {
   int i;
   
  @@ -176,4 +176,16 @@
   break;
   }
   }
  +}
  +
  +void modperl_perl_global_request_save(pTHX_ request_rec *r)
  +{
  +MP_dRCFG;
  +modperl_perl_global_save(aTHX_ rcfg-perl_globals);
  +}
  +
  +void modperl_perl_global_request_restore(pTHX_ request_rec *r)
  +{
  +MP_dRCFG;
  +modperl_perl_global_restore(aTHX_ rcfg-perl_globals);
   }
  
  
  
  1.4   +2 -2  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- modperl_perl_global.h 2001/09/28 19:53:22 1.3
  +++ modperl_perl_global.h 2001/10/07 19:04:20 1.4
  @@ -31,8 +31,8 @@
   modperl_perl_global_svpv_t rs;
   } modperl_perl_globals_t;
   
  -void modperl_perl_global_save(pTHX_ modperl_perl_globals_t *globals);
  +void modperl_perl_global_request_save(pTHX_ request_rec *r);
   
  -void modperl_perl_global_restore(pTHX_ modperl_perl_globals_t *globals);
  +void modperl_perl_global_request_restore(pTHX_ request_rec *r);
   
   #endif
  
  
  



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

2001-10-06 Thread dougm

dougm   01/10/06 12:43:40

  Modified:src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h
  Log:
  implement PerlInitHandler
  
  Revision  ChangesPath
  1.86  +1 -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.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- mod_perl.c2001/09/28 19:51:40 1.85
  +++ mod_perl.c2001/10/06 19:43:40 1.86
  @@ -415,6 +415,7 @@
   MP_CMD_SRV_ITERATE(PerlModule, modules, PerlModule),
   MP_CMD_SRV_ITERATE(PerlRequire, requires, PerlRequire),
   MP_CMD_DIR_ITERATE(PerlOptions, options, Perl Options),
  +MP_CMD_DIR_ITERATE(PerlInitHandler, init_handlers, Subroutine name),
   MP_CMD_DIR_TAKE2(PerlSetVar, set_var, PerlSetVar),
   MP_CMD_DIR_ITERATE2(PerlAddVar, add_var, PerlAddVar),
   #ifdef MP_TRACE
  
  
  
  1.13  +8 -0  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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- modperl_cmd.c 2001/09/28 19:51:40 1.12
  +++ modperl_cmd.c 2001/10/06 19:43:40 1.13
  @@ -116,6 +116,14 @@
   return NULL;
   }
   
  +MP_CMD_SRV_DECLARE(init_handlers)
  +{
  +if (parms-path) {
  +return modperl_cmd_header_parser_handlers(parms, mconfig, arg);
  +}
  +
  +return modperl_cmd_post_read_request_handlers(parms, mconfig, arg);
  +}
   
   #ifdef MP_COMPAT_1X
   
  
  
  
  1.15  +1 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- modperl_cmd.h 2001/09/28 19:51:40 1.14
  +++ modperl_cmd.h 2001/10/06 19:43:40 1.15
  @@ -23,6 +23,7 @@
   MP_CMD_SRV_DECLARE2(set_var);
   MP_CMD_SRV_DECLARE2(add_var);
   MP_CMD_SRV_DECLARE(options);
  +MP_CMD_SRV_DECLARE(init_handlers);
   
   #ifdef MP_COMPAT_1X
   
  
  
  



cvs commit: modperl-2.0/t/hooks/TestHooks init.pm

2001-10-06 Thread dougm

dougm   01/10/06 12:44:30

  Modified:t/hooks  .cvsignore
  Added:   t/hooks/TestHooks init.pm
  Log:
  add PerlInitHandler test
  
  Revision  ChangesPath
  1.3   +1 -0  modperl-2.0/t/hooks/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/hooks/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore2001/09/28 15:21:15 1.2
  +++ .cvsignore2001/10/06 19:44:30 1.3
  @@ -4,3 +4,4 @@
   authz.t
   fixup.t
   trans.t
  +init.t
  
  
  
  1.1  modperl-2.0/t/hooks/TestHooks/init.pm
  
  Index: init.pm
  ===
  package TestHooks::init;
  
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  
  sub first {
  my $r = shift;
  
  $r-notes-set(ok1 = 1);
  
  Apache::OK;
  }
  
  sub second {
  my $r = shift;
  
  my $ok = $r-notes-get('ok1') || 0;
  
  $r-notes-set(ok2 = $ok + 1);
  
  Apache::OK;
  }
  
  sub handler {
  my $r = shift;
  
  my $ok = $r-notes-get('ok2') || 0;
  
  $r-notes-set(ok3 = $ok + 1);
  
  Apache::OK;
  }
  
  sub response {
  my $r = shift;
  
  my $tests = 3;
  plan $r, tests = $tests;
  
  for my $x (1..$tests) {
  my $val = $r-notes-get(ok$x) || 0;
  ok $val == $x;
  }
  
  Apache::OK;
  }
  
  1;
  __DATA__
  PerlInitHandler TestHooks::init::second
  Base
  PerlInitHandler TestHooks::init::first
  /Base
  PerlResponseHandler TestHooks::init::response
  SetHandler modperl
  
  
  



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

2001-10-06 Thread dougm

dougm   01/10/06 16:27:35

  Modified:src/modules/perl modperl_util.c modperl_util.h
  Log:
  add modperl_perl_av_push_elts_ref() function
  
  Revision  ChangesPath
  1.21  +12 -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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- modperl_util.c2001/10/06 01:03:27 1.20
  +++ modperl_util.c2001/10/06 23:27:35 1.21
  @@ -387,6 +387,18 @@
   return NULL;
   }
   
  +MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src)
  +{
  +I32 i, j, src_fill = AvFILLp(src), dst_fill = AvFILLp(dst);
  +
  +av_extend(dst, src_fill);
  +AvFILLp(dst) += src_fill+1;
  +
  +for (i=dst_fill+1, j=0; j=AvFILLp(src); i++, j++) {
  +AvARRAY(dst)[i] = SvREFCNT_inc(AvARRAY(src)[j]);
  +}
  +}
  +
   MP_INLINE
   SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
  char *key, SV *sv_val)
  
  
  
  1.21  +2 -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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- modperl_util.h2001/10/06 01:03:27 1.20
  +++ modperl_util.h2001/10/06 23:27:35 1.21
  @@ -66,6 +66,8 @@
   MP_INLINE void *modperl_hash_tied_object(pTHX_ const char *classname,
SV *tsv);
   
  +MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src);
  +
   MP_INLINE SV *modperl_dir_config(pTHX_ request_rec *r, server_rec *s,
char *key, SV *sv_val);
   
  
  
  



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

2001-10-05 Thread dougm

dougm   01/10/05 16:38:56

  Modified:xs/tables/current/Apache ConstantsTable.pm FunctionTable.pm
StructureTable.pm
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.15  +5 -1  modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm
  
  Index: ConstantsTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ConstantsTable.pm 2001/09/06 05:16:25 1.14
  +++ ConstantsTable.pm 2001/10/05 23:38:56 1.15
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Sun Aug 19 11:43:53 2001
  +# !  Fri Oct  5 16:35:50 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -187,6 +187,10 @@
 'APR_URI_UNP_REVEALPASSWORD',
 'APR_URI_UNP_OMITPATHINFO',
 'APR_URI_UNP_OMITQUERY'
  +],
  +'table' = [
  +  'APR_OVERLAP_TABLES_SET',
  +  'APR_OVERLAP_TABLES_MERGE'
   ],
   'socket' = [
 'APR_SO_LINGER',
  
  
  
  1.21  +55 -443   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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FunctionTable.pm  2001/09/25 18:02:39 1.20
  +++ FunctionTable.pm  2001/10/05 23:38:56 1.21
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Tue Sep 25 10:58:26 2001
  +# !  Fri Oct  5 16:35:58 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -8891,6 +8891,20 @@
 },
 {
   'return_type' = 'void',
  +'name' = 'apr_pool_lock',
  +'args' = [
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'p'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'writeprotect'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
   'name' = 'apr_pool_note_subprocess',
   'args' = [
 {
  @@ -9121,6 +9135,16 @@
   ]
 },
 {
  +'return_type' = 'apr_pool_t *',
  +'name' = 'apr_proc_mutex_pool_get',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t *',
  +'name' = 'ob'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'apr_status_t',
   'name' = 'apr_proc_mutex_trylock',
   'args' = [
  @@ -10089,448 +10113,6 @@
   ]
 },
 {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_blocks_create',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t **',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'pms'
  -  },
  -  {
  -'type' = 'apr_size_t',
  -'name' = 'block_size'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'void *',
  -'name' = 'apr_sms_calloc',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_size_t',
  -'name' = 'size'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_register',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_int32_t',
  -'name' = 'type'
  -  },
  -  {
  -'type' = 'const void *',
  -'name' = 'data'
  -  },
  -  {
  -'type' = 'apr_status_t (*cleanup_fn)(void *)',
  -'name' = 'arg3'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_run',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_int32_t',
  -'name' = 'type'
  -  },
  -  {
  -'type' = 'const void *',
  -'name' = 'data'
  -  },
  -  {
  -'type' = 'apr_status_t (*cleanup)(void *)',
  -'name' = 'arg3'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_run_type',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name' = 'sms'
  -  },
  -  {
  -'type' = 'apr_int32_t',
  -'name' = 'type'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'apr_status_t',
  -'name' = 'apr_sms_cleanup_unregister',
  -'args' = [
  -  {
  -'type' = 'apr_sms_t *',
  -'name

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

2001-10-05 Thread dougm

dougm   01/10/05 16:39:32

  Modified:xs/maps  apache_structures.map
  Log:
  request_rec.content_language no longer exists
  
  Revision  ChangesPath
  1.10  +0 -1  modperl-2.0/xs/maps/apache_structures.map
  
  Index: apache_structures.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- apache_structures.map 2001/09/10 05:49:04 1.9
  +++ apache_structures.map 2001/10/05 23:39:31 1.10
  @@ -44,7 +44,6 @@
  content_type
  handler
  content_encoding
  -   content_language
  content_languages
 vlist_validator
  user
  
  
  



cvs commit: modperl-2.0/t/hooks authen.t

2001-10-05 Thread dougm

dougm   01/10/05 17:05:59

  Modified:t/hooks  authen.t
  Log:
  s/ok/sok/g so we can run individual tests
  
  Revision  ChangesPath
  1.4   +13 -5 modperl-2.0/t/hooks/authen.t
  
  Index: authen.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/hooks/authen.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- authen.t  2001/04/04 04:37:02 1.3
  +++ authen.t  2001/10/06 00:05:59 1.4
  @@ -8,14 +8,22 @@
   
   my $location = /TestHooks::authen;
   
  -ok ! GET_OK $location;
  +sok {
  +! GET_OK $location;
  +};
   
  -my $rc = GET_RC $location;
  +sok {
  +my $rc = GET_RC $location;
  +$rc == 401;
  +};
   
  -ok $rc == 401;
  +sok {
  +GET_OK $location, username = 'dougm', password = 'foo';
  +};
   
  -ok GET_OK $location, username = 'dougm', password = 'foo';
  +sok {
  +! GET_OK $location, username = 'dougm', password = 'wrong';
  +};
   
  -ok ! GET_OK $location, username = 'dougm', password = 'wrong';
   
   
  
  
  



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

2001-10-05 Thread dougm

dougm   01/10/05 18:03:28

  Modified:lib/Apache compat.pm
   src/modules/perl modperl_util.c modperl_util.h
   t/response/TestAPI module.pm
   todo api.txt
   xs/Apache/Module Apache__Module.h
   xs/maps  apache_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  add Apache::Module::loaded function
  and Apache::module wrapper in Apache::compat
  Submitted by: Philippe M . Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.16  +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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- compat.pm 2001/10/01 09:04:10 1.15
  +++ compat.pm 2001/10/06 01:03:26 1.16
  @@ -42,6 +42,11 @@
   sub untaint {
   }
   
  +sub module {
  +require Apache::Module;
  +return Apache::Module::loaded($_[1]);
  +}
  +
   package Apache::Constants;
   
   use Apache::Const ();
  
  
  
  1.20  +5 -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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- modperl_util.c2001/09/28 20:11:01 1.19
  +++ modperl_util.c2001/10/06 01:03:27 1.20
  @@ -443,3 +443,8 @@
   
   return RETVAL;
   }
  +
  +MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name)
  +{
  +return gv_stashpv(name, FALSE) ? 1 : 0;
  +}
  
  
  
  1.20  +2 -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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- modperl_util.h2001/09/28 20:11:01 1.19
  +++ modperl_util.h2001/10/06 01:03:27 1.20
  @@ -72,4 +72,6 @@
   SV *modperl_table_get_set(pTHX_ apr_table_t *table, char *key,
 SV *sv_val, bool do_taint);
   
  +MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name);
  +
   #endif /* MODPERL_UTIL_H */
  
  
  
  1.2   +65 -9 modperl-2.0/t/response/TestAPI/module.pm
  
  Index: module.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- module.pm 2001/04/04 05:45:48 1.1
  +++ module.pm 2001/10/06 01:03:27 1.2
  @@ -4,32 +4,88 @@
   use warnings FATAL = 'all';
   
   use Apache::Test;
  +use Apache::TestConfig;
  +use Apache::TestUtil;
   use Apache::Module ();
   use DynaLoader ();
   
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 6;
  +my $cfg = Apache::Test::config();
   
  +plan $r, tests = 14;
  +
   my $top_module = Apache::Module-top_module;
   
   ok $top_module;
  +
  +ok t_cmp($cfg-{httpd_info}-{MODULE_MAGIC_NUMBER},
  + $top_module-version . ':0',
  + q{$top_module-version});
  +
  +ok t_cmp(scalar keys %{ $cfg-{modules} },
  + $top_module-module_index,
  + q{$top_module-module_index});
  +
  +#XXX: some of these tests will fail if modperl is linked static
  +#rather than dso.  also no promise that mod_perl will be the top_module
  +
  +ok t_cmp('mod_perl.c', $top_module-name(), q{$top_module-name});
   
  -ok $top_module-version;
  +my $cmd = $top_module-cmds;
   
  -ok $top_module-module_index;
  +ok defined $cmd;
   
  -ok $top_module-name;
  +ok UNIVERSAL::isa($cmd, 'Apache::Command');
   
  -ok $top_module-cmds;
  +{
  +local $cfg-{modules}-{'mod_perl.c'} = 1;
  +my $modules = {};
   
  -for (my $modp = $top_module; $modp; $modp = $modp-next) {
  -if ($modp-name eq 'mod_perl.c') {
  -ok 1;
  -last;
  +for (my $modp = $top_module; $modp; $modp = $modp-next) {
  +if ($modp  $modp-name) {
  +$modules-{$modp-name} = 1;
  +}
   }
  +
  +my %alias = (
  +'sapi_apache2.c' = 'mod_php4.c',
  +);
  +
  +while (my($key, $val) = each %alias) {
  +next unless $modules-{$key};
  +delete $modules-{$key};
  +$modules-{$val} = 1;
  +}
  +
  +ok t_cmp($cfg-{modules}, $modules, Modules list);
   }
  +
  +#.c
  +ok t_cmp(1, Apache::Module::loaded('mod_perl.c'),
  + Apache::Module::loaded('mod_perl.c'));
  +
  +ok t_cmp(0, Apache::Module::loaded('Apache__Module_foo.c'),
  + Apache::Module

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

2001-09-28 Thread dougm

dougm   01/09/28 10:27:46

  Modified:src/modules/perl mod_perl.c modperl_env.c
   t/response/TestApache cgihandler.pm
  Log:
  current implementation of tie %ENV to $r-subprocess_env
  is not threadsafe, so back it out for now
  
  Revision  ChangesPath
  1.81  +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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mod_perl.c2001/09/28 17:15:07 1.80
  +++ mod_perl.c2001/09/28 17:27:45 1.81
  @@ -527,13 +527,21 @@
   h_stdout = modperl_io_tie_stdout(aTHX_ r);
   h_stdin  = modperl_io_tie_stdin(aTHX_ r);
   
  +#if 0
  +/* current implementation of tie %ENV to $r-subprocess_env 
  + * is not threadsafe
  + */
   modperl_env_request_tie(aTHX_ r);
  +#endif
  +
   retval = modperl_response_handler_run(r, FALSE);
   
   modperl_io_handle_untie(aTHX_ h_stdout);
   modperl_io_handle_untie(aTHX_ h_stdin);
   
  +#if 0
   modperl_env_request_untie(aTHX_ r);
  +#endif
   
   modperl_perl_global_restore(aTHX_ rcfg-perl_globals);
   
  
  
  
  1.11  +6 -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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_env.c 2001/09/28 17:15:08 1.10
  +++ modperl_env.c 2001/09/28 17:27:45 1.11
  @@ -133,6 +133,12 @@
   }
   #endif
   
  +/*
  + * XXX: PL_vtbl_* are global (not per-interpreter)
  + * so this method of tie-ing is not thread-safe
  + * overridding svt_get is only useful with 5.7.2+ and requires
  + * a smarter lookup than the current modperl_env_request_get
  + */
   void modperl_env_request_tie(pTHX_ request_rec *r)
   {
   EnvMgObj = (char *)r;
  
  
  
  1.6   +4 -1  modperl-2.0/t/response/TestApache/cgihandler.pm
  
  Index: cgihandler.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/cgihandler.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- cgihandler.pm 2001/08/01 17:03:19 1.5
  +++ cgihandler.pm 2001/09/28 17:27:46 1.6
  @@ -24,7 +24,10 @@
   else {
   print 1..3\n;
   print ok 1\n, ok , $ENV{FOO}\n;
  -my $foo = $r-subprocess_env-get('FOO');
  +#XXX: current implementation of tie %ENV to $r-subprocess_env
  +# is not threadsafe
  +#my $foo = $r-subprocess_env-get('FOO');
  +my $foo = $ENV{FOO};
   $foo++;
   print ok $foo\n;
   }
  
  
  



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

2001-09-28 Thread dougm

dougm   01/09/28 12:01:50

  Modified:src/modules/perl mod_perl.c
  Log:
  PL_destruct_level should always be 2
  
  Revision  ChangesPath
  1.83  +6 -6  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.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- mod_perl.c2001/09/28 18:34:30 1.82
  +++ mod_perl.c2001/09/28 19:01:50 1.83
  @@ -58,6 +58,7 @@
   
   PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p)
   {
  +dTHXa(NULL);
   MP_dSCFG(s);
   PerlInterpreter *perl;
   int status;
  @@ -81,13 +82,12 @@
   exit(1);
   }
   
  +aTHX = perl;
  +
   perl_construct(perl);
  -#ifdef MP_DEBUG
  -{
  -dTHXa(perl);
  -PL_perl_destruct_level = 2;
  -}
  -#endif
  +
  +PL_perl_destruct_level = 2;
  +
   status = perl_parse(perl, modperl_xs_init, argc, argv, NULL);
   
   if (status) {
  
  
  



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

2001-09-28 Thread dougm

dougm   01/09/28 12:24:44

  Modified:src/modules/perl modperl_perl_global.c modperl_perl_global.h
modperl_util.h
  Log:
  add save/restore of %ENV to Perl global management
  
  Revision  ChangesPath
  1.2   +52 -0 modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl_global.c 2001/09/27 19:03:19 1.1
  +++ modperl_perl_global.c 2001/09/28 19:24:44 1.2
  @@ -2,12 +2,56 @@
   
   static void modperl_perl_global_init(pTHX_ modperl_perl_globals_t *globals)
   {
  +globals-env.gv= PL_envgv;
   globals-inc.gv= PL_incgv;
   globals-defout.gv = PL_defoutgv;
   globals-rs.sv = PL_rs;
   }
   
   static void
  +modperl_perl_global_gvhv_save(pTHX_ modperl_perl_global_gvhv_t *gvhv)
  +{
  +U32 mg_flags;
  +HV *hv = GvHV(gvhv-gv);
  +
  +/*
  + * there should only be a small number of entries in %ENV
  + * at this point: modperl_env.c:modperl_env_const_vars[],
  + * PerlPassEnv and top-level PerlSetEnv
  + * XXX: still; could have have something faster than newHVhv()
  + * especially if we add another GVHV to the globals table that 
  + * might have more entries
  + */
  +
  +/* makes newHVhv() faster in bleedperl */
  +MP_magical_untie(hv, mg_flags);
  +
  +gvhv-tmphv = newHVhv(hv);
  +TAINT_NOT;
  +
  +/* reapply magic flags */
  +MP_magical_tie(hv, mg_flags);
  +MP_magical_tie(gvhv-tmphv, mg_flags);
  +
  +gvhv-orighv = hv;
  +GvHV(gvhv-gv) = gvhv-tmphv;
  +}
  +
  +static void
  +modperl_perl_global_gvhv_restore(pTHX_ modperl_perl_global_gvhv_t *gvhv)
  +{
  +U32 mg_flags;
  +
  +GvHV(gvhv-gv) = gvhv-orighv;
  +
  +/* loose magic for hv_clear()
  + * e.g. for %ENV don't want to clear environ array
  + */
  +MP_magical_untie(gvhv-tmphv, mg_flags);
  +SvREFCNT_dec(gvhv-tmphv);
  +}
  +
  +static void
   modperl_perl_global_gvav_save(pTHX_ modperl_perl_global_gvav_t *gvav)
   {
   AV *av = GvAV(gvav-gv);
  @@ -59,6 +103,7 @@
   }
   
   typedef enum {
  +MP_GLOBAL_GVHV,
   MP_GLOBAL_GVAV,
   MP_GLOBAL_GVIO,
   MP_GLOBAL_SVPV,
  @@ -74,6 +119,7 @@
   STRUCT_OFFSET(modperl_perl_globals_t, m)
   
   static modperl_perl_global_entry_t modperl_perl_global_entries[] = {
  +{ENV,MP_GLOBAL_OFFSET(env),MP_GLOBAL_GVHV}, /* %ENV */
   {INC,MP_GLOBAL_OFFSET(inc),MP_GLOBAL_GVAV}, /* @INC */
   {STDOUT, MP_GLOBAL_OFFSET(defout), MP_GLOBAL_GVIO}, /* $| */
   {/,  MP_GLOBAL_OFFSET(rs), MP_GLOBAL_SVPV}, /* $/ */
  @@ -102,6 +148,9 @@
   MP_dGLOBAL_PTR(globals, i);
   
   switch (modperl_perl_global_entries[i].type) {
  +  case MP_GLOBAL_GVHV:
  +MP_PERL_GLOBAL_SAVE(gvhv, ptr);
  +break;
 case MP_GLOBAL_GVAV:
   MP_PERL_GLOBAL_SAVE(gvav, ptr);
   break;
  @@ -123,6 +172,9 @@
   MP_dGLOBAL_PTR(globals, i);
   
   switch (modperl_perl_global_entries[i].type) {
  +  case MP_GLOBAL_GVHV:
  +MP_PERL_GLOBAL_RESTORE(gvhv, ptr);
  +break;
 case MP_GLOBAL_GVAV:
   MP_PERL_GLOBAL_RESTORE(gvav, ptr);
   break;
  
  
  
  1.2   +7 -0  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl_global.h 2001/09/27 19:03:19 1.1
  +++ modperl_perl_global.h 2001/09/28 19:24:44 1.2
  @@ -9,6 +9,12 @@
   
   typedef struct {
   GV *gv;
  +HV *tmphv;
  +HV *orighv;
  +} modperl_perl_global_gvhv_t;
  +
  +typedef struct {
  +GV *gv;
   char flags;
   } modperl_perl_global_gvio_t;
   
  @@ -19,6 +25,7 @@
   } modperl_perl_global_svpv_t;
   
   typedef struct {
  +modperl_perl_global_gvhv_t env;
   modperl_perl_global_gvav_t inc;
   modperl_perl_global_gvio_t defout;
   modperl_perl_global_svpv_t rs;
  
  
  
  1.18  +7 -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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- modperl_util.h2001/09/25 19:44:02 1.17
  +++ modperl_util.h2001/09/28 19:24:44 1.18
  @@ -21,6 +21,13 @@
   #define SvObjIV(o) SvIV((SV*)SvRV(o))
   #define MgObjIV(m) SvIV((SV*)SvRV(m-mg_obj))
   
  +#define MP_magical_untie

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

2001-09-28 Thread dougm

dougm   01/09/28 12:26:37

  Modified:src/modules/perl modperl_env.h
  Log:
  use new MP_magical_ macros for modperl_env_{tie,untie}
  
  Revision  ChangesPath
  1.8   +2 -3  modperl-2.0/src/modules/perl/modperl_env.h
  
  Index: modperl_env.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_env.h 2001/09/28 18:34:30 1.7
  +++ modperl_env.h 2001/09/28 19:26:37 1.8
  @@ -6,11 +6,10 @@
   #endif
   
   #define modperl_env_untie(mg_flags) \
  -mg_flags = SvMAGICAL((SV*)ENVHV); \
  -SvMAGICAL_off((SV*)ENVHV)
  +MP_magical_untie(ENVHV, mg_flags)
   
   #define modperl_env_tie(mg_flags) \
  -SvFLAGS((SV*)ENVHV) |= mg_flags
  +MP_magical_tie(ENVHV, mg_flags)
   
   void modperl_env_clear(pTHX);
   
  
  
  



cvs commit: modperl-2.0/todo missing_old_features.txt

2001-09-28 Thread dougm

dougm   01/09/28 12:29:53

  Modified:todo missing_old_features.txt
  Log:
  update todos on %ENV
  
  Revision  ChangesPath
  1.9   +10 -1 modperl-2.0/todo/missing_old_features.txt
  
  Index: missing_old_features.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/missing_old_features.txt,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- missing_old_features.txt  2001/09/28 15:16:06 1.8
  +++ missing_old_features.txt  2001/09/28 19:29:53 1.9
  @@ -22,7 +22,16 @@
   
   - PerlFreshRestart
   
  -- cgi emulation, i.e. %ENV/END{}/exit() management
  +- cgi emulation, i.e. END{}/exit() management
  +
  +- %ENV managment:
  +   - %ENV is currently only saved/restored for the perl-script
  + handler, i.e. changes to %ENV outside of a perl-script handler
  + are not cleared.  of course, clean modules would use local() to
  + modify %ENV, but there should be an option to save/restore
  + globals outside of the perl-script handler
  + 
  +   - see if we can avoid touching environ[] until a fork() from Perl happens
   
   - die 404;
   
  
  
  



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

2001-09-28 Thread dougm

dougm   01/09/28 12:53:22

  Modified:src/modules/perl modperl_perl_global.c modperl_perl_global.h
  Log:
  use the address of sv for modperl_perl_global_svpv_t, since it might point to a 
different SV when restore happens
  
  Revision  ChangesPath
  1.3   +4 -4  modperl-2.0/src/modules/perl/modperl_perl_global.c
  
  Index: modperl_perl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl_global.c 2001/09/28 19:24:44 1.2
  +++ modperl_perl_global.c 2001/09/28 19:53:22 1.3
  @@ -5,7 +5,7 @@
   globals-env.gv= PL_envgv;
   globals-inc.gv= PL_incgv;
   globals-defout.gv = PL_defoutgv;
  -globals-rs.sv = PL_rs;
  +globals-rs.sv = PL_rs;
   }
   
   static void
  @@ -92,14 +92,14 @@
   static void
   modperl_perl_global_svpv_save(pTHX_ modperl_perl_global_svpv_t *svpv)
   {
  -svpv-cur = SvCUR(svpv-sv);
  -strncpy(svpv-pv, SvPVX(svpv-sv), sizeof(svpv-pv));
  +svpv-cur = SvCUR(*svpv-sv);
  +strncpy(svpv-pv, SvPVX(*svpv-sv), sizeof(svpv-pv));
   }
   
   static void
   modperl_perl_global_svpv_restore(pTHX_ modperl_perl_global_svpv_t *svpv)
   {
  -sv_setpvn(svpv-sv, svpv-pv, svpv-cur);
  +sv_setpvn(*svpv-sv, svpv-pv, svpv-cur);
   }
   
   typedef enum {
  
  
  
  1.3   +1 -1  modperl-2.0/src/modules/perl/modperl_perl_global.h
  
  Index: modperl_perl_global.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_global.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl_global.h 2001/09/28 19:24:44 1.2
  +++ modperl_perl_global.h 2001/09/28 19:53:22 1.3
  @@ -19,7 +19,7 @@
   } modperl_perl_global_gvio_t;
   
   typedef struct {
  -SV *sv;
  +SV **sv;
   char pv[256]; /* XXX: only need enough for $/ at the moment */
   I32 cur;
   } modperl_perl_global_svpv_t;
  
  
  



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

2001-09-28 Thread dougm

dougm   01/09/28 09:39:15

  Modified:src/modules/perl modperl_env.c modperl_env.h
  Log:
  cut down on some noise with new ENVHV macro
  
  Revision  ChangesPath
  1.9   +4 -4  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_env.c 2001/09/28 15:16:06 1.8
  +++ modperl_env.c 2001/09/28 16:39:15 1.9
  @@ -1,6 +1,6 @@
   #include mod_perl.h
   
  -#define EnvMgObj SvMAGIC((SV*)GvHV(PL_envgv))-mg_ptr
  +#define EnvMgObj SvMAGIC((SV*)ENVHV)-mg_ptr
   
   static MP_INLINE
   void modperl_env_hv_store(pTHX_ HV *hv, apr_table_entry_t *elt)
  @@ -39,7 +39,7 @@
   void modperl_env_request_populate(pTHX_ request_rec *r)
   {
   MP_dRCFG;
  -HV *hv = GvHV(PL_envgv);
  +HV *hv = ENVHV;
   int i;
   U32 mg_flags;
   apr_array_header_t *array;
  @@ -121,7 +121,7 @@
   
   PL_vtbl_envelem.svt_set = MEMBER_TO_FPTR(modperl_env_request_set);
   #ifdef MP_PERL_HV_GMAGICAL_AWARE
  -SvGMAGICAL_on((SV*)GvHV(PL_envgv));
  +SvGMAGICAL_on((SV*)ENVHV);
   PL_vtbl_envelem.svt_get = MEMBER_TO_FPTR(modperl_env_request_get);
   #endif
   }
  @@ -130,7 +130,7 @@
   {
   PL_vtbl_envelem.svt_set = MEMBER_TO_FPTR(Perl_magic_setenv);
   #ifdef MP_PERL_HV_GMAGICAL_AWARE
  -SvGMAGICAL_off((SV*)GvHV(PL_envgv));
  +SvGMAGICAL_off((SV*)ENVHV);
   PL_vtbl_envelem.svt_get = 0;
   #endif
   }
  
  
  
  1.5   +7 -3  modperl-2.0/src/modules/perl/modperl_env.h
  
  Index: modperl_env.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_env.h 2001/09/28 15:16:06 1.4
  +++ modperl_env.h 2001/09/28 16:39:15 1.5
  @@ -1,12 +1,16 @@
   #ifndef MODPERL_ENV_H
   #define MODPERL_ENV_H
   
  +#ifndef ENVHV
  +#   define ENVHV GvHV(PL_envgv)
  +#endif
  +
   #define modperl_env_untie(mg_flags) \
  -mg_flags = SvMAGICAL((SV*)GvHV(PL_envgv)); \
  -SvMAGICAL_off((SV*)GvHV(PL_envgv))
  +mg_flags = SvMAGICAL((SV*)ENVHV); \
  +SvMAGICAL_off((SV*)ENVHV)
   
   #define modperl_env_tie(mg_flags) \
  -SvFLAGS((SV*)GvHV(PL_envgv)) |= mg_flags
  +SvFLAGS((SV*)ENVHV) |= mg_flags
   
   void modperl_env_request_populate(pTHX_ request_rec *r);
   
  
  
  



cvs commit: modperl-2.0/todo api.txt

2001-09-28 Thread dougm

dougm   01/09/28 06:51:57

  Modified:lib/Apache compat.pm
   todo api.txt
  Log:
  add $r-header_(in/out)() to Apache::compat
  Submitted by: Philippe M . Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.13  +29 -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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- compat.pm 2001/09/15 17:57:25 1.12
  +++ compat.pm 2001/09/28 13:51:57 1.13
  @@ -57,6 +57,35 @@
   
   package Apache::RequestRec;
   
  +sub table_set_get {
  +my($r, $table) = (shift, shift);
  +my($key, $value) = @_;
  +
  +if (1 == @_) {
  +return $table-{$key};
  +}
  +elsif (2 == @_) {
  +return $table-{$key} = $value;
  +}
  +elsif (0 == @_) {
  +return $table;
  +}
  +else {
  +my $name = (caller(1))[3];
  +warn Usage: $name([key [,val]]);
  +}
  +}
  +
  +sub header_out {
  +my $r = shift;
  +return $r-table_set_get(scalar $r-headers_out, @_);
  +}
  +
  +sub header_in {
  +my $r = shift;
  +return $r-table_set_get(scalar $r-headers_in, @_);
  +}
  +
   sub register_cleanup {
   shift-pool-cleanup_register(@_);
   }
  
  
  
  1.6   +0 -3  modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- api.txt   2001/09/25 19:44:03 1.5
  +++ api.txt   2001/09/28 13:51:57 1.6
  @@ -9,9 +9,6 @@
   need apr_finfo_t - struct stat conversion (might already be there,
   haven't looked close enough yet)
   
  -$r-header_{in,out}:
  -deprecated, but should be included in Apache::compat
  -
   $r-pnotes:
   not yet implemented
   
  
  
  



cvs commit: modperl-2.0/todo missing_old_features.txt

2001-09-28 Thread dougm

dougm   01/09/28 08:16:06

  Modified:lib/ModPerl Code.pm
   src/modules/perl mod_perl.c modperl_callback.c
modperl_config.c modperl_env.c modperl_env.h
modperl_options.c modperl_types.h
   todo missing_old_features.txt
  Log:
  fix SetupEnv such that:
  PerlOptions +SetupEnv happens as early as possible
  +SetEnv is the default only for perl-script handler
  
  Revision  ChangesPath
  1.70  +10 -3 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.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Code.pm   2001/09/27 19:04:38 1.69
  +++ Code.pm   2001/09/28 15:16:06 1.70
  @@ -96,13 +96,20 @@
   Srv = ['NONE', @ithread_opts, qw(ENABLE AUTOLOAD MERGE_HANDLERS),
   @hook_flags, 'UNSET'],
   Dir = [qw(NONE PARSE_HEADERS SETUP_ENV MERGE_HANDLERS GLOBAL_REQUEST UNSET)],
  -Req = [qw(NONE SET_GLOBAL_REQUEST)],
  +Req = [qw(NONE SET_GLOBAL_REQUEST SETUP_ENV)],
   Interp = [qw(NONE IN_USE PUTBACK CLONED BASE)],
   Handler = [qw(NONE PARSED METHOD OBJECT ANON AUTOLOAD DYNAMIC)],
   );
   
  +$flags{DirSeen} = $flags{Dir};
  +
   my %flags_options = map { $_,1 } qw(Srv Dir);
   
  +my %flags_field = (
  +DirSeen = 'flags-opts_seen',
  +(map { $_, 'flags-opts' } keys %flags_options),
  +);
  +
   sub new {
   my $class = shift;
   bless {
  @@ -334,9 +341,9 @@
   }
   
   my $flags = join $class, qw(Mp FLAGS);
  +my $field = $flags_field{$class} || 'flags';
   
  -print $h_fh \n#define $flags(p) ,
  -  ($flags_options{$class} ? '(p)-flags-opts' : '(p)-flags'), \n;
  +print $h_fh \n#define $flags(p) (p)-$field\n;
   
   $class = Mp$class;
   print $h_fh \n#define ${class}Type $n\n;
  
  
  
  1.79  +5 -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.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- mod_perl.c2001/09/27 23:29:51 1.78
  +++ mod_perl.c2001/09/28 15:16:06 1.79
  @@ -511,6 +511,11 @@
   }
   #endif
   
  +/* default is +SetupEnv, skip if PerlOption -SetupEnv */
  +if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) {
  +modperl_env_request_populate(aTHX_ r);
  +}
  +
   if (MpDirPARSE_HEADERS(dcfg)) {
   rcfg-wbucket.header_parse = 1;
   }
  
  
  
  1.44  +5 -0  modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- modperl_callback.c2001/09/17 23:36:36 1.43
  +++ modperl_callback.c2001/09/28 15:16:06 1.44
  @@ -138,6 +138,11 @@
 case MP_HANDLER_TYPE_PER_SRV:
   modperl_handler_make_args(aTHX_ av_args,
 Apache::RequestRec, r, NULL);
  +
  +/* only happens once per-request */
  +if (MpDirSETUP_ENV(dcfg)) {
  +modperl_env_request_populate(aTHX_ r);
  +}
   break;
 case MP_HANDLER_TYPE_CONNECTION:
   modperl_handler_make_args(aTHX_ av_args,
  
  
  
  1.41  +0 -2  modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- modperl_config.c  2001/09/27 23:31:36 1.40
  +++ modperl_config.c  2001/09/28 15:16:06 1.41
  @@ -9,8 +9,6 @@
   dcfg-interp_scope = MP_INTERP_SCOPE_UNDEF;
   #endif
   
  -MpDirSETUP_ENV_On(dcfg); /* %ENV setup on by default */
  -
   return dcfg;
   }
   
  
  
  
  1.8   +16 -9 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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_env.c 2001/09/27 23:31:36 1.7
  +++ modperl_env.c 2001/09/28 15:16:06 1.8
  @@ -36,19 +36,30 @@
   { NULL }
   };
   
  -static void modperl_env_request_populate(pTHX_ request_rec *r)
  +void modperl_env_request_populate(pTHX_ request_rec *r)
   {
  +MP_dRCFG;
   HV *hv = GvHV(PL_envgv);
   int i;
   U32 mg_flags;
  -apr_array_header_t *array = apr_table_elts(r-subprocess_env

cvs commit: modperl-2.0/t/hooks/TestHooks headerparser.pm

2001-09-28 Thread dougm

dougm   01/09/28 08:21:15

  Modified:t/hooks  .cvsignore
  Added:   t/hooks/TestHooks headerparser.pm
  Log:
  add PerlHeaderParserHandler/SetupEnv test
  
  Revision  ChangesPath
  1.2   +1 -0  modperl-2.0/t/hooks/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/hooks/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .cvsignore2001/09/12 17:11:48 1.1
  +++ .cvsignore2001/09/28 15:21:15 1.2
  @@ -1,3 +1,4 @@
  +headerparser.t
   access.t
   authen.t
   authz.t
  
  
  
  1.1  modperl-2.0/t/hooks/TestHooks/headerparser.pm
  
  Index: headerparser.pm
  ===
  package TestHooks::headerparser;
  
  use strict;
  use warnings FATAL = 'all';
  
  use Apache::Test;
  
  sub handler {
  my $r = shift;
  
  $r-notes-set(url = $ENV{REQUEST_URI});
  
  Apache::OK;
  }
  
  sub response {
  my $r = shift;
  
  plan $r, tests = 1;
  
  ok $r-notes-get('url') eq $r-uri;
  
  Apache::OK;
  }
  
  1;
  __DATA__
  PerlOptions +SetupEnv
  PerlResponseHandler TestHooks::headerparser::response
  SetHandler modperl
  
  
  



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

2001-09-27 Thread dougm

dougm   01/09/27 08:28:51

  Modified:src/modules/perl modperl_cmd.h
  Log:
  add MP_CMD_{SRV,DIR}_FLAG macros
  
  Revision  ChangesPath
  1.7   +8 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_cmd.h 2001/09/06 06:00:08 1.6
  +++ modperl_cmd.h 2001/09/27 15:28:51 1.7
  @@ -42,6 +42,10 @@
   
   #endif
   
  +#define MP_CMD_SRV_FLAG(name, item, desc) \
  +AP_INIT_FLAG( name, modperl_cmd_##item, NULL, \
  +  RSRC_CONF, desc )
  +
   #define MP_CMD_SRV_TAKE1(name, item, desc) \
   AP_INIT_TAKE1( name, modperl_cmd_##item, NULL, \
 RSRC_CONF, desc )
  @@ -64,6 +68,10 @@
   
   #define MP_CMD_DIR_ITERATE(name, item, desc) \
   AP_INIT_ITERATE( name, modperl_cmd_##item, NULL, \
  +  OR_ALL, desc )
  +
  +#define MP_CMD_DIR_FLAG(name, item, desc) \
  +AP_INIT_FLAG( name, modperl_cmd_##item, NULL, \
 OR_ALL, desc )
   
   #endif /* MODPERL_CMD_H */
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_config.c modperl_env.c modperl_env.h modperl_options.c modperl_types.h

2001-09-27 Thread dougm

dougm   01/09/27 16:31:36

  Modified:src/modules/perl modperl_config.c modperl_env.c
modperl_env.h modperl_options.c modperl_types.h
  Log:
  whoops. only meant to commit mod_perl.c, backing out half-way finish changes that 
should not have been committed
  
  Revision  ChangesPath
  1.40  +2 -0  modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- modperl_config.c  2001/09/27 23:29:51 1.39
  +++ modperl_config.c  2001/09/27 23:31:36 1.40
  @@ -9,6 +9,8 @@
   dcfg-interp_scope = MP_INTERP_SCOPE_UNDEF;
   #endif
   
  +MpDirSETUP_ENV_On(dcfg); /* %ENV setup on by default */
  +
   return dcfg;
   }
   
  
  
  
  1.7   +2 -5  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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_env.c 2001/09/27 23:29:51 1.6
  +++ modperl_env.c 2001/09/27 23:31:36 1.7
  @@ -36,7 +36,7 @@
   { NULL }
   };
   
  -void modperl_env_request_populate(pTHX_ request_rec *r)
  +static void modperl_env_request_populate(pTHX_ request_rec *r)
   {
   HV *hv = GvHV(PL_envgv);
   int i;
  @@ -102,14 +102,11 @@
   }
   #endif
   
  -#define MpDirSeenSETUP_ENV(dcfg) \
  -(dcfg-flags-opts_seen  MpDir_f_SETUP_ENV)
  -
   void modperl_env_request_tie(pTHX_ request_rec *r)
   {
   MP_dDCFG;
   
  -if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) {
  +if (MpDirSETUP_ENV(dcfg)) {
   modperl_env_request_populate(aTHX_ r);
   }
   
  
  
  
  1.3   +0 -3  modperl-2.0/src/modules/perl/modperl_env.h
  
  Index: modperl_env.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_env.h 2001/09/27 23:29:51 1.2
  +++ modperl_env.h 2001/09/27 23:31:36 1.3
  @@ -8,10 +8,7 @@
   #define modperl_env_tie(mg_flags) \
   SvFLAGS((SV*)GvHV(PL_envgv)) |= mg_flags
   
  -void modperl_env_request_populate(pTHX_ request_rec *r);
  -
   void modperl_env_request_tie(pTHX_ request_rec *r);
  -
   void modperl_env_request_untie(pTHX_ request_rec *r);
   
   #endif /* MODPERL_ENV_H */
  
  
  
  1.9   +0 -4  modperl-2.0/src/modules/perl/modperl_options.c
  
  Index: modperl_options.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_options.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_options.c 2001/09/27 23:29:51 1.8
  +++ modperl_options.c 2001/09/27 23:31:36 1.9
  @@ -82,8 +82,6 @@
   }
   #endif
   
  -o-opts_seen |= opt;
  -
   if (action == '-') {
   o-opts_remove |= opt;
   o-opts_add = ~opt;
  @@ -127,8 +125,6 @@
   conf-opts_add = add-opts_add;
   conf-opts_remove = add-opts_remove;
   }
  -
  -conf-opts_seen |= add-opts_seen;
   
   return conf;
   }
  
  
  
  1.49  +0 -1  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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- modperl_types.h   2001/09/27 23:29:51 1.48
  +++ modperl_types.h   2001/09/27 23:31:36 1.49
  @@ -98,7 +98,6 @@
   modperl_opts_t opts_add;
   modperl_opts_t opts_remove;
   modperl_opts_t opts_override;
  -modperl_opts_t opts_seen;
   int unset;
   } modperl_options_t;
   
  
  
  



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

2001-09-27 Thread dougm

dougm   01/09/27 08:46:21

  Modified:src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h
  Log:
  add PerlTaintCheck directive for backwards compat
  
  Revision  ChangesPath
  1.73  +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.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- mod_perl.c2001/09/27 15:26:36 1.72
  +++ mod_perl.c2001/09/27 15:46:21 1.73
  @@ -428,6 +428,8 @@
   #ifdef MP_COMPAT_1X
   MP_CMD_DIR_ITERATE(PerlHandler, response_handlers,
  Subroutine name),
  +MP_CMD_SRV_FLAG(PerlTaintCheck, taint_check,
  +Turn on -T switch),
   #endif
   MP_CMD_ENTRIES,
   { NULL }, 
  
  
  
  1.7   +14 -0 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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_cmd.c 2001/08/08 16:20:31 1.6
  +++ modperl_cmd.c 2001/09/27 15:46:21 1.7
  @@ -84,6 +84,20 @@
   return NULL;
   }
   
  +
  +#ifdef MP_COMPAT_1X
  +
  +MP_CMD_SRV_DECLARE_FLAG(taint_check)
  +{
  +if (on) {
  +return modperl_cmd_switches(parms, dummy, -T);
  +}
  +
  +return NULL;
  +}
  +
  +#endif /* MP_COMPAT_1X */
  +
   #ifdef USE_ITHREADS
   
   #define MP_INTERP_SCOPE_USAGE PerlInterpScope must be one of 
  
  
  
  1.9   +6 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_cmd.h 2001/09/27 15:39:57 1.8
  +++ modperl_cmd.h 2001/09/27 15:46:21 1.9
  @@ -23,6 +23,12 @@
   MP_CMD_SRV_DECLARE(requires);
   MP_CMD_SRV_DECLARE(options);
   
  +#ifdef MP_COMPAT_1X
  +
  +MP_CMD_SRV_DECLARE_FLAG(taint_check);
  +
  +#endif /* MP_COMPAT_1X */
  +
   #ifdef USE_ITHREADS
   MP_CMD_SRV_DECLARE(interp_start);
   MP_CMD_SRV_DECLARE(interp_max);
  
  
  



cvs commit: modperl-2.0/t/response/TestModules cgi.pm

2001-09-27 Thread dougm

dougm   01/09/27 08:50:37

  Modified:src/modules/perl modperl_cmd.c modperl_cmd.h
   t/response/TestModules cgi.pm
  Log:
  s/dummy/mconfig/g; s/on/flag_on/g
  
  Revision  ChangesPath
  1.8   +5 -5  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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_cmd.c 2001/09/27 15:46:21 1.7
  +++ modperl_cmd.c 2001/09/27 15:50:37 1.8
  @@ -63,7 +63,7 @@
   MP_CMD_SRV_DECLARE(options)
   {
   MP_dSCFG(parms-server);
  -modperl_config_dir_t *dcfg = (modperl_config_dir_t *)dummy;
  +modperl_config_dir_t *dcfg = (modperl_config_dir_t *)mconfig;
   int is_per_dir = parms-path ? 1 : 0;
   modperl_options_t *opts = is_per_dir ? dcfg-flags : scfg-flags;
   apr_pool_t *p = parms-pool;
  @@ -89,8 +89,8 @@
   
   MP_CMD_SRV_DECLARE_FLAG(taint_check)
   {
  -if (on) {
  -return modperl_cmd_switches(parms, dummy, -T);
  +if (flag_on) {
  +return modperl_cmd_switches(parms, mconfig, -T);
   }
   
   return NULL;
  @@ -117,7 +117,7 @@
   MP_CMD_SRV_DECLARE(interp_scope)
   {
   modperl_interp_scope_e *scope;
  -modperl_config_dir_t *dcfg = (modperl_config_dir_t *)dummy;
  +modperl_config_dir_t *dcfg = (modperl_config_dir_t *)mconfig;
   MP_dSCFG(parms-server);
   int is_per_dir = parms-path ? 1 : 0;
   
  @@ -154,7 +154,7 @@
   
   #define MP_CMD_INTERP_POOL_IMP(xitem) \
   const char *modperl_cmd_interp_##xitem(cmd_parms *parms, \
  -  void *dummy, const char *arg) \
  +  void *mconfig, const char *arg) \
   { \
   MP_dSCFG(parms-server); \
   int item = atoi(arg); \
  
  
  
  1.10  +3 -3  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_cmd.h 2001/09/27 15:46:21 1.9
  +++ modperl_cmd.h 2001/09/27 15:50:37 1.10
  @@ -7,15 +7,15 @@
   
   #define MP_CMD_SRV_DECLARE(item) \
   const char *modperl_cmd_##item(cmd_parms *parms, \
  -   void *dummy, const char *arg)
  +   void *mconfig, const char *arg)
   
   #define MP_CMD_SRV_DECLARE2(item) \
   const char *modperl_cmd_##item(cmd_parms *parms, \
  -   void *dummy, const char *arg1, const char *arg2)
  +   void *mconfig, const char *arg1, const char *arg2)
   
   #define MP_CMD_SRV_DECLARE_FLAG(item) \
   const char *modperl_cmd_##item(cmd_parms *parms, \
  -   void *dummy, int on)
  +   void *mconfig, int flag_on)
   
   MP_CMD_SRV_DECLARE(trace);
   MP_CMD_SRV_DECLARE(switches);
  
  
  
  1.6   +2 -0  modperl-2.0/t/response/TestModules/cgi.pm
  
  Index: cgi.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModules/cgi.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- cgi.pm2001/06/27 05:36:52 1.5
  +++ cgi.pm2001/09/27 15:50:37 1.6
  @@ -9,6 +9,8 @@
   sub handler {
   my $r = shift;
   
  +system echo hi;
  +
   if ($CGI::Q) {
   die CGI.pm globals were not reset;
   }
  
  
  



cvs commit: modperl-2.0/t/response/TestModules cgi.pm

2001-09-27 Thread dougm

dougm   01/09/27 08:52:09

  Modified:t/response/TestModules cgi.pm
  Log:
  whoops; lame -T test was not supposed to be committed
  
  Revision  ChangesPath
  1.7   +0 -2  modperl-2.0/t/response/TestModules/cgi.pm
  
  Index: cgi.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModules/cgi.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- cgi.pm2001/09/27 15:50:37 1.6
  +++ cgi.pm2001/09/27 15:52:09 1.7
  @@ -9,8 +9,6 @@
   sub handler {
   my $r = shift;
   
  -system echo hi;
  -
   if ($CGI::Q) {
   die CGI.pm globals were not reset;
   }
  
  
  



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

2001-09-27 Thread dougm

dougm   01/09/27 12:04:39

  Modified:lib/ModPerl Code.pm
   src/modules/perl mod_perl.c mod_perl.h modperl_types.h
  Log:
  integrate modperl_perl_global module
  
  Revision  ChangesPath
  1.69  +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.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Code.pm   2001/09/20 06:07:48 1.68
  +++ Code.pm   2001/09/27 19:04:38 1.69
  @@ -525,7 +525,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 perl_global);
   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.75  +4 -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.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- mod_perl.c2001/09/27 15:56:44 1.74
  +++ mod_perl.c2001/09/27 19:04:38 1.75
  @@ -510,6 +510,8 @@
   rcfg-wbucket.header_parse = 1;
   }
   
  +modperl_perl_global_save(aTHX_ rcfg-perl_globals);
  +
   h_stdout = modperl_io_tie_stdout(aTHX_ r);
   h_stdin  = modperl_io_tie_stdin(aTHX_ r);
   
  @@ -520,6 +522,8 @@
   modperl_io_handle_untie(aTHX_ h_stdin);
   
   modperl_env_request_untie(aTHX_ r);
  +
  +modperl_perl_global_restore(aTHX_ rcfg-perl_globals);
   
   #ifdef USE_ITHREADS
   if (MpInterpPUTBACK(interp)) {
  
  
  
  1.38  +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.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- mod_perl.h2001/09/27 15:26:36 1.37
  +++ mod_perl.h2001/09/27 19:04:38 1.38
  @@ -12,6 +12,7 @@
   
   #include modperl_flags.h
   #include modperl_hooks.h
  +#include modperl_perl_global.h
   
   #ifdef MP_USE_GTOP
   #include modperl_gtop.h
  
  
  
  1.47  +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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- modperl_types.h   2001/08/30 05:15:51 1.46
  +++ modperl_types.h   2001/09/27 19:04:38 1.47
  @@ -205,6 +205,7 @@
   modperl_wbucket_t wbucket;
   MpAV *handlers_per_dir[MP_HANDLER_NUM_PER_DIR];
   MpAV *handlers_per_srv[MP_HANDLER_NUM_PER_SRV];
  +modperl_perl_globals_t perl_globals;
   #ifdef USE_ITHREADS
   modperl_interp_t *interp;
   #endif
  
  
  



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

2001-09-27 Thread dougm

dougm   01/09/27 12:35:34

  Modified:src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h
  Log:
  add PerlSendHeader directive for backwards compat
  
  Revision  ChangesPath
  1.76  +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.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- mod_perl.c2001/09/27 19:04:38 1.75
  +++ mod_perl.c2001/09/27 19:35:34 1.76
  @@ -426,6 +426,8 @@
Scope of a Perl interpreter),
   #endif
   #ifdef MP_COMPAT_1X
  +MP_CMD_DIR_FLAG(PerlSendHeader, send_header,
  +Tell mod_perl to scan output for HTTP headers),
   MP_CMD_DIR_ITERATE(PerlHandler, response_handlers,
  Subroutine name),
   MP_CMD_SRV_FLAG(PerlTaintCheck, taint_check,
  
  
  
  1.10  +6 -0  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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_cmd.c 2001/09/27 15:56:44 1.9
  +++ modperl_cmd.c 2001/09/27 19:35:34 1.10
  @@ -105,6 +105,12 @@
   return NULL;
   }
   
  +MP_CMD_SRV_DECLARE_FLAG(send_header)
  +{
  +char *arg = flag_on ? +ParseHeaders : -ParseHeaders;
  +return modperl_cmd_options(parms, mconfig, arg);
  +}
  +
   #endif /* MP_COMPAT_1X */
   
   #ifdef USE_ITHREADS
  
  
  
  1.12  +1 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- modperl_cmd.h 2001/09/27 15:56:44 1.11
  +++ modperl_cmd.h 2001/09/27 19:35:34 1.12
  @@ -27,6 +27,7 @@
   
   MP_CMD_SRV_DECLARE_FLAG(taint_check);
   MP_CMD_SRV_DECLARE_FLAG(warn);
  +MP_CMD_SRV_DECLARE_FLAG(send_header);
   
   #endif /* MP_COMPAT_1X */
   
  
  
  



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

2001-09-25 Thread dougm

dougm   01/09/25 12:44:03

  Modified:lib/ModPerl WrapXS.pm
   src/modules/perl modperl_perl_includes.h modperl_util.c
modperl_util.h
   t/response/TestAPR table.pm
   todo api.txt
   xs   modperl_xs_util.h typemap
   xs/APR/Table APR__Table.h
   xs/maps  apr_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  add APR::Table tied interface support
  Submitted by: Philippe M . Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.22  +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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- WrapXS.pm 2001/09/13 02:37:37 1.21
  +++ WrapXS.pm 2001/09/25 19:44:02 1.22
  @@ -506,6 +506,7 @@
   my %typemap = (
   'Apache::RequestRec' = 'T_APACHEOBJ',
   'apr_time_t' = 'T_APR_TIME',
  +'APR::Table' = 'T_HASHOBJ',
   );
   
   sub write_typemap {
  
  
  
  1.6   +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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- modperl_perl_includes.h   2001/09/25 17:30:32 1.5
  +++ modperl_perl_includes.h   2001/09/25 19:44:02 1.6
  @@ -51,4 +51,8 @@
   #   define G_METHOD 64
   #endif
   
  +#ifndef PERL_MAGIC_tied
  +#   define PERL_MAGIC_tied 'P'
  +#endif
  +
   #endif /* MODPERL_PERL_INCLUDES_H */
  
  
  
  1.18  +47 -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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- modperl_util.c2001/08/08 16:20:32 1.17
  +++ modperl_util.c2001/09/25 19:44:02 1.18
  @@ -339,3 +339,50 @@
   return uri;
   }
   
  +MP_INLINE SV *modperl_hash_tie(pTHX_ 
  +   const char *classname,
  +   SV *tsv, void *p)
  +{
  +SV *hv = (SV*)newHV();
  +SV *rsv = newSViv(0);
  +
  +sv_setref_pv(rsv, classname, p);
  +sv_magic(hv, rsv, PERL_MAGIC_tied, Nullch, 0);
  +
  +return SvREFCNT_inc(sv_bless(sv_2mortal(newRV_noinc(hv)),
  + gv_stashpv(classname, TRUE)));
  +}
  +
  +MP_INLINE void *modperl_hash_tied_object(pTHX_ 
  + const char *classname,
  + SV *tsv)
  +{
  +if (sv_derived_from(tsv, classname)) {
  +if (SVt_PVHV == SvTYPE(SvRV(tsv))) {
  +SV *hv = SvRV(tsv);
  +MAGIC *mg;
  +
  +if (SvMAGICAL(hv)) {
  +if ((mg = mg_find(hv, PERL_MAGIC_tied))) {
  +return (void *)MgObjIV(mg);
  +}
  +else {
  +Perl_warn(aTHX_ Not a tied hash: (magic=%c), mg);
  +}
  +}
  +else {
  +Perl_warn(aTHX_ SV is not tied);
  +}
  +}
  +else {
  +return (void *)SvObjIV(tsv);
  +}
  +}
  +else {
  +Perl_croak(aTHX_
  +   argument is not a blessed reference 
  +   (expecting an %s derived object), classname);
  +}
  +
  +return NULL;
  +}
  
  
  
  1.17  +9 -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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- modperl_util.h2001/08/08 07:02:41 1.16
  +++ modperl_util.h2001/09/25 19:44:02 1.17
  @@ -19,6 +19,7 @@
   #endif
   
   #define SvObjIV(o) SvIV((SV*)SvRV(o))
  +#define MgObjIV(m) SvIV((SV*)SvRV(m-mg_obj))
   
   MP_INLINE server_rec *modperl_sv2server_rec(pTHX_ SV *sv);
   MP_INLINE request_rec *modperl_sv2request_rec(pTHX_ SV *sv);
  @@ -49,5 +50,13 @@
   modperl_cleanup_data_t *modperl_cleanup_data_new(apr_pool_t *p, void *data);
   
   MP_INLINE modperl_uri_t *modperl_uri_new(apr_pool_t *p);
  +
  +/* tie %hash */
  +MP_INLINE SV *modperl_hash_tie(pTHX_ const char *classname,
  +   SV *tsv, void *p);
  +
  +/* tied %hash */
  +MP_INLINE void *modperl_hash_tied_object(pTHX_ const char *classname,
  + SV *tsv);
   
   #endif /* MODPERL_UTIL_H */
  
  
  
  1.3   +29 -2 modperl-2.0/t/response

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

2001-09-25 Thread dougm

dougm   01/09/25 09:33:30

  Modified:lib/Apache ParseSource.pm
  Log:
  skip mod_cgi.h
  
  Revision  ChangesPath
  1.27  +1 -1  modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ParseSource.pm2001/09/06 16:40:11 1.26
  +++ ParseSource.pm2001/09/25 16:33:30 1.27
  @@ -88,7 +88,7 @@
   
   my @includes;
   my $unwanted = join '|', qw(ap_listen internal version
  -apr_optional mod_include
  +apr_optional mod_include mod_cgi
   mod_ssl ssl_);
   
   for my $dir (@dirs) {
  
  
  



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

2001-09-25 Thread dougm

dougm   01/09/25 10:30:32

  Modified:lib/Apache ParseSource.pm
   src/modules/perl modperl_perl_includes.h
  Log:
  C::Scan does not properly remove __attribute__ within
  function prototypes; so we just rip them all out via cpp
  
  Revision  ChangesPath
  1.28  +1 -1  modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ParseSource.pm2001/09/25 16:33:30 1.27
  +++ ParseSource.pm2001/09/25 17:30:31 1.28
  @@ -60,7 +60,7 @@
   my $c = C::Scan-new(filename = $self-{scan_filename});
   
   $c-set(includeDirs = $self-includes);
  -$c-set(Defines = '-DCORE_PRIVATE');
  +$c-set(Defines = '-DCORE_PRIVATE -DMP_SOURCE_SCAN');
   
   bless $c, 'Apache::ParseSource::Scan';
   }
  
  
  
  1.5   +8 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_perl_includes.h   2001/03/15 01:26:18 1.4
  +++ modperl_perl_includes.h   2001/09/25 17:30:32 1.5
  @@ -18,6 +18,14 @@
   #   define PERL_CORE
   #endif
   
  +#ifdef MP_SOURCE_SCAN
  +/* XXX: C::Scan does not properly remove __attribute__ within
  + * function prototypes; so we just rip them all out via cpp
  + */
  +#   undef __attribute__
  +#   define __attribute__(arg)
  +#endif
  +
   #include EXTERN.h
   #include perl.h
   #include XSUB.h
  
  
  



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

2001-09-25 Thread dougm

dougm   01/09/25 11:02:39

  Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.20  +167 -1modperl-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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- FunctionTable.pm  2001/09/15 17:53:12 1.19
  +++ FunctionTable.pm  2001/09/25 18:02:39 1.20
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Sat Sep 15 10:57:55 2001
  +# !  Tue Sep 25 10:58:26 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -188,6 +188,24 @@
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'ap_allow_standard_methods',
  +'args' = [
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'reset'
  +  },
  +  {
  +'type' = '...',
  +'name' = 'arg2'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'const char *',
   'name' = 'ap_auth_name',
   'args' = [
  @@ -736,6 +754,34 @@
 },
 {
   'return_type' = 'apr_status_t',
  +'name' = 'ap_explode_recent_gmt',
  +'args' = [
  +  {
  +'type' = 'apr_exploded_time_t *',
  +'name' = 'tm'
  +  },
  +  {
  +'type' = 'apr_time_t',
  +'name' = 't'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'ap_explode_recent_localtime',
  +'args' = [
  +  {
  +'type' = 'apr_exploded_time_t *',
  +'name' = 'tm'
  +  },
  +  {
  +'type' = 'apr_time_t',
  +'name' = 't'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
   'name' = 'ap_fflush',
   'args' = [
 {
  @@ -6557,6 +6603,24 @@
 },
 {
   'return_type' = 'apr_status_t',
  +'name' = 'apr_file_mktemp',
  +'args' = [
  +  {
  +'type' = 'apr_file_t **',
  +'name' = 'fp'
  +  },
  +  {
  +'type' = 'char *',
  +'name' = 'tmplt'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'p'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
   'name' = 'apr_file_name_get',
   'args' = [
 {
  @@ -8979,6 +9043,104 @@
   ]
 },
 {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_proc_mutex_child_init',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t **',
  +'name' = 'mutex'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'fname'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'pool'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_proc_mutex_create',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t **',
  +'name' = 'mutex'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'fname'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'pool'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_proc_mutex_create_np',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t **',
  +'name' = 'mutex'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'fname'
  +  },
  +  {
  +'type' = 'apr_lockmech_e_np',
  +'name' = 'mech'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'pool'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_proc_mutex_destroy',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t *',
  +'name' = 'mutex'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_proc_mutex_lock',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t *',
  +'name' = 'mutex'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_proc_mutex_trylock',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t *',
  +'name' = 'mutex'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_proc_mutex_unlock',
  +'args' = [
  +  {
  +'type' = 'apr_proc_mutex_t *',
  +'name' = 'mutex'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'apr_proc_other_child_check',
   'args' = []
  @@ -9042,6 +9204,10

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

2001-09-23 Thread dougm

dougm   01/09/23 20:32:55

  Modified:src/modules/perl modperl_bucket.c
  Log:
  adjust to bucket api changes (no more sms)
  Submitted by:   Ryan Bloom [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.7   +5 -15 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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- modperl_bucket.c  2001/08/27 17:14:48 1.6
  +++ modperl_bucket.c  2001/09/24 03:32:55 1.7
  @@ -9,7 +9,6 @@
   apr_bucket_refcount refcount;
   SV *sv;
   PerlInterpreter *perl;
  -apr_sms_t *sms;
   } modperl_bucket_sv_t;
   
   static apr_status_t
  @@ -45,7 +44,7 @@
   
   SvREFCNT_dec(svbucket-sv);
   
  -apr_sms_free(svbucket-sms, svbucket);
  +free(svbucket);
   }
   
   static const apr_bucket_type_t modperl_bucket_sv_type = {
  @@ -64,11 +63,8 @@
   {
   modperl_bucket_sv_t *svbucket; 
   
  -svbucket = (modperl_bucket_sv_t *)apr_sms_malloc(bucket-sms,
  - sizeof(*svbucket));
  +svbucket = (modperl_bucket_sv_t *)malloc(sizeof(*svbucket));
   
  -svbucket-sms = bucket-sms;
  -
   bucket = apr_bucket_shared_make(bucket, svbucket, offset, offset+len);
   
   /* XXX: need to deal with PerlInterpScope */
  @@ -78,7 +74,7 @@
   svbucket-sv = sv;
   
   if (!bucket) {
  -apr_sms_free(svbucket-sms, svbucket);
  +free(svbucket);
   return NULL;
   }
   
  @@ -88,23 +84,17 @@
  (unsigned long)sv, SvREFCNT(sv));
   
   bucket-type = modperl_bucket_sv_type;
  +bucket-free = free;
   
   return bucket;
   }
   
   apr_bucket *modperl_bucket_sv_create(pTHX_ SV *sv, int offset, int len)
   {
  -apr_sms_t *sms;
   apr_bucket *bucket;
  -
  -if (!apr_bucket_global_sms) {
  -apr_sms_std_create(apr_bucket_global_sms);
  -}
   
  -sms = apr_bucket_global_sms;
  -bucket = (apr_bucket *)apr_sms_malloc(sms, sizeof(*bucket));
  +bucket = (apr_bucket *)malloc(sizeof(*bucket));
   APR_BUCKET_INIT(bucket);
  -bucket-sms = sms;
   
   return modperl_bucket_sv_make(aTHX_ bucket, sv, offset, len);
   }
  
  
  



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

2001-09-17 Thread dougm

dougm   01/09/17 16:36:36

  Modified:lib/ModPerl Code.pm
   src/modules/perl mod_perl.c modperl_callback.c
modperl_config.c
  Log:
  s/Enabled/Enable/g for the PerlOption
  
  Revision  ChangesPath
  1.67  +2 -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.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- Code.pm   2001/09/15 22:25:55 1.66
  +++ Code.pm   2001/09/17 23:36:35 1.67
  @@ -91,7 +91,7 @@
   my @hook_flags = (map { canon_uc($_) } keys %hooks);
   my @ithread_opts = qw(CLONE PARENT);
   my %flags = (
  -Srv = ['NONE', @ithread_opts, qw(ENABLED AUTOLOAD MERGE_HANDLERS),
  +Srv = ['NONE', @ithread_opts, qw(ENABLE AUTOLOAD MERGE_HANDLERS),
   @hook_flags, 'UNSET'],
   Dir = [qw(NONE PARSE_HEADERS SETUP_ENV MERGE_HANDLERS GLOBAL_REQUEST UNSET)],
   Req = [qw(NONE SET_GLOBAL_REQUEST)],
  @@ -293,7 +293,7 @@
   $protostr
   {
   $prototype-{cfg}-{get};
  -if (!MpSrvENABLED(scfg)) {
  +if (!MpSrvENABLE(scfg)) {
   return apr_pstrcat(parms-pool,
  Perl is disabled for server ,
  parms-server-server_hostname, NULL);
  
  
  
  1.71  +2 -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.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- mod_perl.c2001/09/16 01:05:44 1.70
  +++ mod_perl.c2001/09/17 23:36:35 1.71
  @@ -135,7 +135,7 @@
   }
   #endif
   
  -if (!MpSrvENABLED(base_scfg)) {
  +if (!MpSrvENABLE(base_scfg)) {
   /* how silly */
   return;
   }
  @@ -170,7 +170,7 @@
   
   #ifdef USE_ITHREADS
   
  -if (!MpSrvENABLED(scfg)) {
  +if (!MpSrvENABLE(scfg)) {
   scfg-mip = NULL;
   continue;
   }
  
  
  
  1.43  +1 -1  modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- modperl_callback.c2001/05/22 22:13:20 1.42
  +++ modperl_callback.c2001/09/17 23:36:36 1.43
  @@ -96,7 +96,7 @@
   const char *desc = NULL;
   AV *av_args = Nullav;
   
  -if (!MpSrvENABLED(scfg)) {
  +if (!MpSrvENABLE(scfg)) {
   MP_TRACE_h(MP_FUNC, PerlOff for server %s\n,
  s-server_hostname);
   return DECLINED;
  
  
  
  1.37  +1 -1  modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- modperl_config.c  2001/09/15 20:17:35 1.36
  +++ modperl_config.c  2001/09/17 23:36:36 1.37
  @@ -68,7 +68,7 @@
   apr_pcalloc(p, sizeof(*scfg));
   
   scfg-flags = modperl_options_new(p, MpSrvType);
  -MpSrvENABLED_On(scfg); /* mod_perl enabled by default */
  +MpSrvENABLE_On(scfg); /* mod_perl enabled by default */
   MpSrvHOOKS_ALL_On(scfg); /* all hooks enabled by default */
   
   scfg-PerlModule  = apr_array_make(p, 2, sizeof(char *));
  
  
  



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

2001-09-16 Thread dougm

dougm   01/09/16 10:28:43

  Modified:src/modules/perl modperl_interp.h modperl_perl.c
modperl_perl.h
  Log:
  fixes to compile with non-ithreads perl
  
  Revision  ChangesPath
  1.13  +6 -4  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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- modperl_interp.h  2001/09/16 00:54:33 1.12
  +++ modperl_interp.h  2001/09/16 17:28:43 1.13
  @@ -7,6 +7,7 @@
   apr_status_t modperl_interp_cleanup(void *data);
   
   #ifdef USE_ITHREADS
  +
   const char *modperl_interp_scope_desc(modperl_interp_scope_e scope);
   
   void modperl_interp_clone_init(modperl_interp_t *interp);
  @@ -38,10 +39,6 @@
   void modperl_interp_pool_remove(modperl_interp_pool_t *mip,
   modperl_interp_t *interp);
   
  -#else
  -#define MP_dINTERP_SELECT(r, c, s) dNOOP
  -#endif
  -
   typedef apr_status_t (*modperl_interp_mip_walker_t)(pTHX_ 
   modperl_interp_pool_t *mip,
   void *data);
  @@ -56,5 +53,10 @@
server_rec *base_server,
modperl_interp_mip_walker_t walker,
void *data);
  +#else
  +
  +#define MP_dINTERP_SELECT(r, c, s) dNOOP
  +
  +#endif /* USE_ITHREADS */
   
   #endif /* MODPERL_INTERP_H */
  
  
  
  1.4   +11 -7 modperl-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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- modperl_perl.c2001/09/16 01:05:44 1.3
  +++ modperl_perl.c2001/09/16 17:28:43 1.4
  @@ -32,13 +32,6 @@
   #endif
   }
   
  -apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  -   void *data)
  -{
  -modperl_perl_init_ids(aTHX_ (modperl_perl_ids_t *)data);
  -return APR_SUCCESS;
  -}
  -
   void modperl_perl_init_ids_server(server_rec *s)
   {
   modperl_perl_ids_t ids;
  @@ -51,3 +44,14 @@
   modperl_perl_init_ids(aTHX_ ids);
   #endif
   }
  +
  +#ifdef USE_ITHREADS
  +
  +apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  +   void *data)
  +{
  +modperl_perl_init_ids(aTHX_ (modperl_perl_ids_t *)data);
  +return APR_SUCCESS;
  +}
  +
  +#endif /* USE_ITHREADS */
  
  
  
  1.4   +5 -1  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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- modperl_perl.h2001/09/16 01:05:44 1.3
  +++ modperl_perl.h2001/09/16 17:28:43 1.4
  @@ -11,9 +11,13 @@
   
   void modperl_perl_init_ids(pTHX_ modperl_perl_ids_t *ids);
   
  +void modperl_perl_init_ids_server(server_rec *s);
  +
  +#ifdef USE_ITHREADS
  +
   apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  void *data);
   
  -void modperl_perl_init_ids_server(server_rec *s);
  +#endif /* USE_ITHREADS */
   
   #endif /* MODPERL_PERL_H */
  
  
  



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

2001-09-16 Thread dougm

dougm   01/09/16 18:06:08

  Modified:xs/maps  apache_functions.map apr_functions.map
  Log:
  mark some functions that will not be available via Perl
  
  Revision  ChangesPath
  1.30  +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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- apache_functions.map  2001/09/10 04:56:13 1.29
  +++ apache_functions.map  2001/09/17 01:06:08 1.30
  @@ -410,7 +410,7 @@
ap_run_log_transaction
   ap_run_rewrite_args
ap_run_create_request
  - ap_run_error_log
  +ap_run_error_log
   ap_run_get_mgmt_items
ap_run_map_to_storage
   ap_run_pre_mpm
  
  
  
  1.21  +3 -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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- apr_functions.map 2001/09/17 00:38:07 1.20
  +++ apr_functions.map 2001/09/17 01:06:08 1.21
  @@ -75,7 +75,7 @@
apr_brigade_destroy
   !apr_brigade_partition
apr_brigade_printf
  - apr_brigade_putstrs
  +-apr_brigade_putstrs
apr_brigade_split
   -apr_brigade_to_iovec
   -apr_brigade_vprintf
  @@ -83,7 +83,7 @@
   !apr_brigade_length
apr_brigade_write
apr_brigade_puts
  - apr_brigade_putc
  +-apr_brigade_putc
   !apr_brigade_cleanup
mpxs_APR__Brigade_first#APR_BRIGADE_FIRST
mpxs_APR__Brigade_last #APR_BRIGADE_LAST
  @@ -159,7 +159,7 @@
apr_pool_get_abort
apr_pool_get_parent
apr_pool_is_ancestor
  - apr_pool_set_abort
  +-apr_pool_set_abort
   
   MODULE=APR::Lock
   !apr_lock_child_init
  
  
  



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

2001-09-15 Thread dougm

dougm   01/09/15 11:17:31

  Modified:lib/ModPerl TypeMap.pm
   t/response/TestAPR table.pm
   todo api.txt
   xs/maps  apr_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Added:   xs/APR/Table APR__Table.h
  Log:
  implement APR::Table-do
  Submitted by: Philippe M . Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.10  +1 -0  modperl-2.0/lib/ModPerl/TypeMap.pm
  
  Index: TypeMap.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TypeMap.pm2001/09/10 05:35:10 1.9
  +++ TypeMap.pm2001/09/15 18:17:31 1.10
  @@ -396,6 +396,7 @@
   Apache__RequestRec = 'r',
   Apache__Server = 'server',
   Apache__Connection = 'connection',
  +APR__Table = 'table',
   APR__UUID = 'uuid',
   apr_status_t = 'status',
   );
  
  
  
  1.2   +54 -1 modperl-2.0/t/response/TestAPR/table.pm
  
  Index: table.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/table.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- table.pm  2001/09/12 16:40:27 1.1
  +++ table.pm  2001/09/15 18:17:31 1.2
  @@ -8,10 +8,13 @@
   use Apache::Const -compile = 'OK';
   use APR::Table ();
   
  +my $filter_count;
  +my $TABLE_SIZE = 20;
  +
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 5;
  +plan $r, tests = 9;
   
   my $table = APR::Table::make($r-pool, 16);
   
  @@ -25,7 +28,57 @@
   
   ok not defined $table-get('foo');
   
  +for (1..$TABLE_SIZE) {
  +$table-set(chr($_+97), $_);
  +}
  +
  +#Simple filtering
  +$filter_count = 0;
  +$table-do(my_filter);
  +ok $filter_count == $TABLE_SIZE;
  +
  +#Filtering aborting in the middle
  +$filter_count = 0;
  +$table-do(my_filter_stop);
  +ok $filter_count == int($TABLE_SIZE)/2;
  +
  +#Filtering with anon sub
  +$filter_count=0;
  +$table-do(sub {
  +my ($key,$value) = @_;
  +$filter_count++;
  +unless ($key eq chr($value+97)) {
  +die arguments I recieved are bogus($key,$value);
  +}
  +return 1;
  +});
  +
  +ok $filter_count == $TABLE_SIZE;
  +
  +$filter_count = 0;
  +$table-do(my_filter, c, b, e);
  +ok $filter_count == 3;
  +
   Apache::OK;
  +}
  +
  +sub my_filter {
  +my ($key,$value) = @_;
  +$filter_count++;
  +unless ($key eq chr($value+97)) {
  +die arguments I recieved are bogus($key,$value);
  +}
  +return 1;
  +}
  +
  +sub my_filter_stop {
  +my ($key,$value) = @_;
  +$filter_count++;
  +unless ($key eq chr($value+97)) {
  +die arguments I recieved are bogus($key,$value);
  +}
  +return 0 if ($filter_count == int($TABLE_SIZE)/2);
  +return 1;
   }
   
   1;
  
  
  
  1.4   +0 -2  modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- api.txt   2001/09/15 17:57:25 1.3
  +++ api.txt   2001/09/15 18:17:31 1.4
  @@ -9,8 +9,6 @@
   $r-headers_out-{KEY} is not currently supported
   might want to make this optional, disabled by default
   
  -missing: APR::Table-do
  -
   $r-finfo:
   need apr_finfo_t - struct stat conversion (might already be there,
   haven't looked close enough yet)
  
  
  
  1.1  modperl-2.0/xs/APR/Table/APR__Table.h
  
  Index: APR__Table.h
  ===
  typedef struct {
  SV *cv;
  apr_table_t *filter; /*XXX: or maybe a mgv ? */
  } mpxs_table_do_cb_data_t;
  
  typedef int (*mpxs_apr_table_do_cb_t)(void *, const char *, const char *);
  
  static int mpxs_apr_table_do_cb(void *data,
  const char *key, const char *val)
  {
  dTHX; /*XXX*/
  dSP;
  int rv = 0;
  mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data;
  
  /* Skip completely if something is wrong */
  if (!(tdata  tdata-cv  key  val)) {
  return 0;
  }
  
  /* Skip entries if not in our filter list */
  if (tdata-filter) {
  if (!apr_table_get(tdata-filter, key)) {
  return 1;
  }
  }
  
  ENTER;
  SAVETMPS;
  
  PUSHMARK(sp);
  XPUSHs(sv_2mortal(newSVpv(key,0)));
  XPUSHs(sv_2mortal(newSVpv(val,0)));
  PUTBACK;
  
  rv = call_sv(tdata-cv, 0);
  SPAGAIN;
  rv = (1 == rv) ? POPi : 1;
  PUTBACK;
  
  FREETMPS;
  LEAVE;
  
  /* rv of 0 aborts the traversal */
  return rv

cvs commit: modperl-2.0/xs/APR/Table APR__Table.h

2001-09-15 Thread dougm

dougm   01/09/15 11:21:48

  Modified:xs/APR/Table APR__Table.h
  Log:
  avoid dTHX; in APR::Table-do
  
  Revision  ChangesPath
  1.2   +7 -3  modperl-2.0/xs/APR/Table/APR__Table.h
  
  Index: APR__Table.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/Table/APR__Table.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- APR__Table.h  2001/09/15 18:17:31 1.1
  +++ APR__Table.h  2001/09/15 18:21:48 1.2
  @@ -1,6 +1,7 @@
   typedef struct {
   SV *cv;
   apr_table_t *filter; /*XXX: or maybe a mgv ? */
  +PerlInterpreter *perl;
   } mpxs_table_do_cb_data_t;
   
   typedef int (*mpxs_apr_table_do_cb_t)(void *, const char *, const char *);
  @@ -8,10 +9,10 @@
   static int mpxs_apr_table_do_cb(void *data,
   const char *key, const char *val)
   {
  -dTHX; /*XXX*/
  +mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data;
  +dTHXa(tdata-perl);
   dSP;
   int rv = 0;
  -mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data;
   
   /* Skip completely if something is wrong */
   if (!(tdata  tdata-cv  key  val)) {
  @@ -56,7 +57,10 @@

   tdata.cv = sub;
   tdata.filter = NULL;
  -
  +#ifdef USE_ITHREADS
  +tdata.perl = aTHX;
  +#endif
  +
   if (items  2) {
   STRLEN len;
   tdata.filter = apr_table_make(table-a.pool, items-2);
  
  
  



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

2001-09-15 Thread dougm

dougm   01/09/15 13:17:35

  Modified:src/modules/perl modperl_config.c
  Log:
  only inherit base PerlSwitches if explicitly told to with PerlSwitches +inherit
  
  Revision  ChangesPath
  1.36  +9 -2  modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- modperl_config.c  2001/08/10 23:37:33 1.35
  +++ modperl_config.c  2001/09/15 20:17:35 1.36
  @@ -168,8 +168,15 @@
   merge_item(perl);
   #endif
   
  -/* argv always initialized to 1 with ap_server_argv0 */
  -mrg-argv = add-argv-nelts  1 ? add-argv : base-argv;
  +if (add-argv-nelts == 2 
  +strEQ(((char **)add-argv-elts)[1], +inherit))
  +{
  +/* only inherit base PerlSwitches if explicitly told to */
  +mrg-argv = base-argv;
  +}
  +else {
  +mrg-argv = add-argv;
  +}
   
   mrg-flags = modperl_options_merge(p, base-flags, add-flags);
   
  
  
  



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

2001-09-15 Thread dougm

dougm   01/09/15 15:25:29

  Added:   src/modules/perl modperl_perl.c modperl_perl.h
  Log:
  new module for small tweaks to the Perl runtime
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_perl.c
  
  Index: modperl_perl.c
  ===
  #include mod_perl.h
  
  /* this module contains mod_perl small tweaks to the Perl runtime
   * others (larger tweaks) are in their own modules, e.g. modperl_env.c
   */
  
  void modperl_perl_init_ids(pTHX)
  {
  sv_setiv(GvSV(gv_fetchpv($, TRUE, SVt_PV)), (I32)getpid());
  
  #ifndef WIN32
  PL_uid  = (int)getuid(); 
  PL_euid = (int)geteuid(); 
  PL_gid  = (int)getgid(); 
  PL_egid = (int)getegid(); 
  MP_TRACE_g(MP_FUNC, 
 uid=%d, euid=%d, gid=%d, egid=%d\n,
 PL_uid, PL_euid, PL_gid, PL_egid);
  #endif
  }
  
  
  
  1.1  modperl-2.0/src/modules/perl/modperl_perl.h
  
  Index: modperl_perl.h
  ===
  #ifndef MODPERL_PERL_H
  #define MODPERL_PERL_H
  
  void modperl_perl_init_ids(pTHX);
  
  #endif /* MODPERL_PERL_H */
  
  
  



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

2001-09-15 Thread dougm

dougm   01/09/15 15:25:55

  Modified:lib/ModPerl Code.pm
  Log:
  integrate modperl_perl.[ch]
  
  Revision  ChangesPath
  1.66  +2 -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.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Code.pm   2001/05/08 21:08:18 1.65
  +++ Code.pm   2001/09/15 22:25:55 1.66
  @@ -522,7 +522,8 @@
   );
   
   my @c_src_names = qw(interp tipool log config cmd options callback handler
  - gtop util io filter bucket mgv pcw global env cgi);
  + gtop util io filter bucket mgv pcw global env cgi
  + perl);
   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 mod_perl.c mod_perl.h

2001-09-15 Thread dougm

dougm   01/09/15 15:26:57

  Modified:src/modules/perl mod_perl.c mod_perl.h
  Log:
  add modperl_hook_child_init
  call modperl_perl_init_ids from modperl_hook_child_init
  
  Revision  ChangesPath
  1.68  +12 -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.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- mod_perl.c2001/09/13 03:18:27 1.67
  +++ mod_perl.c2001/09/15 22:26:57 1.68
  @@ -352,6 +352,15 @@
   return OK;
   }
   
  +static void modperl_hook_child_init(apr_pool_t *p, server_rec *s)
  +{
  +#ifdef USE_ITHREADS
  +/*XXX*/
  +#else
  +modperl_perl_init_ids(aTHX);
  +#endif
  +}
  +
   void modperl_register_hooks(apr_pool_t *p)
   {
   ap_hook_open_logs(modperl_hook_init,
  @@ -391,6 +400,9 @@
   
   ap_hook_header_parser(modperl_hook_header_parser,
 NULL, NULL, APR_HOOK_FIRST);
  +
  +ap_hook_child_init(modperl_hook_child_init,
  +   NULL, NULL, APR_HOOK_MIDDLE);
   
   modperl_register_handler_hooks();
   }
  
  
  
  1.36  +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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mod_perl.h2001/08/19 17:22:55 1.35
  +++ mod_perl.h2001/09/15 22:26:57 1.36
  @@ -34,6 +34,7 @@
   #include modperl_global.h
   #include modperl_env.h
   #include modperl_cgi.h
  +#include modperl_perl.h
   
   void modperl_init(server_rec *s, apr_pool_t *p);
   void modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
  
  
  



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

2001-09-15 Thread dougm

dougm   01/09/15 17:56:15

  Modified:src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h
  Log:
  init ids for ithread Perls
  
  Revision  ChangesPath
  1.69  +6 -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.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- mod_perl.c2001/09/15 22:26:57 1.68
  +++ mod_perl.c2001/09/16 00:56:15 1.69
  @@ -354,10 +354,14 @@
   
   static void modperl_hook_child_init(apr_pool_t *p, server_rec *s)
   {
  +modperl_perl_ids_t ids;
  +modperl_perl_ids_get(ids);
   #ifdef USE_ITHREADS
  -/*XXX*/
  + modperl_interp_mip_walk_servers(NULL, s,
  + modperl_perl_init_ids_mip,
  +(void*)ids);
   #else
  -modperl_perl_init_ids(aTHX);
  +modperl_perl_init_ids(aTHX_ ids);
   #endif
   }
   
  
  
  
  1.2   +28 -8 modperl-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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl.c2001/09/15 22:25:29 1.1
  +++ modperl_perl.c2001/09/16 00:56:15 1.2
  @@ -4,17 +4,37 @@
* others (larger tweaks) are in their own modules, e.g. modperl_env.c
*/
   
  -void modperl_perl_init_ids(pTHX)
  +void modperl_perl_ids_get(modperl_perl_ids_t *ids)
   {
  -sv_setiv(GvSV(gv_fetchpv($, TRUE, SVt_PV)), (I32)getpid());
  -
  +ids-pid  = (I32)getpid();
   #ifndef WIN32
  -PL_uid  = (int)getuid(); 
  -PL_euid = (int)geteuid(); 
  -PL_gid  = (int)getgid(); 
  -PL_egid = (int)getegid(); 
  +ids-uid  = getuid();
  +ids-euid = geteuid(); 
  +ids-gid  = getgid(); 
  +ids-gid  = getegid(); 
  +
   MP_TRACE_g(MP_FUNC, 
  uid=%d, euid=%d, gid=%d, egid=%d\n,
  -   PL_uid, PL_euid, PL_gid, PL_egid);
  +   (int)ids-uid, (int)ids-euid,
  +   (int)ids-gid, (int)ids-egid);
   #endif
  +}
  +
  +void modperl_perl_init_ids(pTHX_ modperl_perl_ids_t *ids)
  +{
  +sv_setiv(GvSV(gv_fetchpv($, TRUE, SVt_PV)), ids-pid);
  +
  +#ifndef WIN32
  +PL_uid  = ids-uid;
  +PL_euid = ids-euid;
  +PL_gid  = ids-gid;
  +PL_egid = ids-egid;
  +#endif
  +}
  +
  +apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  +   void *data)
  +{
  +modperl_perl_init_ids(aTHX_ (modperl_perl_ids_t *)data);
  +return APR_SUCCESS;
   }
  
  
  
  1.2   +12 -1 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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl.h2001/09/15 22:25:29 1.1
  +++ modperl_perl.h2001/09/16 00:56:15 1.2
  @@ -1,6 +1,17 @@
   #ifndef MODPERL_PERL_H
   #define MODPERL_PERL_H
   
  -void modperl_perl_init_ids(pTHX);
  +typedef struct {
  +I32 pid;
  +Uid_t uid, euid;
  +Gid_t gid, egid;
  +} modperl_perl_ids_t;
  +
  +void modperl_perl_ids_get(modperl_perl_ids_t *ids);
  +
  +void modperl_perl_init_ids(pTHX_ modperl_perl_ids_t *ids);
  +
  +apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  +   void *data);
   
   #endif /* MODPERL_PERL_H */
  
  
  



cvs commit: modperl-2.0/todo missing_old_features.txt

2001-09-15 Thread dougm

dougm   01/09/15 17:58:22

  Modified:todo missing_old_features.txt
  Log:
  ids are now set
  
  Revision  ChangesPath
  1.5   +0 -2  modperl-2.0/todo/missing_old_features.txt
  
  Index: missing_old_features.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/missing_old_features.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- missing_old_features.txt  2001/09/06 05:05:46 1.4
  +++ missing_old_features.txt  2001/09/16 00:58:22 1.5
  @@ -26,8 +26,6 @@
   
   - cgi emulation, i.e. %ENV/END{}/@INC/exit() management
   
  -- set Perl ids after fork $( $) $ $ (child_init)
  -
   - die 404;
   
   - ... others ...
  
  
  



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

2001-09-15 Thread dougm

dougm   01/09/15 18:05:44

  Modified:src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h
  Log:
  move code out of modperl_hook_child_init into modperl_perl_init_ids_server
  
  Revision  ChangesPath
  1.70  +1 -9  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.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- mod_perl.c2001/09/16 00:56:15 1.69
  +++ mod_perl.c2001/09/16 01:05:44 1.70
  @@ -354,15 +354,7 @@
   
   static void modperl_hook_child_init(apr_pool_t *p, server_rec *s)
   {
  -modperl_perl_ids_t ids;
  -modperl_perl_ids_get(ids);
  -#ifdef USE_ITHREADS
  - modperl_interp_mip_walk_servers(NULL, s,
  - modperl_perl_init_ids_mip,
  -(void*)ids);
  -#else
  -modperl_perl_init_ids(aTHX_ ids);
  -#endif
  +modperl_perl_init_ids_server(s);
   }
   
   void modperl_register_hooks(apr_pool_t *p)
  
  
  
  1.3   +13 -0 modperl-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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl.c2001/09/16 00:56:15 1.2
  +++ modperl_perl.c2001/09/16 01:05:44 1.3
  @@ -38,3 +38,16 @@
   modperl_perl_init_ids(aTHX_ (modperl_perl_ids_t *)data);
   return APR_SUCCESS;
   }
  +
  +void modperl_perl_init_ids_server(server_rec *s)
  +{
  +modperl_perl_ids_t ids;
  +modperl_perl_ids_get(ids);
  +#ifdef USE_ITHREADS
  + modperl_interp_mip_walk_servers(NULL, s,
  + modperl_perl_init_ids_mip,
  +(void*)ids);
  +#else
  +modperl_perl_init_ids(aTHX_ ids);
  +#endif
  +}
  
  
  
  1.3   +2 -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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl.h2001/09/16 00:56:15 1.2
  +++ modperl_perl.h2001/09/16 01:05:44 1.3
  @@ -14,4 +14,6 @@
   apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  void *data);
   
  +void modperl_perl_init_ids_server(server_rec *s);
  +
   #endif /* MODPERL_PERL_H */
  
  
  



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

2001-09-15 Thread dougm

dougm   01/09/15 10:53:13

  Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.19  +61 -3 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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FunctionTable.pm  2001/09/13 04:39:57 1.18
  +++ FunctionTable.pm  2001/09/15 17:53:12 1.19
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Wed Sep 12 21:41:32 2001
  +# !  Sat Sep 15 10:57:55 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -3519,7 +3519,7 @@
   ]
 },
 {
  -'return_type' = 'void',
  +'return_type' = 'ap_filter_rec_t *',
   'name' = 'ap_register_input_filter',
   'args' = [
 {
  @@ -3537,7 +3537,7 @@
   ]
 },
 {
  -'return_type' = 'void',
  +'return_type' = 'ap_filter_rec_t *',
   'name' = 'ap_register_output_filter',
   'args' = [
 {
  @@ -11006,6 +11006,64 @@
 {
   'type' = 'const char *',
   'name' = 'text'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_broadcast',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_create',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t **',
  +'name' = 'cond'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'pool'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_destroy',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_signal',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_wait',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  },
  +  {
  +'type' = 'apr_thread_mutex_t *',
  +'name' = 'mutex'
 }
   ]
 },
  
  
  
  1.18  +5 -1  modperl-2.0/xs/tables/current/Apache/StructureTable.pm
  
  Index: StructureTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/StructureTable.pm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- StructureTable.pm 2001/09/13 04:39:57 1.17
  +++ StructureTable.pm 2001/09/15 17:53:12 1.18
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Wed Sep 12 21:41:34 2001
  +# !  Sat Sep 15 10:57:57 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -2013,6 +2013,10 @@
   'name' = 'last'
 }
   ]
  +  },
  +  {
  +'type' = 'apr_thread_cond_t',
  +'elts' = []
 },
 {
   'type' = 'apr_thread_mutex_t',
  
  
  



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

2001-09-12 Thread dougm

dougm   01/09/12 21:10:55

  Modified:src/modules/perl modperl_io.c
  Removed: lib/ModPerl XSLoader.pm
  Log:
  fix tied filehandle breakage caused by bleedperl change #11639
  
  Revision  ChangesPath
  1.4   +9 -1  modperl-2.0/src/modules/perl/modperl_io.c
  
  Index: modperl_io.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- modperl_io.c  2001/08/01 16:52:40 1.3
  +++ modperl_io.c  2001/09/13 04:10:55 1.4
  @@ -8,9 +8,15 @@
   #define TIED(handle) \
   modperl_io_handle_tied(aTHX_ handle, Apache::RequestRec)
   
  +/*
  + * XXX: bleedperl change #11639 switch tied handle magic
  + * from living in the gv to the GvIOp(gv), so we have to deal
  + * with both to support 5.6.x
  + */
   MP_INLINE void modperl_io_handle_untie(pTHX_ GV *handle)
   {
   sv_unmagic((SV*)handle, 'q');
  +sv_unmagic((SV*)GvIOp(handle), 'q');
   
   MP_TRACE_g(MP_FUNC, untie *%s(0x%lx), REFCNT=%d\n,
  GvNAME(handle), (unsigned long)handle,
  @@ -27,6 +33,7 @@
   }
   
   sv_magic((SV*)handle, obj, 'q', Nullch, 0);
  +sv_magic((SV*)GvIOp(handle), obj, 'q', Nullch, 0);
   
   MP_TRACE_g(MP_FUNC, tie *%s(0x%lx) = %s, REFCNT=%d\n,
  GvNAME(handle), (unsigned long)handle, classname,
  @@ -36,8 +43,9 @@
   MP_INLINE int modperl_io_handle_tied(pTHX_ GV *handle, char *classname)
   {
   MAGIC *mg;
  +SV *sv = SvMAGICAL(GvIOp(handle)) ? (SV*)GvIOp(handle) : (SV*)handle;
   
  -if (SvMAGICAL(handle)  (mg = mg_find((SV*)handle, 'q'))) {
  +if (SvMAGICAL(sv)  (mg = mg_find(sv, 'q'))) {
char *package = HvNAME(SvSTASH((SV*)SvRV(mg-mg_obj)));
   
if (!strEQ(package, classname)) {
  
  
  



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

2001-09-12 Thread dougm

dougm   01/09/12 19:01:31

  Modified:lib/Apache Build.pm
  Log:
  cache apxs queries
  
  Revision  ChangesPath
  1.47  +13 -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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- Build.pm  2001/08/26 03:38:27 1.46
  +++ Build.pm  2001/09/13 02:01:31 1.47
  @@ -38,7 +38,19 @@
   
   sub apxs {
   my $self = shift;
  +
  +my $is_query = (@_ == 2)  ($_[0] eq '-q');
  +
   $self = $self-build_config unless ref $self;
  +
  +my $query_key;
  +if ($is_query) {
  +$query_key = 'APXS_' . $_[1];
  +if ($self-{$query_key}) {
  +return $self-{$query_key};
  +}
  +}
  +
   my $apxs;
   my @trys = ($Apache::Build::APXS,
   $self-{MP_APXS},
  @@ -74,7 +86,7 @@
   }
   }
   
  -$val;
  +$self-{$query_key} = $val;
   }
   
   sub apxs_cflags {
  
  
  



cvs commit: modperl-2.0/xs/APR/APR Makefile.PL

2001-09-12 Thread dougm

dougm   01/09/12 19:02:09

  Modified:xs/APR/APR Makefile.PL
  Log:
  now that apr libs are installed, link against them
  
  Revision  ChangesPath
  1.3   +6 -26 modperl-2.0/xs/APR/APR/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.PL   2001/04/04 05:32:33 1.2
  +++ Makefile.PL   2001/09/13 02:02:09 1.3
  @@ -4,34 +4,14 @@
   use ModPerl::MM ();
   use Config;
   
  -my $root = ModPerl::MM::build_config('dir') || ;
  -my $srclib = $root/srclib;
  -my $apr = $srclib/apr;
  +my $prefix = ModPerl::MM::build_config()-apxs(-q = 'PREFIX');
   
  -my @libs;
  -if ($root) {
  -@libs = join ' ',
  -  -L$apr/.libs -lapr,
  --L$srclib/apr-util/.libs -laprutil,
  -  -L$srclib/expat-lite/.libs -lexpat,
  --L$apr/shmem/unix/mm/.libs -lmm;
  -}
  +my $libdir = $prefix/lib;
   
  +my @libs = map -l$_, qw(apr aprutil);
  +
   ModPerl::MM::WriteMakefile(
  -'NAME'   = 'APR',
  +'NAME'  = 'APR',
   'VERSION_FROM' = 'APR.pm',
  -#'LIBS' = \@libs,
  +'LIBS' = [-L$libdir @libs],
   );
  -
  -sub XXX::MY::const_loadlibs {
  -my $self = shift;
  -
  -my $string = $self-MM::const_loadlibs;
  -return $string unless $Config{gccversion}; #XXX
  -
  -my $wa = '-Wl,--whole-archive';
  -my $nwa = '-Wl,--no-whole-archive';
  -
  -$string =~ s/(LDLOADLIBS\s*=\s*)(.*)/$1$wa $2 $nwa/;
  -$string;
  -}
  
  
  



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

2001-09-12 Thread dougm

dougm   01/09/12 19:10:35

  Modified:src/modules/perl mod_perl.c
  Log:
  add a bootstrap note for APR
  
  Revision  ChangesPath
  1.65  +13 -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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- mod_perl.c2001/09/10 04:43:03 1.64
  +++ mod_perl.c2001/09/13 02:10:35 1.65
  @@ -24,13 +24,21 @@
   }
   #endif
   
  -static void my_xs_init(pTHX)
  +static const char *MP_xs_loaders[] = {
  +ModPerl, APR, NULL,
  +};
  +
  +#define MP_xs_loader_name %s::XSLoader::BOOTSTRAP
  +
  +static void modperl_xs_init(pTHX)
   {
  +int i;
   xs_init(aTHX); /* see modperl_xsinit.c */
   
  -newCONSTSUB(PL_defstash,
  -ModPerl::XSLoader::BOOTSTRAP,
  -newSViv(1));
  +for (i=0; MP_xs_loaders[i]; i++) {
  +char *name = Perl_form(aTHX_ MP_xs_loader_name, MP_xs_loaders[i]);
  +newCONSTSUB(PL_defstash, name, newSViv(1));
  +}
   }
   
   PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p)
  @@ -65,7 +73,7 @@
   PL_perl_destruct_level = 2;
   }
   #endif
  -status = perl_parse(perl, my_xs_init, argc, argv, NULL);
  +status = perl_parse(perl, modperl_xs_init, argc, argv, NULL);
   
   if (status) {
   perror(perl_parse);
  
  
  



cvs commit: modperl-2.0/lib/APR - New directory

2001-09-12 Thread dougm

dougm   01/09/12 19:35:21

  modperl-2.0/lib/APR - New directory



cvs commit: modperl Changes Makefile.PL

2001-09-09 Thread dougm

dougm   01/09/09 14:56:46

  Modified:.Changes Makefile.PL
  Log:
  warn if Perl is configured with -Duseshrplib and a libperl.so is found
  in a place where it should not be, example: /lib /usr/lib or /usr/local/lib
  
  Revision  ChangesPath
  1.622 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.621
  retrieving revision 1.622
  diff -u -r1.621 -r1.622
  --- Changes   2001/09/09 18:48:47 1.621
  +++ Changes   2001/09/09 21:56:46 1.622
  @@ -10,6 +10,9 @@
   
   =item 1.26_01-dev
   
  +warn if Perl is configured with -Duseshrplib and a libperl.so is found
  +in a place where it should not be, example: /lib /usr/lib or /usr/local/lib
  +
   fix potential segv in Apache::URI-rpath
   [Vyacheslav Zamyatin [EMAIL PROTECTED]]
   
  
  
  
  1.196 +29 -0 modperl/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl/Makefile.PL,v
  retrieving revision 1.195
  retrieving revision 1.196
  diff -u -r1.195 -r1.196
  --- Makefile.PL   2001/07/17 15:54:05 1.195
  +++ Makefile.PL   2001/09/09 21:56:46 1.196
  @@ -2410,6 +2410,7 @@
   malloc_check();
   uselargefiles_check();
   dynaloader_check();
  +shrplib_check();
   
   if ($USE_APXS and $Config{libs} =~ /($thrlib)/) {
   my $lib = $1;
  @@ -2560,4 +2561,32 @@
/* Added by Wayne Scott 
   
   EOF
  +}
  +
  +sub shrplib_check {
  +return unless $Config{'useshrplib'} and
  +  $Config{'useshrplib'} eq 'define';
  +
  +my $libperl = $Config{'libperl'} || 'libperl.so';
  +
  +for my $dir (qw(/lib /usr/lib /usr/local/lib)) {
  +next unless -e $dir/$libperl;
  +
  +my $coredir = $Config{'archlibexp'}/CORE;
  +my $corelib = $coredir/$libperl;
  +
  +phat_warn(EOF);
  +$dir/$libperl might override
  +$corelib
  +
  +This may cause build or runtime errors with mod_perl.
  +Consider removing $dir/$libperl, it should not be there.
  +
  +If your vendor has installed $libperl there, complain to them and install
  +Perl from source if needed.
  +
  +$libperl should only exist in Perl version/arch directories, for example:
  +$coredir
  +EOF
  +}
   }
  
  
  



cvs commit: modperl-2.0/xs/maps apache_structures.map apr_structures.map

2001-09-09 Thread dougm

dougm   01/09/09 22:49:04

  Modified:xs/maps  apache_structures.map apr_structures.map
  Log:
  update structure maps wrt current httpd-2.0
  
  Revision  ChangesPath
  1.9   +22 -1 modperl-2.0/xs/maps/apache_structures.map
  
  Index: apache_structures.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- apache_structures.map 2001/09/08 18:26:46 1.8
  +++ apache_structures.map 2001/09/10 05:49:04 1.9
  @@ -54,6 +54,7 @@
  unparsed_uri
  uri
  filename
  +   canonical_filename
  path_info
  args
   ~  finfo
  @@ -107,6 +108,7 @@
  aborted
  keepalive
   ?  double_reverse
  +  keepalives
  local_ip
  local_host
  id
  @@ -114,7 +116,6 @@
  notes
  input_filters
  output_filters
  -   remain
   /conn_rec
   
   !server_addr_rec
  @@ -240,3 +241,23 @@
  context
  err_directive
   /cmd_parms
  +
  +!ap_mgmt_item_t
  +   description
  +   name
  +   vtype
  +   v
  +/ap_mgmt_item_t
  +
  +!ap_mgmt_value
  +   s_value
  +   i_value
  +   h_value
  +/ap_mgmt_value
  +
  +!ap_pod_t
  +   pod_in
  +   pod_out
  +   p
  +   sa
  +/ap_pod_t
  
  
  
  1.6   +5 -2  modperl-2.0/xs/maps/apr_structures.map
  
  Index: apr_structures.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_structures.map,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- apr_structures.map2001/08/19 17:33:32 1.5
  +++ apr_structures.map2001/09/10 05:49:04 1.6
  @@ -2,6 +2,7 @@
   
   IGNORE: apr_pool_t apr_os_ apr_vformatter_buff_t apr_pool_t \
   apr_table_t apr_in_addr_t apr_bucket_ apr_md5_ctx_t apr_sha1_ctx_t \
  +apr_md4_ctx_t apr_sdbm_datum_t \
   apr_uuid_t apr_datum_t apr_mmap_t apr_hdtr_t apr_ipsubnet_t
   
   #buckets
  @@ -22,6 +23,7 @@
  length
  start
  data
  +   sms
   /apr_bucket
   
   !apr_finfo_t
  @@ -55,6 +57,7 @@
  addr_str_len
  ipaddr_ptr
  next
  +   family
   /apr_sockaddr_t
   
   !apr_proc_t
  @@ -81,7 +84,7 @@
   #generic data structures
   
   !apr_array_header_t
  -  cont
  +  pool
 elt_size
  nelts
 nalloc
  @@ -129,7 +132,7 @@
  attr
  last_child
  ns_scope
  -   private
  +   priv
   /apr_xml_elem
   
   apr_xml_doc
  
  
  



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

2001-09-09 Thread dougm

dougm   01/09/09 21:43:03

  Modified:lib/ModPerl WrapXS.pm
   src/modules/perl mod_perl.c
  Added:   lib/ModPerl XSLoader.pm
  Log:
  do not bootstrap xs libs outside of httpd
  
  Revision  ChangesPath
  1.20  +2 -2  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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- WrapXS.pm 2001/06/26 16:26:51 1.19
  +++ WrapXS.pm 2001/09/10 04:43:02 1.20
  @@ -488,9 +488,9 @@
   
   package $module;
   $isa
  -use XSLoader ();
  +use ModPerl::XSLoader ();
   our \$VERSION = '0.01';
  -XSLoader::load __PACKAGE__;
  +ModPerl::XSLoader::load __PACKAGE__;
   
   $code
   
  
  
  
  1.1  modperl-2.0/lib/ModPerl/XSLoader.pm
  
  Index: XSLoader.pm
  ===
  package ModPerl::XSLoader;
  
  use strict;
  use warnings FATAL = 'all';
  
  use XSLoader ();
  
  BEGIN {
  unless (defined BOOTSTRAP) {
  *BOOTSTRAP = sub () { 0 };
  }
  }
  
  sub load {
  return unless BOOTSTRAP;
  XSLoader::load(@_);
  }
  
  1;
  
  
  
  1.64  +10 -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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mod_perl.c2001/08/30 05:15:51 1.63
  +++ mod_perl.c2001/09/10 04:43:03 1.64
  @@ -24,6 +24,15 @@
   }
   #endif
   
  +static void my_xs_init(pTHX)
  +{
  +xs_init(aTHX); /* see modperl_xsinit.c */
  +
  +newCONSTSUB(PL_defstash,
  +ModPerl::XSLoader::BOOTSTRAP,
  +newSViv(1));
  +}
  +
   PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p)
   {
   MP_dSCFG(s);
  @@ -56,7 +65,7 @@
   PL_perl_destruct_level = 2;
   }
   #endif
  -status = perl_parse(perl, xs_init, argc, argv, NULL);
  +status = perl_parse(perl, my_xs_init, argc, argv, NULL);
   
   if (status) {
   perror(perl_parse);
  
  
  



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

2001-09-08 Thread dougm

dougm   01/09/08 11:00:49

  Modified:lib/ModPerl BuildOptions.pm
  Log:
  make sure path to APXS is absolute
  Submitted by: Philippe M . Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.9   +7 -0  modperl-2.0/lib/ModPerl/BuildOptions.pm
  
  Index: BuildOptions.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- BuildOptions.pm   2001/04/27 21:07:53 1.8
  +++ BuildOptions.pm   2001/09/08 18:00:49 1.9
  @@ -8,6 +8,8 @@
   use constant VERBOSE = 1;
   use constant UNKNOWN_FATAL = 2;
   
  +use File::Spec;
  +
   sub init {
   my($self, $build) = @_;
   
  @@ -54,6 +56,11 @@
   my $usage = usage();
   die Unknown Option: $key\nUsage:\n$usage;
   }
  + 
  +if($key eq 'MP_APXS') {
  +$val = File::Spec-canonpath(File::Spec-rel2abs($val));
  +}
  +
   if ($self-{$key}) {
   $self-{$key} .= ' ';
   }
  
  
  



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

2001-09-06 Thread dougm

dougm   01/09/06 09:40:11

  Modified:lib/Apache ParseSource.pm
  Log:
  only generate table .pm's if content has changed
  Submitted by:  Stas Bekman [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.26  +26 -4 modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ParseSource.pm2001/09/06 05:26:52 1.25
  +++ ParseSource.pm2001/09/06 16:40:11 1.26
  @@ -410,8 +410,6 @@
   $file = $tdir/$subdir/$file;
   }
   
  -open my $pm, '', $file or die open $file: $!;
  -
   # sort the hashes (including nested ones) for a consistent dump
   canonsort(\$data);
   
  @@ -422,7 +420,7 @@
   my $version = $self-VERSION;
   my $date = scalar localtime;
   
  -print $pm EOF;
  +my $new_content =  EOF;
   package $name;
   
   # !!
  @@ -435,7 +433,31 @@
   
   1;
   EOF
  -close $pm;
  +
  +my $old_content = '';
  +if (-e $file) {
  +open my $pm, '', $file or die open $file: $!;
  +local $/ = undef; # slurp the file
  +$old_content = $pm;
  +close $pm;
  +}
  +
  +my $overwrite = 1;
  +if ($old_content) {
  +# strip the date line, which will never be the same before
  +# comparing
  +my $table_header = qr{^\#\s!.*};
  +(my $old = $old_content) =~ s/$table_header//mg;
  +(my $new = $new_content) =~ s/$table_header//mg;
  +$overwrite = 0 if $old eq $new;
  +}
  +
  +if ($overwrite) {
  +open my $pm, '', $file or die open $file: $!;
  +print $pm $new_content;
  +close $pm;
  +}
  +
   }
   
   # canonsort(\$data);
  
  
  



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

2001-09-06 Thread dougm

dougm   01/09/06 09:41:30

  Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.17  +277 -2modperl-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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- FunctionTable.pm  2001/09/06 05:16:25 1.16
  +++ FunctionTable.pm  2001/09/06 16:41:29 1.17
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Sun Aug 19 10:32:09 2001
  +# !  Thu Sep  6 09:45:43 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -208,6 +208,20 @@
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'ap_basic_http_header',
  +'args' = [
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  },
  +  {
  +'type' = 'apr_bucket_brigade *',
  +'name' = 'bb'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'apr_bucket *',
   'name' = 'ap_bucket_error_create',
   'args' = [
  @@ -554,6 +568,28 @@
   ]
 },
 {
  +'return_type' = 'apr_status_t',
  +'name' = 'ap_dechunk_filter',
  +'args' = [
  +  {
  +'type' = 'ap_filter_t *',
  +'name' = 'f'
  +  },
  +  {
  +'type' = 'apr_bucket_brigade *',
  +'name' = 'b'
  +  },
  +  {
  +'type' = 'ap_input_mode_t',
  +'name' = 'mode'
  +  },
  +  {
  +'type' = 'apr_off_t *',
  +'name' = 'readbytes'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'const char *',
   'name' = 'ap_default_type',
   'args' = [
  @@ -589,6 +625,16 @@
 },
 {
   'return_type' = 'int',
  +'name' = 'ap_directory_walk',
  +'args' = [
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'int',
   'name' = 'ap_discard_request_body',
   'args' = [
 {
  @@ -717,6 +763,16 @@
   ]
 },
 {
  +'return_type' = 'int',
  +'name' = 'ap_file_walk',
  +'args' = [
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'apr_status_t',
   'name' = 'ap_filter_flush',
   'args' = [
  @@ -1545,6 +1601,11 @@
   'args' = []
 },
 {
  +'return_type' = 'apr_array_header_t *',
  +'name' = 'ap_hook_get_map_to_storage',
  +'args' = []
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'ap_hook_get_mgmt_items',
   'args' = [
  @@ -1755,6 +1816,28 @@
 },
 {
   'return_type' = 'void',
  +'name' = 'ap_hook_map_to_storage',
  +'args' = [
  +  {
  +'type' = 'ap_HOOK_map_to_storage_t *',
  +'name' = 'pf'
  +  },
  +  {
  +'type' = 'const char * const *',
  +'name' = 'aszPre'
  +  },
  +  {
  +'type' = 'const char * const *',
  +'name' = 'aszSucc'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'nOrder'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
   'name' = 'ap_hook_open_logs',
   'args' = [
 {
  @@ -2019,6 +2102,28 @@
 },
 {
   'return_type' = 'apr_status_t',
  +'name' = 'ap_http_filter',
  +'args' = [
  +  {
  +'type' = 'ap_filter_t *',
  +'name' = 'f'
  +  },
  +  {
  +'type' = 'apr_bucket_brigade *',
  +'name' = 'b'
  +  },
  +  {
  +'type' = 'ap_input_mode_t',
  +'name' = 'mode'
  +  },
  +  {
  +'type' = 'apr_off_t *',
  +'name' = 'readbytes'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
   'name' = 'ap_http_header_filter',
   'args' = [
 {
  @@ -2194,6 +2299,16 @@
   ]
 },
 {
  +'return_type' = 'int',
  +'name' = 'ap_location_walk',
  +'args' = [
  +  {
  +'type' = 'request_rec *',
  +'name' = 'r'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'ap_log_assert',
   'args' = [
  @@ -2996,6 +3111,20 @@
   ]
 },
 {
  +'return_type' = 'int',
  +'name' = 'ap_os_is_path_absolute',
  +'args' = [
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'p'
  +  },
  +  {
  +'type' = 'const char *',
  +'name' = 'dir'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'ap_parse_uri',
   'args' = [
  @@ -3222,6 +3351,16 @@
   ]
 },
 {
  +'return_type' = 'int',
  +'name' = 'ap_process_request_internal

<    1   2   3   4   5   6   7   8   >