Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Nov 2011 19:48:07 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Robert Millan <rmh@freebsd.org>
Cc:        Adrian Chadd <adrian@freebsd.org>, freebsd-current@freebsd.org, Warner Losh <imp@bsdimp.com>, freebsd-arch@freebsd.org
Subject:   Re: [PATCH] Detect GNU/kFreeBSD in user-visible kernel headers
Message-ID:  <20111120174807.GY50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <20111120114042.GA1256@thorin>
References:  <CAOfDtXPX1Rv9T7%2B1jYQbkM14tRY7mqgCzPcUqvHxFaRObbwvEg@mail.gmail.com> <201111170959.56767.jhb@freebsd.org> <CAOfDtXNy8r5ww5xSwhH-4w7daWdzB0KsVbO75JAOT=-Wzi%2BdHw@mail.gmail.com> <201111171632.34979.jhb@freebsd.org> <CAOfDtXMFk%2BC_eUsb6190UHHM0cgu3jf1M_M9oq4ibuYuke4pYQ@mail.gmail.com> <CAOfDtXP6ShN3DezN0u4PUVt9ft__2a%2BYwo3in9w01eQnfAQ7sQ@mail.gmail.com> <20111119175620.GV50300@deviant.kiev.zoral.com.ua> <20111120114042.GA1256@thorin>

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

--Wf9W8POIGIHIPm/L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 20, 2011 at 12:40:42PM +0100, Robert Millan wrote:
> On Sat, Nov 19, 2011 at 07:56:20PM +0200, Kostik Belousov wrote:
> > I fully agree with an idea that compiler is not an authorative source
> > of the knowledge of the FreeBSD version. Even more, I argue that we sha=
ll
> > not rely on compiler for this at all. Ideally, we should be able to
> > build FreeBSD using the stock compilers without local modifications.
> > Thus relying on the symbols defined by compiler, and not the source
> > is the thing to avoid and consistently remove.
> >=20
> > We must do this to be able to use third-party tooldchain for FreeBSD bu=
ilds.
> >=20
> > That said, why not define __FreeBSD_kernel as equal to __FreeBSD_versio=
n ?
> > And then make more strong wording about other systems that use the macr=
o,
> > e.g. remove 'may' from the kFreeBSD example.
> > Also, please remove the smile from comment.
>=20
> Ok. New patch attached.

And the last, question, why not do
#ifndef __FreeBSD_kernel__
#define __FreeBSD_kernel__ __FreeBSD_version
#endif
?

#undef is too big tools tool apply there, IMO.

--Wf9W8POIGIHIPm/L
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk7JPVYACgkQC3+MBN1Mb4gSRgCdGTjCg5VHRaGSDqLIZEzpDHy6
THEAoOu96w8IHK1UsmOqzZS/S/sIDFdj
=LGeQ
-----END PGP SIGNATURE-----

--Wf9W8POIGIHIPm/L--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111120174807.GY50300>