On Fri, Oct 23, 2015 at 2:56 PM, Ian Lepore <i...@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 <lini...@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" — 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 — the MFC After field was intentionally omitted (i.e., "MFC After: never"). This is only intended for CURRENT. Best, Conrad _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"