tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patch to implement SIOCGIFINDEX



On Sat, Oct 5, 2013 at 8:00 PM, Ted Lemon <mellon%fugue.com@localhost> wrote:
> On Oct 5, 2013, at 6:33 PM, matthew sporleder 
> <msporleder%gmail.com@localhost> wrote:
>> I'm not sure which one is better and this is just a mechanical patch
>> as I haven't done any real testing.
>
> It would be better to use the same API as linux unless there is some reason 
> to use a different API.   It is worth noting that programs that depend on the 
> Advanced Sockets API in Linux currently require _GNU_SOURCE to be defined, 
> though, so if you really want to use the FreeBSD name, you could get away 
> with it if you do a #define to make the linux name work as well, and 
> conditionalize it based on the _GNU_SOURCE manifest constant.
>
> Of course, I think the idea of requiring _GNU_SOURCE to be defined to get the 
> Advanced Sockets API is absolute bollocks, but nobody asked me, and the Linux 
> guys seem set on it, so there's no harm in taking advantage of their mishigas.
>
> Ideally POSIX would fix this, but they also seem set on not adopting the 
> Advanced Sockets API for reasons unknown.
>

In the case of linux names, the patches to use are in this thread:
http://mail-index.netbsd.org/tech-net/2013/04/01/msg003976.html

But I think my man page update is still useful.


Home | Main Index | Thread Index | Old Index