apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: The Release Candidate version number?
Date Thu, 27 Feb 2003 04:14:31 GMT
On Thu, Feb 27, 2003 at 12:11:18PM +1100, Stas Bekman wrote:
> Assuming that my patch to handle the segfault in apr_uri_unparse goes in 
> before the next -gold release, how am I supposed to handle the older apr 
> (since modperl has to support older apr as well). Currently it seems that I 
> have to do the following:
> #if APR_MINOR_VERSION == 9 &&
>      /* apr < 0.9.3 segfaults if hostname is set, but scheme is not */
>      if (uptr->hostname && !uptr->scheme) {
>          uptr->scheme = "http";
>      }
> #endif
> that's a way too messed up.

You have to use a runtime check. It is too easy to slide in a library that
is different from what you compiled against. Our compatibility guidelines
are designed specifically to enable that kind of forward/backward change.

Compile-time checks are only useful to look for API changes as a way to
decide how to call into APR. If the API is the same, and you're trying to
test for an underlying bug, then you'll need to use a runtime check.

And all of this remains a bit fuzzier during pre-1.0 days. It might be
possible in certain cases to look for bug fixes, and rely on incompatible
APIs between patch levels to prevent the erroneous usage of an older
library. But that's your call, and to be made on a case-by-case basis.


Greg Stein, http://www.lyra.org/

View raw message