Re: [PATCH] Detect GNU/kFreeBSD in user-visible kernel headers

From: Robert Millan <rmh_at_freebsd.org>
Date: Fri, 18 Nov 2011 07:47:19 +0100
2011/11/17 John Baldwin <jhb_at_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.
Received on Fri Nov 18 2011 - 05:47:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:20 UTC