From owner-freebsd-threads@FreeBSD.ORG Thu Jun 19 01:44:34 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D424637B401; Thu, 19 Jun 2003 01:44:34 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47A9043FD7; Thu, 19 Jun 2003 01:44:34 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfk2f.dialup.mindspring.com ([165.247.208.79] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19Sv21-0001R1-00; Thu, 19 Jun 2003 01:44:34 -0700 Message-ID: <3EF177A3.4F99EC70@mindspring.com> Date: Thu, 19 Jun 2003 01:43:15 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: deischen@freebsd.org References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a48a7ada51db5154afc8d1d9a7697f0189350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: David Xu cc: Kris Kennaway cc: threads@freebsd.org Subject: Re: Removal of bogus gethostbyaddr_r() X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2003 08:44:35 -0000 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