apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: The Release Candidate version number?
Date Thu, 27 Feb 2003 01:25:07 GMT
--On Thursday, February 27, 2003 12:11 PM +1100 Stas Bekman 
<stas@stason.org> 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_PATCH_VERSION < 2 || APR_PATCH_VERSION == 2 &&
> APR_IS_DEV_VERSION)      /* 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.

So say you.  That's the price you pay for backwards compatbility.  If 
*you* want to be backwards-compatible, *you* have to do this check. 
If you don't like the preprocessor, you can code it up via 
apr_version and do it at run-time.

About the only thing we could do to moderately help out is to add:
APR_VERSION_AT_LEAST(major, minor, patch, final).  That would sort of 
hide it a bit.  But, that's not going to help you since you'd have to 
compile against an APR that doesn't have it.  =)

I don't see why we have to go to 0.9.3 because you don't want to do 
the check properly.  The point is that there is a way of determining 
if you are at 0.9.2-dev versus 0.9.2.  -- justin

Mime
View raw message