[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Support both BDB 4.0 and 4.1

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-10-21 20:20:25 CEST

Branko ÄŒibej <brane@xbc.nu> writes:

> I think we shouldn't announce support for DBD 4.1 just yet; I'm
> attaching this patch in the hope that people will test it on Unix
> boxes. I'm testing it on Windows right now (with both BDB versions),
> and will commit once some Unix test reports come in.

I have built this (a shared build) and run the regression tests over
ra_local, the ra_dav tests are running right now. BDB 4.1 needs an
APRUTIL more recent than that in Apache 2.0.42.

> Index: subversion/libsvn_fs/bdb/bdb_compat.h
> ===================================================================
> --- subversion/libsvn_fs/bdb/bdb_compat.h
> +++ subversion/libsvn_fs/bdb/bdb_compat.h 2002-10-21 01:25:53.000000000 +0200
> @@ -0,0 +1,81 @@
[snip]
> +/* Before calling db_create, we must check that the version of the BDB
> + libraries we're linking with is the same as the one we compiled
> + against, because the DB->open call is not binary compatible between
> + BDB 4.0 and 4.1. */
> +static int svn_bdb__check_version (void)
> +{
> + static const int compiled_major = DB_VERSION_MAJOR;
> + static const int compiled_minor = DB_VERSION_MINOR;
> + int linked_major, linked_minor;
> + db_version(&linked_major, &linked_minor, NULL);
> + if (compiled_major != linked_major
> + || compiled_minor != linked_minor)
> + return DB_OLD_VERSION;
> + return 0;
> +}

Why is this function in a header file? gcc issues a warning for every
translation unit that includes the header but doesn't call the
function.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 21 20:21:14 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.