Re: FreeBSD version check for thread-safe sendfile
At 11 Jan 2001 16:12:02 -0500, Jeff Trawick wrote: 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 generic. If version specific hack for FreeBSD is required, is it useful to use sysctl kern.osreldate? % sysctl kern.osreldate kern.osreldate: 500015 # See http://www.FreeBSD.org/porters-handbook/porting-versions.html # for detail of values -- Jun Kuriyama [EMAIL PROTECTED] // IMG SRC, Inc. [EMAIL PROTECTED] // FreeBSD Project
Re: FreeBSD version check for thread-safe sendfile
On Thu, Jan 11, 2001 at 12:54:09PM -0800, [EMAIL PROTECTED] wrote: On Thu, 11 Jan 2001, Greg Stein wrote: 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 But, this doesn't do what we want, which is to do this for any version before 4.2-STABLE. Anything earlier than that is suspect. 1*|2*|3*|4.0*|4.1*|4.2-whatever-the-unstable-is) It feels like you guys are making the problem more difficult than it really is. Why not simply globbing? Why try to construct some darn version number? Cheers, -g -- Greg Stein, http://www.lyra.org/