From owner-cvs-all@FreeBSD.ORG Thu Apr 21 00:04:00 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 855D716A4CE; Thu, 21 Apr 2005 00:04:00 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 559E043D49; Thu, 21 Apr 2005 00:03:59 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j3L03lEP044231; Wed, 20 Apr 2005 20:03:47 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j3L03lHf044230; Wed, 20 Apr 2005 20:03:47 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 20 Apr 2005 20:03:47 -0400 From: David Schultz To: Hajimu UMEMOTO Message-ID: <20050421000347.GA44160@VARK.MIT.EDU> Mail-Followup-To: Hajimu UMEMOTO , Garrett Wollman , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <16997.30227.769989.36407@khavrinen.csail.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: Garrett Wollman cc: src-committers@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG cc: cvs-src@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/net getproto.c getprotoent.c getprotoname.c netdb_private.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2005 00:04:00 -0000 On Wed, Apr 20, 2005, Hajimu UMEMOTO wrote: > Hi, > > >>>>> On Tue, 19 Apr 2005 17:20:19 -0400 > >>>>> Garrett Wollman said: > > wollman> If they are generally useful they should be globally visible, with the > wollman> standard FreeBSD namespace protections. (In this case, this probably > wollman> means that the __ versions stay as they are, and non-__ versions can > wollman> be defined using aliases in a separate compilation unit.) > > I'm not sure they are really useful. I think they are preffered to > use for thread applications. However, our get{serv,proto}*() is now > thread-safe. So, we don't need to use get{serv,proto}*_r() to have > just thread-safeness. > > Indeed, I started this work to call getservby*_r() from getaddrinfo() > and getnameinfo(). But, after all, I didn't modify getaddrinfo() and > getnameinfo() to call getservby*_r() directly. > > Further, getserv*_r() takes struct servent_data for its argument. So, > once we decide to expose them, we will need to pay attention to an ABI > compatibility in the future. So, we should be careful, IMHO. If they are stable, and if applications (even ones written for other platforms) might benefit from them, then the right way to support them is as follows: In foo.c: #include type __foo(params) { body; } __weak_reference(__foo, foo); In foo.h: #include #if __BSD_VISIBLE type foo(params); #endif /* __BSD_VISIBLE */ But this assumes the ABI is stable. If this is not the case, then they should not be exported, at least not immediately.