Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Nov 2011 14:25:51 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Robert Millan <rmh@freebsd.org>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Adrian Chadd <adrian@freebsd.org>, freebsd-current@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: [PATCH] Detect GNU/kFreeBSD in user-visible kernel headers (v2)
Message-ID:  <20111124141821.O932@besplex.bde.org>
In-Reply-To: <20111123070036.GA29952@thorin>
References:  <20111123070036.GA29952@thorin>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111124141821.O932>