[PATCH] __FreeBSD_kernel__

Robert Millan rmh at debian.org
Sun Jul 3 10:39:50 UTC 2011


2011/7/3 Ed Maste <emaste at freebsd.org>:
>> Alternatively, you should provide the symbol in
>> similar way in which we provide __FreeBSD_version, through well-known
>> header like sys/param.h and not pollute GCC.
>
> I suspect this is probably a reasonable alternative, but may mean software
> will have to pick up an additional #include.

Having to pick up an additional #include is sometimes a source of
trouble, because:

a) it's easy to forget (and hard to detect when having forgotten only
breaks the other platform)

b) one might not be able to assume this file is present (<sys/param.h>
is not in POSIX, for example)

Nevermind that, it's much better than not having the macro at all.

-- 
Robert Millan


More information about the freebsd-hackers mailing list