From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 10 13:39:33 2003 Return-Path: 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 739E637B401 for ; Thu, 10 Jul 2003 13:39:33 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB1A243FB1 for ; Thu, 10 Jul 2003 13:39:32 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6AGhMte001895; Thu, 10 Jul 2003 16:43:22 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6AGhM3p001894; Thu, 10 Jul 2003 16:43:22 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Thu, 10 Jul 2003 16:43:22 +0000 From: Bosko Milekic To: Ben Goodwin Message-ID: <20030710164322.GA1812@technokratis.com> References: <001301c34669$438e1040$6801a8c0@dsg.atomicmatrix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001301c34669$438e1040$6801a8c0@dsg.atomicmatrix.net> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org Subject: Re: NSS Modules X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2003 20:39:33 -0000 On Wed, Jul 09, 2003 at 06:27:21PM -0400, Ben Goodwin wrote: > Hi guys ... > > I thought I'd give you a heads-up that I'm porting libnss-mysql to the NSS > API that FreeBSD 5.1 has adopted in case anyone has input, suggestions, > wants to test, etc.. > I'm also curious about including it eventually .. via ports or something > perhaps? > Is anyone else developing NSS modules for FreeBSD? > > I believe I've figured out the API .. I've got a rudimentary test working, > so ... > > Actually, I do have one question .. As I support more operating systems, > I've wondered about how to autoconf the different APIs .. right now if I see > nss.h I know it's one OS, and if I see nsswitch.h I know it's the other > (Linux vs. Solaris) .. but that doesn't hold true with FreeBSD added to the > mix. Any recommendations on what I could do to create an API define that > holds the current O/S in a clean and reliable fashion? > Thanks! You should be able to do: #if defined(__FreeBSD__) to test if you're on FreeBSD. This is built as part of the freebsd-spec in gcc so it will be defined at least if you're using our system (stock) compiler. Ideally, though, the API would be the same. :-) > -=| Ben > > http://libnss-mysql.sourceforge.net -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/