You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2006/02/14 16:06:56 UTC

lb_score

Off the top of my head, I have no idea why we even have lb_score
rather than just using proxy_worker_stat as we should.
This is easy to fix except for the fact that ap_get_scoreboard_lb()
is AP_DECLARE... Of course, adjusting in HEAD is fine, but
this is something that really should be fixed in 2.2, which
means we have an API change.

Comments?

Re: Recompiling modules for Apache 2.2.0

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 2/14/06, System Support <su...@microtechniques.com> wrote:
> I am trying to recompile some modules from Apache 2.0 to use under 2.2.0,
> and get the following:
>
> In file included from /usr/local/apache2/include/ap_config.h:25,
>                  from /usr/local/apache2/include/httpd.h:43,
>                  from mod_rexx.h:72,
>                  from mod_rexx.c:25:
> /usr/local/apache2/include/apr.h:270: error: syntax error before 'r_off_t'
> /usr/local/apache2/include/apr.h:270: warning: type defaults to '' in
> declaration of 'apr_off_t'
> /usr/local/apache2/include/apr.h:270: warning: data definition has no type=
>  or storage class
> In file included from /usr/local/apache2/include/apr_file_io.h:29,
>                  from /usr/local/apache2/include/apr_network_io.h:26,
>                  from /usr/local/apache2/include/httpd.h:53,
>                  from mod_rexx.h:72,
>                  from mod_rexx.c:25:
> /usr/local/apache2/include/apr_file_info.h:204: error: syntax error before
> 'apr_off_t'
> /usr/local/apache2/include/apr_file_info.h:204: warning: no semicolon at end
> of struct or union
> /usr/local/apache2/include/apr_file_info.h:206: warning: type defaults to
> '' in declaration
> of 'csize'
>
> .... and so on
>
>
> This appears to be caused by a missing typedef for off64_t and others, but  I
> have run out of ideas on how to fix it.  Any suggestions?

However you are compiling these modules you are most likely not
passing the correct CFLAGS to the compiler.  To use APR (as HTTPD
does) you need to pass APR's CFLAGS, which you can get from
apr-1-config --cflags.  That'll allow off64_t to be correctly picked
up from the system headers.

-garrett

Recompiling modules for Apache 2.2.0

Posted by System Support <su...@microtechniques.com>.
I am trying to recompile some modules from Apache 2.0 to use under 2.2.0, 
and get the following:

In file included from /usr/local/apache2/include/ap_config.h:25,
                 from /usr/local/apache2/include/httpd.h:43,
                 from mod_rexx.h:72,
                 from mod_rexx.c:25:
/usr/local/apache2/include/apr.h:270: error: syntax error before 'r_off_t'
/usr/local/apache2/include/apr.h:270: warning: type defaults to '' in 
declaration of 'apr_off_t'
/usr/local/apache2/include/apr.h:270: warning: data definition has no type=
 or storage class
In file included from /usr/local/apache2/include/apr_file_io.h:29,
                 from /usr/local/apache2/include/apr_network_io.h:26,
                 from /usr/local/apache2/include/httpd.h:53,
                 from mod_rexx.h:72,
                 from mod_rexx.c:25:
/usr/local/apache2/include/apr_file_info.h:204: error: syntax error before  
'apr_off_t'
/usr/local/apache2/include/apr_file_info.h:204: warning: no semicolon at end 
of struct or union
/usr/local/apache2/include/apr_file_info.h:206: warning: type defaults to 
'' in declaration 
of 'csize'

.... and so on


This appears to be caused by a missing typedef for off64_t and others, but  I 
have run out of ideas on how to fix it.  Any suggestions?

don

support (at) microtechniques.com



Re: lb_score

Posted by Nick Kew <ni...@webthing.com>.
On Tuesday 14 February 2006 15:06, Jim Jagielski wrote:
> Off the top of my head, I have no idea why we even have lb_score

Neither have I.  Someone slipped it it; noone objected.

> rather than just using proxy_worker_stat as we should.
> This is easy to fix except for the fact that ap_get_scoreboard_lb()
> is AP_DECLARE... Of course, adjusting in HEAD is fine, but
> this is something that really should be fixed in 2.2, which
> means we have an API change.

-1 for 2.2.  Provisionally +1 for 2.4.

> Comments?

This came up just yesterday on IRC.  Brian would like to be able
to allocate some scoreboard space for his module.  Metoo.

I haven't thought this through yet, but presumably we could implement
an API for this.  Something like:

struct worker_score {
  /* all the stuff that's there now */
  void data[];   /* at the end */
};
/* ditto other records */

and an enum
enum { AP_SCOREBOARD_[GLOBAL|PROCESS|WORKER] ;} scoreboard_access_t;

then AP functions to allocate data bytes in a pre_mpm hook
with APR_HOOK_FIRST:
  void ap_scoreboard_alloc_space(module* key, size_t nbytes, our enum);

and to retrieve them anywhere:
  void* ap_scoreboard_get_data(module* key, our enum);

Then all we need is a table of offsets by module, to be set up before
the scoreboard is allocated and added in scoreboard_size,
scoreboard_init and accessors.

That leaves loadbalancers a proper API for attaching to the scoreboard,
and opens it to other modules.

-- 
Nick Kew