From owner-freebsd-current@FreeBSD.ORG Tue Oct 11 13:59:28 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9DFB106568F; Tue, 11 Oct 2011 13:59:28 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9028FC08; Tue, 11 Oct 2011 13:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=3meuUQ+PhhaCluVyC4hZ/j76sNGKY+XVrq9gfiBUEIA=; b=l0bd+oX6NYIQPaQ1ybHn9qjmgojTqQ5AlraYfJgroPczkeuIrU12l+fNbn3AEpGLX9lAWtCrSxfemE41/fAf/kP/dKtq1tvZHpacqQVcHmGIBpQiCIek798UnRWI680BankLF0MwViJJzuSDTLNNtUQBnC5gIhpkegRigcwYrBw=; Received: from [32.97.110.60] (port=27009 helo=[9.41.58.142]) by thebighonker.lerctr.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RDcrb-000ExW-7b; Tue, 11 Oct 2011 08:59:27 -0500 Message-ID: <4E944BA5.4080506@lerctr.org> Date: Tue, 11 Oct 2011 08:59:01 -0500 From: Larry Rosenman Organization: LERCTR Consulting User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <4E942FF1.9000805@FreeBSD.org> <4E9449F2.2000801@FreeBSD.org> In-Reply-To: <4E9449F2.2000801@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-LERCTR-Spam-Score: -2.9 (--) X-Spam-Report: SpamScore (-2.9/5.0) ALL_TRUSTED=-1,BAYES_00=-1.9 X-LERCTR-Spam-Report: SpamScore (-2.9/5.0) ALL_TRUSTED=-1,BAYES_00=-1.9 Cc: =?ISO-8859-1?Q?Ren=E9_Ladan?= , freebsd-current@FreeBSD.ORG Subject: Re: System headers with clang? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2011 13:59:28 -0000 On 10/11/2011 8:51 AM, Dimitry Andric wrote: > On 2011-10-11 15:31, Larry Rosenman wrote: >> On Tue, 11 Oct 2011, Dimitry Andric wrote: > ... >>> I've attached a fix for the lsof port, which also makes it build on >>> 10.0-CURRENT (this was easy to fix here, as lsof uses its own >>> hand-rolled configuration script). Let me know if it works for you. >>> >> Unless the headers are fixed, Vic Abell (lsof Author) will NOT >> support it. >> >> We need to get clang/system headers to allow warning free compilation >> just like GCC does. > > The system headers compile without warning, if you use them as intended > (e.g. from the kernel), which lsof obviously doesn't do. There is no > easy workaround here, except by modifying lsof. > > For example, the warning about KASSERT is because lsof's headers don't > include the required headers for this macro. And gcc is apparently not > smart enough to generate warnings for this. :) > > In any case, isn't lsof's dlsof.h header full of special cases already? > What does it matter to add another one? > > Besides, even if you fix it in the system headers now, at compile time > you cannot be sure if the user has the correct version of them installed > anyway, so you would still have to work around the problem. We will NOT support clang as the compiler for lsof unless the system headers work the same way as gcc's do. Period. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893