Removal of bogus gethostbyaddr_r()
Terry Lambert
tlambert2 at mindspring.com
Thu Jun 19 01:44:35 PDT 2003
Daniel Eischen wrote:
> The _r versions are expected and part of POSIX (in general,
> I'll haven't checked to see if gethostbyaddr_r is part of
> POSIX, but it does exist in Solaris).
It's not part of POSIX. Feel free to check:
http://www.opengroup.org/onlinepubs/007904975/nfindex.html
The final APIs have yet to be worked out by ISC, who is writing
a reference implementation of a library to go with their Bind 9
reference implementation, but it is not yet final.
Most of the exisitng implementations are in fact premature.
There is some indication consumers are expected to use the
getaddrinfo/freeaddrinfo interfaces instead. These *are*
mandated by POSIX, and they *are* mandated to be thread safe,
and the final API may in fact not support gethostbyaddr_r at
all, with gethostbyaddr itself being deprecated for address
family independent lookups using getaddrinfo, instead. See also:
http://www.opengroup.org/onlinepubs/007904975/functions/getaddrinfo.html
In other words, if you want a threads-safe interface, you need
to update your software, not screw around making unportable
interfaces even less portable.
-- Terry
More information about the freebsd-threads
mailing list