You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2002/07/11 08:14:10 UTC

cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

stas        2002/07/10 23:14:10

  Modified:    xs       typemap
               xs/Apache/SubProcess Apache__SubProcess.h
  Log:
  use the new time conversion macros: apr_time_*
  
  Revision  Changes    Path
  1.9       +2 -2      modperl-2.0/xs/typemap
  
  Index: typemap
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/typemap,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- typemap	24 May 2002 04:42:57 -0000	1.8
  +++ typemap	11 Jul 2002 06:14:10 -0000	1.9
  @@ -15,7 +15,7 @@
   	sv_setiv($arg, PTR2IV($var));
   
   T_APR_TIME
  -	sv_setnv($arg, (NV)($var / APR_USEC_PER_SEC));
  +	sv_setnv($arg, (NV)(apr_time_sec($var)));
   
   T_UVOBJ
   	modperl_perl_sv_setref_uv(aTHX_ $arg, \"${ntype}\", (UV)$var);
  @@ -58,7 +58,7 @@
   	$var = INT2PTR($type,SvIV(SvROK($arg) ? SvRV($arg) : $arg))
   
   T_APR_TIME
  -	$var = (apr_time_t)(SvNV($arg) * APR_USEC_PER_SEC)
  +	$var = (apr_time_t)(apr_time_from_sec(SvNV($arg)))
   
   T_CHAR_LEN
           $var = (char *)SvPV($arg, ${var}_len)
  
  
  
  1.11      +1 -1      modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h
  
  Index: Apache__SubProcess.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Apache__SubProcess.h	15 Mar 2002 04:29:25 -0000	1.10
  +++ Apache__SubProcess.h	11 Jul 2002 06:14:10 -0000	1.11
  @@ -20,7 +20,7 @@
   
   #define SET_TIMEOUT(fp) \
       apr_file_pipe_timeout_set(fp, \
  -                              (int)(r->server->timeout * APR_USEC_PER_SEC))
  +                              (int)(apr_time_from_sec(r->server->timeout)))
   
   static int modperl_spawn_proc_prog(pTHX_
                                      request_rec *r,
  
  
  

Re: cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

Posted by Tatsuhiko Miyagawa <mi...@edge.co.jp>.
At Fri, 12 Jul 2002 03:19:41 +0000,
Stas Bekman wrote:

> > AFAIK from 2.0.35 on, httpd-2.0 has been considered general
> > availability, which means "stable" in some way. it's not beta anymore.
> > 
> > http://www.apachelabs.org/asf-announce/200204.mbox/%3CPine.LNX.4.21.0204060205490.15807-100000@shell.ntrnet.net%3E
> 
> Thanks Tatsuhiko, it's just hard to think of Apache not being beta when 
> its API still changes breaking things relying on it.

Yep ;)

> So since you've raised this issue, is 2.0.35 considered the oldest 
> version mod_perl must compile and run with?

As mod_perl 2.x is still beta, I don't think it *must* compile on
older httpd, but supporting at least httpd 2.0.35 would be reasonable,
as long as it's not so hard to be backward compatible. 


-- 
Tatsuhiko Miyagawa <mi...@edge.co.jp>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

Posted by Stas Bekman <st...@stason.org>.
Tatsuhiko Miyagawa wrote:
> At Fri, 12 Jul 2002 02:26:04 +0000,
> Stas Bekman wrote:
> 
> 
>>>we should continue to support older versions of httpd for as long as 
>>>reasonably possible.
>>
>>but what's the reason? why would anybody use an older httpd beta with 
>>the latest mod_perl?
> 
> 
> AFAIK from 2.0.35 on, httpd-2.0 has been considered general
> availability, which means "stable" in some way. it's not beta anymore.
> 
> http://www.apachelabs.org/asf-announce/200204.mbox/%3CPine.LNX.4.21.0204060205490.15807-100000@shell.ntrnet.net%3E

Thanks Tatsuhiko, it's just hard to think of Apache not being beta when 
its API still changes breaking things relying on it.

So since you've raised this issue, is 2.0.35 considered the oldest 
version mod_perl must compile and run with?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

Posted by Tatsuhiko Miyagawa <mi...@edge.co.jp>.
At Fri, 12 Jul 2002 02:26:04 +0000,
Stas Bekman wrote:

> > we should continue to support older versions of httpd for as long as 
> > reasonably possible.
> 
> but what's the reason? why would anybody use an older httpd beta with 
> the latest mod_perl?

AFAIK from 2.0.35 on, httpd-2.0 has been considered general
availability, which means "stable" in some way. it's not beta anymore.

http://www.apachelabs.org/asf-announce/200204.mbox/%3CPine.LNX.4.21.0204060205490.15807-100000@shell.ntrnet.net%3E


-- 
Tatsuhiko Miyagawa <mi...@edge.co.jp>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:
> On Fri, 12 Jul 2002, Stas Bekman wrote:
> 
> 
>>I thought of that, but why do we need to keep it compiling with httpd < 
>>2.0.40-dev? aren't people supposed to use 1.99_04 with 2.0.39? or are 
>>you talking in the case when 1.99_05 is released and 2.0.40 is not?
> 
> 
> we should continue to support older versions of httpd for as long as 
> reasonably possible.

but what's the reason? why would anybody use an older httpd beta with 
the latest mod_perl?

>>there are more changes with API renames coming affecting both httpd and 
>>apr (I think today, watch wrowe and thom's commits), should we also keep 
>>backwards compatibility for these?
> 
> 
> we don't have to, apr already maintains backwards compat.  at some point 
> in the future we will bump the minimum required httpd version, but for the 
> moment it needs to stay where it is.

cool

>>where should I add these? should we have some file with all the temp 
>>workaround that we can nuke when the Apache-2.0 API is frozen?
> 
> 
> modperl_apache_includes.h, similar to how modperl_perl_includes.h provides 
> some compat for perl stuffs.  no need for an additional file, but feel 
> free to XXX for future removal.

thanks, done

p.s. I've added one more macro, since I use it in Scoreboard.xs (which 
btw, still awaits your +1 ;)

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 12 Jul 2002, Stas Bekman wrote:

> I thought of that, but why do we need to keep it compiling with httpd < 
> 2.0.40-dev? aren't people supposed to use 1.99_04 with 2.0.39? or are 
> you talking in the case when 1.99_05 is released and 2.0.40 is not?

we should continue to support older versions of httpd for as long as 
reasonably possible.
 
>  From what I understood there are going to be changes in the apr_time_t 
> representation and these wrappers are going to shield us from the 
> internal changes. and if I'm correct the code is going to break in any 
> case without these changes.

understood.
 
> there are more changes with API renames coming affecting both httpd and 
> apr (I think today, watch wrowe and thom's commits), should we also keep 
> backwards compatibility for these?

we don't have to, apr already maintains backwards compat.  at some point 
in the future we will bump the minimum required httpd version, but for the 
moment it needs to stay where it is.

> In any case this should work, right?
> 
> #ifndef apr_time_sec
> #define apr_time_sec(time) ((apr_int64_t)((time) / APR_USEC_PER_SEC))
> #endif
> #ifndef apr_time_from_sec
> #define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)
> #endif
> 
> where should I add these? should we have some file with all the temp 
> workaround that we can nuke when the Apache-2.0 API is frozen?

modperl_apache_includes.h, similar to how modperl_perl_includes.h provides 
some compat for perl stuffs.  no need for an additional file, but feel 
free to XXX for future removal.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:
> i don't think this will compile with httpd < 2.0.40-dev, will it?
> feel free to #ifndef foo #define foo for these macros, or whatever, so 
> long as it compiles with released versions of httpd.  thanks.

I thought of that, but why do we need to keep it compiling with httpd < 
2.0.40-dev? aren't people supposed to use 1.99_04 with 2.0.39? or are 
you talking in the case when 1.99_05 is released and 2.0.40 is not?

 From what I understood there are going to be changes in the apr_time_t 
representation and these wrappers are going to shield us from the 
internal changes. and if I'm correct the code is going to break in any 
case without these changes.

there are more changes with API renames coming affecting both httpd and 
apr (I think today, watch wrowe and thom's commits), should we also keep 
backwards compatibility for these?

In any case this should work, right?

#ifndef apr_time_sec
#define apr_time_sec(time) ((apr_int64_t)((time) / APR_USEC_PER_SEC))
#endif
#ifndef apr_time_from_sec
#define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)
#endif

where should I add these? should we have some file with all the temp 
workaround that we can nuke when the Apache-2.0 API is frozen?

too bad httpd/apr folks don't provide things like ppport.h which adjusts 
things for the older versions.

> On 11 Jul 2002 stas@apache.org wrote:
> 
> 
>>stas        2002/07/10 23:14:10
>>
>>  Modified:    xs       typemap
>>               xs/Apache/SubProcess Apache__SubProcess.h
>>  Log:
>>  use the new time conversion macros: apr_time_*
>>  
>>  Revision  Changes    Path
>>  1.9       +2 -2      modperl-2.0/xs/typemap
>>  
>>  Index: typemap
>>  ===================================================================
>>  RCS file: /home/cvs/modperl-2.0/xs/typemap,v
>>  retrieving revision 1.8
>>  retrieving revision 1.9
>>  diff -u -r1.8 -r1.9
>>  --- typemap	24 May 2002 04:42:57 -0000	1.8
>>  +++ typemap	11 Jul 2002 06:14:10 -0000	1.9
>>  @@ -15,7 +15,7 @@
>>   	sv_setiv($arg, PTR2IV($var));
>>   
>>   T_APR_TIME
>>  -	sv_setnv($arg, (NV)($var / APR_USEC_PER_SEC));
>>  +	sv_setnv($arg, (NV)(apr_time_sec($var)));
>>   
>>   T_UVOBJ
>>   	modperl_perl_sv_setref_uv(aTHX_ $arg, \"${ntype}\", (UV)$var);
>>  @@ -58,7 +58,7 @@
>>   	$var = INT2PTR($type,SvIV(SvROK($arg) ? SvRV($arg) : $arg))
>>   
>>   T_APR_TIME
>>  -	$var = (apr_time_t)(SvNV($arg) * APR_USEC_PER_SEC)
>>  +	$var = (apr_time_t)(apr_time_from_sec(SvNV($arg)))
>>   
>>   T_CHAR_LEN
>>           $var = (char *)SvPV($arg, ${var}_len)
>>  
>>  
>>  
>>  1.11      +1 -1      modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h
>>  
>>  Index: Apache__SubProcess.h
>>  ===================================================================
>>  RCS file: /home/cvs/modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h,v
>>  retrieving revision 1.10
>>  retrieving revision 1.11
>>  diff -u -r1.10 -r1.11
>>  --- Apache__SubProcess.h	15 Mar 2002 04:29:25 -0000	1.10
>>  +++ Apache__SubProcess.h	11 Jul 2002 06:14:10 -0000	1.11
>>  @@ -20,7 +20,7 @@
>>   
>>   #define SET_TIMEOUT(fp) \
>>       apr_file_pipe_timeout_set(fp, \
>>  -                              (int)(r->server->timeout * APR_USEC_PER_SEC))
>>  +                              (int)(apr_time_from_sec(r->server->timeout)))
>>   
>>   static int modperl_spawn_proc_prog(pTHX_
>>                                      request_rec *r,
>>  
>>  
>>  
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org



-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h

Posted by Doug MacEachern <do...@covalent.net>.
i don't think this will compile with httpd < 2.0.40-dev, will it?
feel free to #ifndef foo #define foo for these macros, or whatever, so 
long as it compiles with released versions of httpd.  thanks.

On 11 Jul 2002 stas@apache.org wrote:

> stas        2002/07/10 23:14:10
> 
>   Modified:    xs       typemap
>                xs/Apache/SubProcess Apache__SubProcess.h
>   Log:
>   use the new time conversion macros: apr_time_*
>   
>   Revision  Changes    Path
>   1.9       +2 -2      modperl-2.0/xs/typemap
>   
>   Index: typemap
>   ===================================================================
>   RCS file: /home/cvs/modperl-2.0/xs/typemap,v
>   retrieving revision 1.8
>   retrieving revision 1.9
>   diff -u -r1.8 -r1.9
>   --- typemap	24 May 2002 04:42:57 -0000	1.8
>   +++ typemap	11 Jul 2002 06:14:10 -0000	1.9
>   @@ -15,7 +15,7 @@
>    	sv_setiv($arg, PTR2IV($var));
>    
>    T_APR_TIME
>   -	sv_setnv($arg, (NV)($var / APR_USEC_PER_SEC));
>   +	sv_setnv($arg, (NV)(apr_time_sec($var)));
>    
>    T_UVOBJ
>    	modperl_perl_sv_setref_uv(aTHX_ $arg, \"${ntype}\", (UV)$var);
>   @@ -58,7 +58,7 @@
>    	$var = INT2PTR($type,SvIV(SvROK($arg) ? SvRV($arg) : $arg))
>    
>    T_APR_TIME
>   -	$var = (apr_time_t)(SvNV($arg) * APR_USEC_PER_SEC)
>   +	$var = (apr_time_t)(apr_time_from_sec(SvNV($arg)))
>    
>    T_CHAR_LEN
>            $var = (char *)SvPV($arg, ${var}_len)
>   
>   
>   
>   1.11      +1 -1      modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h
>   
>   Index: Apache__SubProcess.h
>   ===================================================================
>   RCS file: /home/cvs/modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h,v
>   retrieving revision 1.10
>   retrieving revision 1.11
>   diff -u -r1.10 -r1.11
>   --- Apache__SubProcess.h	15 Mar 2002 04:29:25 -0000	1.10
>   +++ Apache__SubProcess.h	11 Jul 2002 06:14:10 -0000	1.11
>   @@ -20,7 +20,7 @@
>    
>    #define SET_TIMEOUT(fp) \
>        apr_file_pipe_timeout_set(fp, \
>   -                              (int)(r->server->timeout * APR_USEC_PER_SEC))
>   +                              (int)(apr_time_from_sec(r->server->timeout)))
>    
>    static int modperl_spawn_proc_prog(pTHX_
>                                       request_rec *r,
>   
>   
>   
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org