apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject FreeBSD version check for thread-safe sendfile
Date Thu, 11 Jan 2001 14:36:35 GMT
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...

Mime
View raw message