From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 13 14:14:41 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96303106564A for ; Mon, 13 Aug 2012 14:14:41 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4FCE58FC0A for ; Mon, 13 Aug 2012 14:14:41 +0000 (UTC) Received: by ghrr13 with SMTP id r13so3644310ghr.13 for ; Mon, 13 Aug 2012 07:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=q+XCAk5ATgkt/z8LVoF2xJUmu4FdbtCUMfdYvg7pzLs=; b=CTNSFXtRnk6x797EOi5cGEaiS6ugmMlU4ED0ftChI9O7IzJARxqmNuYwfOTM4Cg2sD YZGnVwIeTQlHnmRNM4oOonXdm8PuxxEHtFEheW5ZY1YnEtJq8/apH7VjxZi+KOl1HlTP urhFKxdkq3vRp0gCMYU3rhkqjx5+JHhO81MGS4vRws0axky75V4DQ9o46U70b7qb4cwo n8y1IIHLGsniwKboBVoP3G9t8C2YV4m3afrzPyqL6l43IGvPugrJIHPZKp9Nvm2Re0Ph 4y28i5Nlp0cA/8hVixcc1KMSRa4lOsnO8HOKa2LiAlPK4dQfNOCP7gZd7Q02FYPeOPJ6 ywkw== MIME-Version: 1.0 Received: by 10.66.77.40 with SMTP id p8mr17833750paw.78.1344867280419; Mon, 13 Aug 2012 07:14:40 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.62.73 with HTTP; Mon, 13 Aug 2012 07:14:40 -0700 (PDT) In-Reply-To: <5028B9C4.60000@gmail.com> References: <5028B9C4.60000@gmail.com> Date: Mon, 13 Aug 2012 07:14:40 -0700 X-Google-Sender-Auth: BLucKDYhWZNu-UGglcatJhEoODQ Message-ID: From: mdf@FreeBSD.org To: Hooman Fazaeli Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: How to know __FreeBSD_version for a symbol X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2012 14:14:41 -0000 On Mon, Aug 13, 2012 at 1:24 AM, Hooman Fazaeli 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