From owner-freebsd-ports@FreeBSD.ORG Sun Nov 28 21:13:50 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 605D316A4CE for ; Sun, 28 Nov 2004 21:13:50 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 6DD1043D1D for ; Sun, 28 Nov 2004 21:13:49 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: (qmail 7342 invoked by uid 65534); 28 Nov 2004 21:13:48 -0000 Received: from p5485483F.dip.t-dialin.net (EHLO merlin) (84.133.72.63) by mail.gmx.net (mp002) with SMTP; 28 Nov 2004 22:13:48 +0100 X-Authenticated: #428038 Date: Sun, 28 Nov 2004 22:13:46 +0100 From: Matthias Andree To: "Conrad J. Sabatier" Message-ID: <20041128211346.GC25374@merlin.emma.line.org> Mail-Followup-To: "Conrad J. Sabatier" , Bauno , freebsd-ports@freebsd.org References: <20041127191925.69c8994c@dolphin.local.net> <20041127194736.0198f21f@dolphin.local.net> <200411281723.28744.bauno@inwind.it> <20041128130321.6f984751@dolphin.local.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041128130321.6f984751@dolphin.local.net> User-Agent: Mutt/1.5.6i cc: freebsd-ports@freebsd.org cc: Bauno Subject: Re: porting klibido to FreeBSD X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 21:13:50 -0000 On Sun, 28 Nov 2004, Conrad J. Sabatier wrote: > On Sun, 28 Nov 2004 17:23:28 +0100, Bauno wrote: > > > On Sunday 28 November 2004 02:47, you wrote: > > > A little more detail I should have provided before: > > > > > > The FreeBSD db4 call's arguments are defined as this: > > > > > > int > > > Db::open(const char *file, > > > const char *database, DBTYPE type, u_int32_t flags, int mode); > > > > > > > Tha'ts what I'm using: > > > > int > > Db::open(DbTxn *txnid, const char *file, > > const char *database, DBTYPE type, u_int32_t flags, int mode); > > > > > > It's from Db 4.2, but I used it with db 4.1 as well, with no problems. > > The DbTxn *txnid is the transaction handler, it seems strange it's > > missing...that would mean the Bdb in freebsd can't be used as a > > transactional data store. > > > > What version of Berkeley Db is installed on Freebsd? I didn't get where this started, and figured you got it solved, congratulations on that. Berkeley DB has been offering the transactional datastore since version 3.0 if I recall correctly (but I never bothered for 2.x), and the developer version of bogofilter (in the bogofilter CVS) works with Berkeley DB 3.0 to 4.3 (port commit is pending, ports/73790). It's all a real mess because SleepyCat changed the interface between minor releases, as you've found out the hard way. Add a txnid argument here, remove an option or flag there... every version is different. The hoops we need to jump in bogofilter are documented in the DB_AT_LEAST, DB_EQUAL, DB_AT_MOST macros in our DB interface: http://cvs.sourceforge.net/viewcvs.py/bogofilter/bogofilter/src/datastore_db.c?view=markup You'll find information in the Berkeley DB reference documentation in the chapter "Upgrading Berkeley DB Applications", if you're looking at 4.2's document, it has the documentation all the way back to 1.85. Look for ref/toc.html underneath $DOCSDIR. HTH, -- Matthias Andree