From 16275048b8e9286ce7d252f73c1bb9374e1d108e Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 1 Jun 2015 15:58:53 -0500 Subject: [PATCH] Prefer LMDB to Berkeley DB --- cf/db.m4 | 2 +- lib/hdb/hdb.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cf/db.m4 b/cf/db.m4 index 7981f9ca3..b1c9d79c9 100644 --- a/cf/db.m4 +++ b/cf/db.m4 @@ -8,7 +8,7 @@ AC_ARG_WITH(db-type-preference, AS_HELP_STRING([--with-db-type-preference], [specify HDB backend DB type preference as whitespace-separated list]), [db_type_preference="$withval"], - [db_type_preference="db3 db1 lmdb sqlite"]) + [db_type_preference="lmdb db3 db1 sqlite"]) AC_ARG_WITH(berkeley-db, AS_HELP_STRING([--with-berkeley-db], [enable support for berkeley db @<:@default=check@:>@]), diff --git a/lib/hdb/hdb.c b/lib/hdb/hdb.c index 65c5967fe..e7bff038f 100644 --- a/lib/hdb/hdb.c +++ b/lib/hdb/hdb.c @@ -94,12 +94,12 @@ static struct hdb_method methods[] = { { 0, NULL, NULL, NULL, NULL} }; -#if HAVE_DB1 || HAVE_DB3 -static struct hdb_method dbmetod = - { HDB_INTERFACE_VERSION, NULL, NULL, "", hdb_db_create }; -#elif defined(HAVE_LMDB) +#if defined(HAVE_LMDB) static struct hdb_method dbmetod = { HDB_INTERFACE_VERSION, NULL, NULL, "", hdb_mdb_create }; +#elif defined(HAVE_DB1) || defined(HAVE_DB3) +static struct hdb_method dbmetod = + { HDB_INTERFACE_VERSION, NULL, NULL, "", hdb_db_create }; #elif defined(HAVE_NDBM) static struct hdb_method dbmetod = { HDB_INTERFACE_VERSION, NULL, NULL, "", hdb_ndbm_create };