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

From: Bruce Evans <brde_at_optusnet.com.au>
Date: Thu, 24 Nov 2011 14:25:51 +1100 (EST)
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)
% _at__at_ -44,6 +44,8 _at__at_
%  #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
Received on Thu Nov 24 2011 - 02:25:55 UTC

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