tech-net archive

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

Re: Patch to implement SIOCGIFINDEX

On Oct 5, 2013, at 6:33 PM, matthew sporleder <> 
> 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.

Home | Main Index | Thread Index | Old Index