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

2002-05-29 Thread dougm

dougm   02/05/29 18:23:28

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



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

2002-05-29 Thread dougm

dougm   02/05/29 18:52:55

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



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

2002-05-29 Thread dougm

dougm   02/05/29 19:33:49

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

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

2002-05-29 Thread dougm

dougm   02/05/29 20:54:08

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



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

2002-05-29 Thread dougm

dougm   02/05/29 21:05:07

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



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

2002-05-29 Thread dougm

dougm   02/05/29 23:00:49

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