From owner-freebsd-arch@FreeBSD.ORG Thu Nov 17 19:02:04 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A64B106566B; Thu, 17 Nov 2011 19:02:04 +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 EAA148FC0C; Thu, 17 Nov 2011 19:02:02 +0000 (UTC) Received: by iakl21 with SMTP id l21so3645416iak.13 for ; Thu, 17 Nov 2011 11:02:02 -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; bh=8LwgUESB/Z7RfXwnSrQ7hBbBfbrOQZxR/t8gOgpcY2U=; b=WgihhmTattVPMjmNKoYt8jyHq/aXZmm7agj45g3VTjHas9UMCdFlRCul2aivCXoZIA 7MFPEiMw6lJv0uu699fyO0rEnnND+qTg/KpFBAwkfWUofzfie6xktEwWlP3+EpwO2J+P fLiHxNVGLvHwLKJ31DvIbZYuP3dDwp1knrnL8= MIME-Version: 1.0 Received: by 10.42.96.132 with SMTP id j4mr103194icn.50.1321556522642; Thu, 17 Nov 2011 11:02:02 -0800 (PST) Sender: rmh.aybabtu@gmail.com Received: by 10.42.243.198 with HTTP; Thu, 17 Nov 2011 11:02:02 -0800 (PST) In-Reply-To: <201111170959.56767.jhb@freebsd.org> References: <201111170959.56767.jhb@freebsd.org> Date: Thu, 17 Nov 2011 20:02:02 +0100 X-Google-Sender-Auth: aY09Fz8sb6SxrRzTrLVeJbcrTAg Message-ID: From: Robert Millan To: John Baldwin Content-Type: multipart/mixed; boundary=20cf303ea614152c2d04b1f2db2b 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-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2011 19:02:04 -0000 --20cf303ea614152c2d04b1f2db2b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2011/11/17 John Baldwin : > I recall the discussion from earlier. =C2=A0I can't recall if I had repli= ed to it > though. :-/ =C2=A0In my current opinion, I think it would be fine to defi= ne > __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). =C2=A0I think it will also be fine to patch in-system he= aders to > use __FreeBSD_kernel__ once is defined. =C2=A0Unfortunately= 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. =C2=A0I think that is fine, but that the sooner we ad= d > __FreeBSD_kernel__ on FreeBSD the sooner we get the clock started for a d= ay > when those extra checks can go away. =C2=A0I 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. --20cf303ea614152c2d04b1f2db2b Content-Type: text/x-diff; charset=US-ASCII; name="freebsd_kernel.diff" Content-Disposition: attachment; filename="freebsd_kernel.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gv44mibq0 SW5kZXg6IHN5cy9zeXMvcGFyYW0uaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvc3lzL3BhcmFtLmgJKHJl dmlzaW9uIDIyNzU4MCkKKysrIHN5cy9zeXMvcGFyYW0uaAkod29ya2luZyBjb3B5KQpAQCAtNjAs NiArNjAsMjMgQEAKICN1bmRlZiBf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