Date: Thu, 17 Nov 2011 16:32:34 -0500 From: John Baldwin <jhb@freebsd.org> To: Robert Millan <rmh@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: <201111171632.34979.jhb@freebsd.org> In-Reply-To: <CAOfDtXNy8r5ww5xSwhH-4w7daWdzB0KsVbO75JAOT=-Wzi%2BdHw@mail.gmail.com> References: <CAOfDtXPX1Rv9T7%2B1jYQbkM14tRY7mqgCzPcUqvHxFaRObbwvEg@mail.gmail.com> <201111170959.56767.jhb@freebsd.org> <CAOfDtXNy8r5ww5xSwhH-4w7daWdzB0KsVbO75JAOT=-Wzi%2BdHw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, November 17, 2011 2:02:02 pm Robert Millan wrote: > 2011/11/17 John Baldwin <jhb@freebsd.org>: > > 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 <sys/param.h> 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 <sys/param.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111171632.34979.jhb>