Date: Mon, 13 Aug 2012 07:14:40 -0700 From: mdf@FreeBSD.org To: Hooman Fazaeli <hoomanfazaeli@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: How to know __FreeBSD_version for a symbol Message-ID: <CAMBSHm9N6jOmDUt-1A-AzVcVp5DpZ_E=x9gNZ4cyV%2B6JQ7jA=Q@mail.gmail.com> In-Reply-To: <5028B9C4.60000@gmail.com> References: <5028B9C4.60000@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 13, 2012 at 1:24 AM, Hooman Fazaeli <hoomanfazaeli@gmail.com> wrote: > Hi hackers > > In the process of back porting drivers to older freebsd versions, > We sometimes need to add suitable '#if __FreeBSD_version >= xxxxx ... else > ... ' > directives to the source to use an alternate function or exclude certain > statements, defines, etc. > > What is the best (quick/reliable) way to know in which __FreeBSD_version > a symbol (function, struct member, macro, ...) has been first introduced? As far as I know it's a slightly painful look over SVN logs. First, find the SVN revision that introduced or changed the relevant symbol. Then, look at the SVN history of sys/sys/param.h for changes to __FreeBSD_version symbol. The one that's from the same or later SVN revision as the symbol change is the value you'll need. Cheers, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm9N6jOmDUt-1A-AzVcVp5DpZ_E=x9gNZ4cyV%2B6JQ7jA=Q>