[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

__FreeBSD_version



Hi,

John Baldwin (FreeBSD developer) recently suggested to me that it
could be a good idea to define __FreeBSD_version on GNU/kFreeBSD.

His point is that most of the checks that use this macro are already
enclosed in kernel-specific sections, e.g.

#ifdef __FreeBSD__
#include <sys/param.h>

#if __FreeBSD_version > XXXXXXX
/* use new feature */
#endif
#endif

I haven't done a reliable inspection of this, but my general
impression is that almost all the checks that rely on this macro do it
this way.

If __FreeBSD_version doesn't unexpectedly enable code intended for
FreeBSD userland (like __FreeBSD__ does), it could be a good idea to
define it in our version of <sys/param.h>.

This would allow us to remove some of the ugly patches that workaround
lack of this macro and can't be merged upstream, or hardcoding of
-D__FreeBSD_version=xxxxx in CFLAGS of certain packages.

What do you think?

-- 
Robert Millan


Reply to: