Is there any good reason for get*by*_r()?

Sean C. Farley sean-freebsd at farley.org
Wed Sep 27 14:44:23 PDT 2006


On Tue, 26 Sep 2006, Mark Andrews wrote:

> 	get*by*_r() are deprecated on most platforms and there use
> 	is highly non-portable, lots of different API's.

My understanding was that FreeBSD has copied the Linux version of the
API.

> 	Why are we adding compatability for deprecated functions?

Some projects use them and do not consider get*by*() functions to be
thread-safe (FreeBSD's are).  They would naturally impose extra locking
on the get*by*() calls for safety.  devel/nspr which Firefox uses for
its network calls.  I also saw that games/sauerbraten uses them.  Of
course, these projects should replace these calls with getaddrinfo().

Sean
-- 
sean-freebsd at farley.org


More information about the freebsd-stable mailing list