Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Nov 2004 22:13:46 +0100
From:      Matthias Andree <matthias.andree@gmx.de>
To:        "Conrad J. Sabatier" <conrads@cox.net>
Cc:        Bauno <bauno@inwind.it>
Subject:   Re: porting klibido to FreeBSD
Message-ID:  <20041128211346.GC25374@merlin.emma.line.org>
In-Reply-To: <20041128130321.6f984751@dolphin.local.net>
References:  <20041127191925.69c8994c@dolphin.local.net> <20041127194736.0198f21f@dolphin.local.net> <200411281723.28744.bauno@inwind.it> <20041128130321.6f984751@dolphin.local.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 28 Nov 2004, Conrad J. Sabatier wrote:

> On Sun, 28 Nov 2004 17:23:28 +0100, Bauno <bauno@inwind.it> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041128211346.GC25374>