Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2011 20:02:02 +0100
From:      Robert Millan <rmh@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Adrian Chadd <adrian@freebsd.org>, freebsd-current@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: [PATCH] Detect GNU/kFreeBSD in user-visible kernel headers
Message-ID:  <CAOfDtXNy8r5ww5xSwhH-4w7daWdzB0KsVbO75JAOT=-Wzi%2BdHw@mail.gmail.com>
In-Reply-To: <201111170959.56767.jhb@freebsd.org>
References:  <CAOfDtXPX1Rv9T7%2B1jYQbkM14tRY7mqgCzPcUqvHxFaRObbwvEg@mail.gmail.com> <B188597B-4446-4EAB-A9BD-D9EBBEB8B1D7@bsdimp.com> <CAOfDtXMsmDa2XaZ0qmMKZxF5xagotw5EwaU=7y_GUxKLhaJ9OQ@mail.gmail.com> <201111170959.56767.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--20cf303ea614152c2d04b1f2db2b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

2011/11/17 John Baldwin <jhb@freebsd.org>:
> 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 <sys/param.h> 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 <sys/param.h> 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
NiArNjAsMjMgQEAKICN1bmRlZiBfX0ZyZWVCU0RfdmVyc2lvbgogI2RlZmluZSBfX0ZyZWVCU0Rf
dmVyc2lvbiAxMDAwMDAxCS8qIE1hc3RlciwgcHJvcGFnYXRlZCB0byBuZXd2ZXJzICovCiAKKy8q
CisgKiBfX0ZyZWVCU0Rfa2VybmVsX18gaW5kaWNhdGVzIHRoYXQgdGhpcyBzeXN0ZW0gdXNlcyB0
aGUga2VybmVsIG9mIEZyZWVCU0QsCisgKiB3aGljaCBieSBkZWZpbml0aW9uIGlzIGFsd2F5cyB0
cnVlIG9uIEZyZWVCU0QgOi0pLiBUaGlzIG1hY3JvIG1heSBhbHNvCisgKiBiZSBkZWZpbmVkIG9u
IG90aGVyIHN5c3RlbXMgdGhhdCB1c2UgdGhlIGtlcm5lbCBvZiBGcmVlQlNELCBzdWNoIGFzCisg
KiBHTlUva0ZyZWVCU0QuCisgKgorICogSXQgaXMgdGVtcHRpbmcgdG8gdXNlIHRoaXMgbWFjcm8g
aW4gdXNlcmxhbmQgY29kZSB3aGVuIHdlIHdhbnQgdG8gZW5hYmxlCisgKiBrZXJuZWwtc3BlY2lm
aWMgcm91dGluZXMsIGFuZCBpbiBmYWN0IGl0J3MgZmluZSB0by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