Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Nov 2011 11:32:27 -0700
From:      Warner Losh <imp@bsdimp.com>
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:  <B188597B-4446-4EAB-A9BD-D9EBBEB8B1D7@bsdimp.com>
In-Reply-To: <CAOfDtXPX1Rv9T7%2B1jYQbkM14tRY7mqgCzPcUqvHxFaRObbwvEg@mail.gmail.com>
References:  <CAOfDtXPX1Rv9T7%2B1jYQbkM14tRY7mqgCzPcUqvHxFaRObbwvEg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hey Robert,

Thanks for jumping into this.  Sadly, it is a bit of a mess.  Many of =
the "multiple BSD flavor" support #ifdefs are actually quite stale by =
now, so they should be cleaned up.  That's not something you have to =
cope with, unless you want, but it colors my first reaction :)

My second reaction was why not have

#ifndef __FreeBSD_kernel__
#define __FreeBSD_kernel__ __FreeBSD__
#endif

in sys/param.h and then just change __FreeBSD__ to __FreeBSD_kernel__ in =
the headers that are affected?  But I'm not quite sure what effects that =
would have on your environment.

Thanks for considering the above modification.

Warner

On Nov 16, 2011, at 10:27 AM, Robert Millan wrote:

> Hi!
>=20
> Out of the kernel headers that are installed in /usr/include/ =
hierracy, there
> are some which include support multiple operating systems (usually =
FreeBSD and
> other *BSD flavours).
>=20
> This patch adds support to detect GNU/kFreeBSD as well.  In all cases, =
we
> match the same declarations as FreeBSD does (which is to be expected =
in kernel
> headers, since both systems share the same kernel).
>=20
> Does it look fine?
> =
<gnu-kfreebsd_headers.diff>_______________________________________________=

> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to =
"freebsd-arch-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B188597B-4446-4EAB-A9BD-D9EBBEB8B1D7>