You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by cl...@apache.org on 2004/07/09 22:29:05 UTC

cvs commit: apr/threadproc/netware proc.c

clar        2004/07/09 13:29:05

  Modified:    threadproc/netware proc.c
  Log:
  Added bit mask operation for detach and addrspace fields to make possible overloading on fcts parameter.
  
  Revision  Changes    Path
  1.30      +2 -2      apr/threadproc/netware/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/netware/proc.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- proc.c	14 Jun 2004 17:26:19 -0000	1.29
  +++ proc.c	9 Jul 2004 20:29:05 -0000	1.30
  @@ -179,7 +179,7 @@
   
   APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) 
   {
  -    attr->detached = detach;
  +    attr->detached = (detach & 1);
       return APR_SUCCESS;
   }
   
  @@ -268,7 +268,7 @@
   APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr,
                                                          apr_int32_t addrspace)
   {
  -    attr->addrspace = addrspace;
  +    attr->addrspace = (addrspace & 2);
       return APR_SUCCESS;
   }
   
  
  
  

Re: cvs commit: apr/threadproc/netware proc.c

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Jul 09, 2004 at 08:29:05PM -0000, clar@apache.org wrote:
>   --- proc.c	14 Jun 2004 17:26:19 -0000	1.29
>   +++ proc.c	9 Jul 2004 20:29:05 -0000	1.30
>   @@ -179,7 +179,7 @@
>    
>    APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) 
>    {
>   -    attr->detached = detach;
>   +    attr->detached = (detach & 1);
>        return APR_SUCCESS;

This implements a different interface to that described in the header,
so -1 again.  The point of the discussion we had is that you have to do
the messy work *inside mod_cgi*, because that's where the binary compat
requirement is.  So mod_cgi should be doing e.g.:

  apr_procattr_detach_set(procattr, e_info->detached & 1)
  apr_procattr_addrspace_set(procattr, e_info->detached & 2)

and it needs to be documented in mod_cgi.h that the detached field is
used as a bitfield like this in the 2.0 branch.  For mod_cgi in HEAD it
needn't be weird of course, the addrspace field could be left in there.

joe


Re: cvs commit: apr/threadproc/netware proc.c

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Jul 09, 2004 at 08:29:05PM -0000, clar@apache.org wrote:
>   --- proc.c	14 Jun 2004 17:26:19 -0000	1.29
>   +++ proc.c	9 Jul 2004 20:29:05 -0000	1.30
>   @@ -179,7 +179,7 @@
>    
>    APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) 
>    {
>   -    attr->detached = detach;
>   +    attr->detached = (detach & 1);
>        return APR_SUCCESS;

This implements a different interface to that described in the header,
so -1 again.  The point of the discussion we had is that you have to do
the messy work *inside mod_cgi*, because that's where the binary compat
requirement is.  So mod_cgi should be doing e.g.:

  apr_procattr_detach_set(procattr, e_info->detached & 1)
  apr_procattr_addrspace_set(procattr, e_info->detached & 2)

and it needs to be documented in mod_cgi.h that the detached field is
used as a bitfield like this in the 2.0 branch.  For mod_cgi in HEAD it
needn't be weird of course, the addrspace field could be left in there.

joe