Re: System headers with clang?

看板FB_current作者時間14年前 (2011/10/12 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/28 (看更多)
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. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1Eb8HWB- (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1Eb8HWB- (FB_current)