From owner-freebsd-current@FreeBSD.ORG Tue Nov 22 19:28:07 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A910C106564A; Tue, 22 Nov 2011 19:28:07 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4820C8FC14; Tue, 22 Nov 2011 19:28:07 +0000 (UTC) Received: by iakl21 with SMTP id l21so922343iak.13 for ; Tue, 22 Nov 2011 11:28:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=QBsDQYqLYmgyUXvhJLgNvEtBvEmeDXZr3MJJ8Qn46uY=; b=dGaOP8Y1fK5OqSo/hXbcQ57nT/aJR9qtWCgcs7dGxg2sh5Ky7jjkb788SRNbMnfvWB NcmffiZ3ERO7czy1DHAl1ZepHQWt0tXCEkTDQxkIUf0rMyzwa5JpteSCjPx9iwNsqgPR PeySwGKu0BPPHfO3bD5mWQfVG97XwfYRagiE8= MIME-Version: 1.0 Received: by 10.50.17.197 with SMTP id q5mr23787362igd.2.1321990086678; Tue, 22 Nov 2011 11:28:06 -0800 (PST) Sender: rmh.aybabtu@gmail.com Received: by 10.42.222.200 with HTTP; Tue, 22 Nov 2011 11:28:06 -0800 (PST) In-Reply-To: <201111221421.53395.jhb@freebsd.org> References: <201111220824.07823.jhb@freebsd.org> <201111221421.53395.jhb@freebsd.org> Date: Tue, 22 Nov 2011 20:28:06 +0100 X-Google-Sender-Auth: tUGdXGVOAG2mB71Vf2MLM3-L6qM Message-ID: From: Robert Millan To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 22 Nov 2011 19:36:37 +0000 Cc: Kostik Belousov , Adrian Chadd , freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [PATCH] Detect GNU/kFreeBSD in user-visible kernel headers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2011 19:28:07 -0000 2011/11/22 John Baldwin : >> Not currently (except for kernel-space code), but if all the checks >> that use __FreeBSD_version are like the one you describe, I think it'd >> make sense. > > I can think of cases where you might want it exposed (e.g. in the parts > of net-snmp that grovel around in kernel data structures and use > __FreeBSD_version to figure out what the right thing to do is, possibly > the same with lsof). > >> But we need to make sure that defining it wouldn't suddenly enable >> code that is intended for FreeBSD userland, like it happens with >> __FreeBSD__. > > Correct. =C2=A0I don't believe that is the case since normally one has to > check for __FreeBSD__ before using __FreeBSD_version. Makes sense. I'll bring this up in debian-bsd mailing list. Thanks for the tip --=20 Robert Millan