svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys

Ian Lepore ian at freebsd.org
Fri Oct 23 21:56:15 UTC 2015


On Fri, 2015-10-23 at 14:43 -0700, Conrad Meyer wrote:
> On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon <linimon at lonesome.com>
> wrote:
> > On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote:
> > > What is __FreeBSD_version and why would it be bumped?
> > 
> > <stuff that does not inform what __FreeBSD_version is snipped>
> > 
> > This variable exists to tell the Ports Collection, among others,
> > that "something has changed that may require you to patch and/or
> > recompile."
> 
> Ok.  Nothing has changed that may require ports to patch and/or
> recompile, so I don't think this needs to be bumped.
> 
> Best,
> Conrad
> 

"ports need recompile" is only one of several reasons to bump the
version.  Another is making it possible to test for new features that
arrived with a given version, and that's what you've done.

Suppose I maintain an out-of-tree driver that has to build on several
versions, and uint16 is really the right type for its sysctl but it
also has to work on versions that don't have that support.  That tends
to get handled with things like #if __FreeBSD_version < NNNNNNNN. 
 (Contrived example here maybe, since if uint32 worked on one version,
I'd likely use it on all of versions.)

One of the implications of the feature-availability testing is that
when you MFC your change, you also have to bump the version number on
that branch (independently, not via MFC).

-- Ian


More information about the svn-src-head mailing list