apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject Re: FreeBSD version check for thread-safe sendfile
Date Thu, 11 Jan 2001 20:57:40 GMT
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.

Tony, is versioning that way safe for what we're using/likely to use it for?

I can't help thinking this will make our lives easier in the long run and
should alleviate the need for enormous switch statements!

david
----- Original Message -----
From: "Greg Stein" <gstein@lyra.org>
To: "Jeff Trawick" <trawickj@bellsouth.net>
Cc: <dev@apr.apache.org>
Sent: Thursday, January 11, 2001 8:15 PM
Subject: Re: FreeBSD version check for thread-safe sendfile


> One of the reasons that I was advocating using the globbing feature of
> "case" was to avoid the nasty sed expression.
>
> Just do:
>
>   case "`uname -r`" in
>       3.4*)
>           disable-threads
>           ;;
>   esac
>
>
> Cheers,
> -g
>
> On Thu, Jan 11, 2001 at 09:36:35AM -0500, Jeff Trawick wrote:
> > The check isn't working right on on FreeBSD 3.4-RELEASE.
> >
> > Here is what the code to get the version string yields because
> > `uname -r` isn't matched by the sed script.
> >
> > [trawick@freebie httpd-2.0]$ uname -r | sed -e
's/\(.\)\.\(.\)\..*/\1\2/'
> > 3.4-RELEASE
> >
> > test simply bails out with this error message:
> >
> > test: 3.4-RELEASE: bad number
> >
> > I could add another step to the pipeline to standardize other version
> > string formats
> >
> >   uname -r | sed -e 's/\(.\)\.\(.\)\..*/\1\2/' | sed -e
's/\(.\)\.\(.\)\-.*/\1\2/'
> >
> > Ryan (or anybody else), what is a real-life example of `uname -r` output
which
> > the existing sed substitution handles?  I'll make sure that example as
> > well as my 3.4-RELEASE example works before committing a change.
> >
> > Thanks...
> > --
> > Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
> >        http://www.geocities.com/SiliconValley/Park/9289/
> >              Born in Roswell... married an alien...
>
> --
> Greg Stein, http://www.lyra.org/
>


Mime
View raw message