Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Oct 2015 15:06:22 -0700
From:      Conrad Meyer <cem@FreeBSD.org>
To:        Ian Lepore <ian@freebsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys
Message-ID:  <CAG6CVpVNuZQtkZhbuKPTzBG7PfyXiDu4Aav5-d2dgaQWEw2x0A@mail.gmail.com>
In-Reply-To: <1445637372.91534.38.camel@freebsd.org>
References:  <201510222303.t9MN37D2093845@repo.freebsd.org> <CAGHfRMCSjzC5FCk9cd8At=Q%2BDtQkXvYVsq3tfQ_aMPSVLZpqnQ@mail.gmail.com> <CAG6CVpW6W%2BDu0kgmgUnbU1tyXOxZ54C7Op6wRX9=i9bhipH6qQ@mail.gmail.com> <20151023210604.GA12348@lonesome.com> <CAG6CVpU2ANjWBot=2OCqcu9zT=HrK=ubdJsYPCedyz8jL35=SQ@mail.gmail.com> <1445637372.91534.38.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 23, 2015 at 2:56 PM, Ian Lepore <ian@freebsd.org> wrote:
> On Fri, 2015-10-23 at 14:43 -0700, Conrad Meyer wrote:
>> On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon <linimon@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."
>
> 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.)

Suppose you did. The change lends itself to "#ifdef CTLTYPE_U16" =E2=80=94 =
in
this truly contrived scenario. Any other check is redundant or less
specific. (As Ngie points out, checking an absolute version doesn't do
you a lot of good in the face of backports/cherry-picks.)

> 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).

Not a problem =E2=80=94 the MFC After field was intentionally omitted (i.e.=
,
"MFC After: never"). This is only intended for CURRENT.

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVNuZQtkZhbuKPTzBG7PfyXiDu4Aav5-d2dgaQWEw2x0A>