[PATCH] Detect GNU/kFreeBSD in user-visible kernel headers
rmh at freebsd.org
Thu Nov 17 19:02:04 UTC 2011
2011/11/17 John Baldwin <jhb at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1152 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20111117/001a3067/freebsd_kernel.bin
More information about the freebsd-current