Jeff Trawick wrote:
Some level of mod_php (presumably recent) won't load with Apache 2 on AIX, and the reason is that the decl of that variable in mpm_common.h isn't formally exported (AP_DECLARE_DATA). PHP should be using ap_mpm_query(), right?

See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21046

Can anybody agree that something like this is is part of the formal definition of our API?


"Apache header files contain declarations for a number of variables and functions. Many of these are part of the API, while some of these are simply necessary for the division of the Apache implementation across many source files.

Any such variables that are considered part of the API are declared with the AP_DECLARE_DATA qualifier. Here is an example from scoreboard.h:

AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image;

Any such functions that are considered part of the API are declared with AP_DECLARE() or AP_DECLARE_NONSTD(). Examples include:

AP_DECLARE(void) ap_add_common_vars(request_rec *r);
AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...);

In addition, hooks are declared with AP_DECLARE_HOOK() or APR_DECLARE_EXTERNAL_HOOK().

If the declaration of a variable or function does not include these special qualifiers, it is not part of the API, and beyond the fact that it is not intended for module use, modules will not be able to access the variable or function on all platforms, leading to obscure failures for the users of such modules."



Reply via email to