Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Nov 2011 11:35:15 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Robert Millan <rmh@debian.org>
Cc:        Adrian Chadd <adrian@freebsd.org>, freebsd-current@freebsd.org, Bruce Evans <brde@optusnet.com.au>, freebsd-arch@freebsd.org
Subject:   Re: [PATCH] Detect GNU/kFreeBSD in user-visible kernel headers
Message-ID:  <20111122093515.GK50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <CAOfDtXNypUhu-dWznLyHcZMN-ZPSn_qTC6pSuL68r2M2hOjZTg@mail.gmail.com>
References:  <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> <20111120174807.GY50300@deviant.kiev.zoral.com.ua> <20111121133954.A1108@besplex.bde.org> <20111121092749.GD50300@deviant.kiev.zoral.com.ua> <CAOfDtXNypUhu-dWznLyHcZMN-ZPSn_qTC6pSuL68r2M2hOjZTg@mail.gmail.com>

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

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

On Mon, Nov 21, 2011 at 06:39:26PM +0100, Robert Millan wrote:
> (replying with Debian hat this time)
>=20
> 2011/11/21 Kostik Belousov <kostikbel@gmail.com>:
> > There are some implementations that
> > use FreeBSD kernel, and which could potentially benefit from providing
> > its own value for __FreeBSD_kernel.
>=20
> Actually, we wouldn't be able to provide a different value for the
> macro (whatever its name). Our compiler simply doesn't know which
> version of the kernel it is building for. Only the headers do, but if
> we define it in the headers we'd just use the FreeBSD definitions.
>=20
> Our compiler defines __FreeBSD_kernel__ as an empty macro, I don't
> expect this will change because unlike with FreeBSD, on Debian there
> are strong technical limitations to making it a number.
>=20
> If __FreeBSD_kernel__ is to be defined in FreeBSD land, may I suggest
> that it is defined as an empty macro as well? This covers the vast
> majority of cases (e.g. like the ones in my initial patch which
> started this discussion), and it doesn't preclude the possibility that
> this macro becomes a number without breaking backward compatibility.
>=20
> OTOH once you define it as a number, it becomes relevant whether you
> did it with #ifndef or with #undef, and so you have to commit to it.
>=20
> Just to make it clear: It's no problem to me if it's defined as a
> number, but it doesn't help much either. At least from Debian POV it's
> not worth making a big argument about. It could be a good idea from
> FreeBSD POV, but please only do this if it's useful to FreeBSD.
>=20
I am fine with __FreeBSD_kernel being empty, please submit the patch.

--313G32quqWeq5lpS
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iEYEARECAAYFAk7LbNMACgkQC3+MBN1Mb4gXaQCfdYpkCc+hivE5dTAUIUj7IvKa
7owAn1Myrkr9h2XERuYtrgXTEMgMATlb
=uxi0
-----END PGP SIGNATURE-----

--313G32quqWeq5lpS--



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