On Fri, Sep 13, 2002 at 09:01:45AM -0700, Terry Lambert wrote the words in effect of: > Terry Lambert wrote: > > Jev wrote: > > > Im trying to build some software on freebsd, which wants to use > > > the thread safe gethostbyname_r(). Despite having very bad C skills im > > > going to attempt to patch it. What would I use in place of > > > gethostbyname_r() on freebsd? > > > > Do you need the real gethostbyname_r(), or do you need the > > bastardized Linux version? The real version has the prototype: > > In case anyone cares, it's the pre-knowing the buffer size, with > no ability to return partial results and at the same time indicate > the buffer is to short, and the h_errno pointer and the return > of the hostent structure whose address was passed, rather than an > int, that I object to in the Linux interface. > > And yes, I know it matches the Solaris interface.
Aplogies, for the late arrival of this mail. I do not read -hackers very much these days. But I found this worth the while to comment. Doesnt getaddrinfo() do whatever gethostbyname() can do? And also, if my source of information is correct, getaddrinfo() should be thread-safe and also, it is under the POSIX p1003.1g. Regards. -- Hiten Pandya http://www.unixdaemons.com/~hiten [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] PGP: http://pgp.mit.edu:11371/pks/lookup?search=Hiten+Pandya&op=index To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message