From owner-freebsd-hackers Fri Sep 13 9: 3:16 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C0F337B400 for ; Fri, 13 Sep 2002 09:03:13 -0700 (PDT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id E70C743E3B for ; Fri, 13 Sep 2002 09:03:12 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0275.cvx22-bradley.dialup.earthlink.net ([209.179.199.20] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17psuV-0002Xr-00; Fri, 13 Sep 2002 09:03:12 -0700 Message-ID: <3D820BE9.7E69C57E@mindspring.com> Date: Fri, 13 Sep 2002 09:01:45 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Jev , freebsd-hackers@freebsd.org Subject: Re: gethostbyname_r() fbsd equiv? References: <20020913145830.GB41842@ecad.org> <3D820700.DB53B0F9@mindspring.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message