Date: Fri, 18 Nov 2011 07:47:19 +0100 From: Robert Millan <rmh@freebsd.org> To: John Baldwin <jhb@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: <CAOfDtXMFk%2BC_eUsb6190UHHM0cgu3jf1M_M9oq4ibuYuke4pYQ@mail.gmail.com> In-Reply-To: <201111171632.34979.jhb@freebsd.org> References: <CAOfDtXPX1Rv9T7%2B1jYQbkM14tRY7mqgCzPcUqvHxFaRObbwvEg@mail.gmail.com> <201111170959.56767.jhb@freebsd.org> <CAOfDtXNy8r5ww5xSwhH-4w7daWdzB0KsVbO75JAOT=-Wzi%2BdHw@mail.gmail.com> <201111171632.34979.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2011/11/17 John Baldwin <jhb@freebsd.org>: > 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? Well, the compiler is supposed to know better than sys/param.h, because it inherited this number from the runtime kernel when it was built. However, __FreeBSD__ comes from the compiler already so if you "#define __FreeBSD_kernel__ __FreeBSD__" you get the information from the compiler anyway. As both approaches do the same thing, I really don't mind either way.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfDtXMFk%2BC_eUsb6190UHHM0cgu3jf1M_M9oq4ibuYuke4pYQ>