From owner-freebsd-current@FreeBSD.ORG Thu Nov 17 21:32:36 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 B1C551065673; Thu, 17 Nov 2011 21:32:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 850F18FC0C; Thu, 17 Nov 2011 21:32:36 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2218946B06; Thu, 17 Nov 2011 16:32:36 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A27508A050; Thu, 17 Nov 2011 16:32:35 -0500 (EST) From: John Baldwin To: Robert Millan Date: Thu, 17 Nov 2011 16:32:34 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111170959.56767.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111171632.34979.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 17 Nov 2011 16:32:35 -0500 (EST) Cc: Kostik Belousov , Adrian Chadd , freebsd-current@freebsd.org, Warner Losh , 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: Thu, 17 Nov 2011 21:32:36 -0000 On Thursday, November 17, 2011 2:02:02 pm Robert Millan wrote: > 2011/11/17 John Baldwin : > > I recall the discussion from earlier. I can't recall if I had replied to it > > though. :-/ In my current opinion, I think it would be fine to define > > __FreeBSD_kernel__ on FreeBSD and to do it in for now until all > > the compilers we use have been updated to define it automatically (which may > > be a long time). I think it will also be fine to patch in-system headers to > > use __FreeBSD_kernel__ once is defined. Unfortunately headers > > in 3rd party software are going to have to check for both __FreeBSD__ and > > __FreeBSD_kernel__ to support both GNU/kFreeBSD and older FreeBSD for the > > foreseeable future. I think that is fine, but that the sooner we add > > __FreeBSD_kernel__ on FreeBSD the sooner we get the clock started for a day > > when those extra checks can go away. I would also be fine with MFC'ing the > > addition of __FreeBSD_kernel__ to older branches (at least 7 - 9) as well. > > Well, here's a patch then. I wrote a comment in it trying to explain > the situation. Please let me know what you think. Hmm, I wonder if it's better to use the #ifndef approach rather than #undef so that when compilers are updated to DTRT we will honor their settings? (And eventually this could be maybe removed from param.h altogether.) -- John Baldwin