[PATCH] Detect GNU/kFreeBSD in user-visible kernel headers (v2)
Bruce Evans
brde at optusnet.com.au
Thu Nov 24 03:25:55 UTC 2011
On Wed, 23 Nov 2011, Robert Millan wrote:
> Here we go again :-)
>
> Out of the kernel headers that are installed in /usr/include/ hierracy, there
> are some which include support multiple operating systems (usually FreeBSD and
> other *BSD flavours).
>
> This patch adds support to detect GNU/kFreeBSD as well. In all cases, we
> match the same declarations as FreeBSD does (which is to be expected in kernel
> headers, since both systems share the same kernel).
Now it adds lots of namespace pollution (all of <sys/param.h>, including
all of its namespace pollution), just to get 1 new symbol defined.
% Index: sys/cam/scsi/scsi_low.h
% ===================================================================
% --- sys/cam/scsi/scsi_low.h (revision 227831)
% +++ sys/cam/scsi/scsi_low.h (working copy)
% @@ -44,6 +44,8 @@
% #ifndef _SCSI_LOW_H_
% #define _SCSI_LOW_H_
%
% +#include <sys/param.h>
% +
% /*================================================
% * Scsi low OSDEP
% * (All os depend structures should be here!)
%
% [... 22 more headers polluted]
All the affected headers are poorly implemented ones. Mostly kernel
headers which escaped to userland.
Bruce
More information about the freebsd-current
mailing list