Date: Fri, 27 Sep 2002 14:45:04 -0400 From: Hiten Pandya <hiten@angelica.unixdaemons.com> To: Terry Lambert <tlambert2@mindspring.com> Cc: Jev <jev@ecad.org>, freebsd-hackers@freebsd.org Subject: Re: gethostbyname_r() fbsd equiv? Message-ID: <20020927144504.A42463@angelica.unixdaemons.com> In-Reply-To: <3D820BE9.7E69C57E@mindspring.com>; from tlambert2@mindspring.com on Fri, Sep 13, 2002 at 09:01:45AM -0700 References: <20020913145830.GB41842@ecad.org> <3D820700.DB53B0F9@mindspring.com> <3D820BE9.7E69C57E@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 hiten@unixdaemons.com, hiten@uk.FreeBSD.org, hiten@xMach.org PGP: http://pgp.mit.edu:11371/pks/lookup?search=Hiten+Pandya&op=index To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020927144504.A42463>