From owner-freebsd-current@FreeBSD.ORG Tue Nov 22 22:47:00 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 98F9A106566B; Tue, 22 Nov 2011 22:47:00 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 590FD8FC0C; Tue, 22 Nov 2011 22:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=KD+lKiL2Gv7+cDw+ESGc7XvhSMZGHrSOZjgNVlE1swg=; b=klW2WeTCl3DKdqV7tdE/pcIkAk3CFOwIXSqZb0/NJtb/IDDnkAheRgdLx28CpyWXyrX/dkkCzBvinbEBqHsRKg6H/ZuSt49qoOmK2RlUC9s33vSTV1E5P86x2nLaNe7JbEdNq5p3RyKbJsJQsJXWv+FtFCyp2Dv1nxIeHcFv1Vc=; Received: from [32.97.110.60] (port=24422 helo=[9.41.58.142]) by thebighonker.lerctr.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RSz7B-000H9j-Ec; Tue, 22 Nov 2011 16:46:59 -0600 Message-ID: <4ECC2651.6020307@lerctr.org> Date: Tue, 22 Nov 2011 16:46:41 -0600 From: Larry Rosenman Organization: LERCTR Consulting User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: John Baldwin References: <201111220824.07823.jhb@freebsd.org> <201111221421.53395.jhb@freebsd.org> In-Reply-To: <201111221421.53395.jhb@freebsd.org> X-Enigmail-Version: 1.3.3 OpenPGP: id=2F035CE6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-LERCTR-Spam-Score: 0.5 (/) X-Spam-Report: SpamScore (0.5/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, FM_MULTI_ODD2=1.1, FM_MULTI_ODD3=0.7, FM_MULTI_ODD4=0.7, FM_MULTI_ODD5=0.9 X-LERCTR-Spam-Report: SpamScore (0.5/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, FM_MULTI_ODD2=1.1, FM_MULTI_ODD3=0.7, FM_MULTI_ODD4=0.7, FM_MULTI_ODD5=0.9 Cc: Kostik Belousov , Robert Millan , freebsd-current@freebsd.org, Adrian Chadd , 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 22:47:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/22/2011 1:21 PM, John Baldwin wrote: > On Tuesday, November 22, 2011 12:59:19 pm Robert Millan wrote: >> 2011/11/22 John Baldwin : >>> Is __FreeBSD_version defined if __FreeBSD_kernel__ is defined >>> on kFreeBSD? >> >> 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. I don't believe that is the case since normally one has > to check for __FreeBSD__ before using __FreeBSD_version. > Let me know if I can help on the lsof front. I'm the maintainer of the FreeBSD lsof port, and have access to the developer. - -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOzCZQAAoJENC8dtAvA1zmuLoIAItbMRQhoF1OcW9DVI9A1qNj UHCUCIlqYqS16m+/xoagjrPdjNK/nrP1aU791KIyvtaVZQ4HCsrzsePHv7iyGBAQ L1APl7FXkAl7If3C+Nl2tJ+kiRrM8bp336KSoVnipm5zbCX7Zhp7ZFFNpcNGQ0V4 7LJdtqIwyWtPzTIdri/qARVnOcBEaG8OYj+N55JTVjPL6cqeSiu2uQSAw9tgGY68 SMQ22N04HGOrFPcGUaHA9A4RbM/b/au2oqFN+2ggcC84qpweJMMLn3/lNksM0vj+ N+RkpafGdkmUAomUYoGP7BqHx0RMnEC7Kkc2y6Ti3HeIwcbehQR+RN6953ELGwk= =Rpp5 -----END PGP SIGNATURE-----