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

看板FB_current作者時間14年前 (2011/11/23 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串22/24 (看更多)
On Tuesday, November 22, 2011 12:59:19 pm Robert Millan wrote: > 2011/11/22 John Baldwin <jhb@freebsd.org>: > > Is __FreeBSD_version defined if __FreeBSD_kernel__ is defined on kFreeBSD? > > Not currently (except for kernel-space code), but if all the checks > that use __FreeBSD_version are like the one you describe, I think it'd > make sense. I can think of cases where you might want it exposed (e.g. in the parts of net-snmp that grovel around in kernel data structures and use __FreeBSD_version to figure out what the right thing to do is, possibly the same with lsof). > But we need to make sure that defining it wouldn't suddenly enable > code that is intended for FreeBSD userland, like it happens with > __FreeBSD__. Correct. I don't believe that is the case since normally one has to check for __FreeBSD__ before using __FreeBSD_version. -- John Baldwin _______________________________________________ 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): #1Eo_YoB3 (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 22 之 24 篇):
文章代碼(AID): #1Eo_YoB3 (FB_current)