apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: FreeBSD version check for thread-safe sendfile
Date Thu, 11 Jan 2001 21:12:02 GMT
"David Reid" <dreid@jetnet.co.uk> writes:

> How many places are we going to run into dependencies on version number for
> FreeBSD?  I think we have 2, maybe 3 already and it's likely to grow.  I
> think we need to do this a different way.
> Why don't we add a check in the early portion of configure.in that looks for
> freebsd, if it's found determines the version number and sets it as a
> variable such as FBSD_VERSION.  This should probably be of the format we're
> already using, i.e. 34 for 3.4.x and 41 for 4.1.x and so on.  I mean so far
> we're only interested if we have greater than a particular version and I can
> see that continuing.

If there is 3.4.x, then perhaps it should be 340 for 3.4, 341 for
3.4.1, etc.

The version could be set to 

uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/' | sed -e 's/\(.\)\.\(.\)\-.*/\1\20/'

yielding 341 for 3.4.1-RELEASE and 340 for 3.4-RELEASE.

Why limit the variable to FreeBSD?  We'll have (or already have)
similar checks on other platforms.  Make the variable name more

Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message