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

From: Larry Rosenman <ler_at_lerctr.org>
Date: Tue, 22 Nov 2011 16:46:41 -0600
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/22/2011 1:21 PM, John Baldwin wrote:
> On Tuesday, November 22, 2011 12:59:19 pm Robert Millan wrote:
>> 2011/11/22 John Baldwin <jhb_at_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.
> 

Let me know if I can help on the lsof front.  I'm the maintainer
of the FreeBSD lsof port, and have access to the developer.



- -- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 512-248-2683                 E-Mail: ler_at_lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOzCZQAAoJENC8dtAvA1zmuLoIAItbMRQhoF1OcW9DVI9A1qNj
UHCUCIlqYqS16m+/xoagjrPdjNK/nrP1aU791KIyvtaVZQ4HCsrzsePHv7iyGBAQ
L1APl7FXkAl7If3C+Nl2tJ+kiRrM8bp336KSoVnipm5zbCX7Zhp7ZFFNpcNGQ0V4
7LJdtqIwyWtPzTIdri/qARVnOcBEaG8OYj+N55JTVjPL6cqeSiu2uQSAw9tgGY68
SMQ22N04HGOrFPcGUaHA9A4RbM/b/au2oqFN+2ggcC84qpweJMMLn3/lNksM0vj+
N+RkpafGdkmUAomUYoGP7BqHx0RMnEC7Kkc2y6Ti3HeIwcbehQR+RN6953ELGwk=
=Rpp5
-----END PGP SIGNATURE-----
Received on Tue Nov 22 2011 - 21:47:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:20 UTC