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

看板FB_current作者時間14年前 (2011/11/17 02:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/24 (看更多)
2011/11/16 Xin LI <delphij@delphij.net>: > Just my $0.02 -- I think we should probably do it in a more > centralized place -- otherwise in case someone imported some new code, > they have to do the same defined(__FreeBSD__) || > defined(__FreeBSD_kernel__)? How about something like: #if defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) #define __FreeBSD_kernel__ #endif it can be placed at beginning of each header, then the rest becomes much simpler. Note this has the side-effect of defining __FreeBSD_kernel__ on FreeBSD, which I suspect some people won't be fond of. An alternative could be to come up with an ad-hoc macro that means "this system is either FreeBSD or uses the same kernel as FreeBSD" and define it where needed. _______________________________________________ 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): #1En06arj (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 2 之 24 篇):
文章代碼(AID): #1En06arj (FB_current)