httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject binary compatibility for APR
Date Wed, 24 May 2000 00:18:25 GMT
On Tue, 23 May 2000, Jeff Trawick wrote:
> With the understanding that we don't have to try too hard to maintain
> binary compatibility,

This made me think of something...

It would seem reasonable to change the call to ap_initialize() to take a
parameter. The param would contain the version number that the app was
compiled with. APR can then check for major-version compatibility.

For example:


    if (ap_initialize(APR_VERSION) != APR_SUCCESS) exit(1);


ap_status_t ap_initialize(int compiled_for_vsn)
    if ((compiled_for_vsn >> 16) != APR_MAJOR)
        return APR_EBADMAJOR;

As the app is recompiled, it picks up the new APR interfaces and the new
APR_VERSION to pass to ap_initialize(). If the app statically/dynamically
links against a pre-built APR, then the compiled-in APR_VERSION can be
used by ap_initialize() to determine acceptability.



Greg Stein,

View raw message