Here's my idea:

 o create ap_hooks.h which moves the AP_IMPLEMENT_HOOKS* from
   ap_config.h to itself.
 o Fold in the APR_HOOK_PROBES_ENABLED logic as
   described below.
 o change configure to accept --enable-hooks-probes=<path>
   which points to the location of the ap_hooks_probes.h
   file.
 o Adjust all files to include ap_hooks.h instead
   of apr_hooks.h

I'll start coding this tomorrow; my hope is to have this
in for the next beta (as RM, I'm gonna hold off a T&R
until then) since I think it's something that we want
to really promote as a cool 2.4 feature.

On May 6, 2011, at 8:38 PM, Jim Jagielski wrote:

> APR_HOOK_PROBES_ENABLED is pretty nice, the rub is that, esp
> in httpd, we have lots of modules which go ahead and include
> apr_hooks.h on their own, making the setup of "universal"
> probe hooks difficult.
> 
> Anyone have ideas on how to make it easier, either in
> APR directly or in httpd? Maybe making some kind of
> httpd_hooks.h file that includes some local local_hooks_probes.h
> file (depending on some config-time setting) assuming
> APR_HOOK_PROBES_ENABLED is set (ie: --enable-hook-probes
> sets APR_HOOK_PROBES_ENABLED and httpd_hooks.h is
> basically:
> 
>  #ifdef APR_HOOK_PROBES_ENABLED
>  #include "local_hooks_probes.h"
>  #endif
>  #include "apr_hooks.h"
> 
> and no httpd files include apr_hooks.h directly...
> 
> That seems a very rough way to do it... :/
> 

Reply via email to