Prefer LMDB to Berkeley DB
authorNicolas Williams <nico@twosigma.com>
Mon, 1 Jun 2015 20:58:53 +0000 (15:58 -0500)
committerNicolas Williams <nico@twosigma.com>
Fri, 26 Feb 2016 06:55:32 +0000 (00:55 -0600)
cf/db.m4
lib/hdb/hdb.c

index 7981f9ca31b0c05ee1b2511457130d18e4ce61fe..b1c9d79c963775e48e45ac56ac86170e4afb97ff 100644 (file)
--- 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@:>@]),
index 65c5967fe68e4b28f191c3d3840b8d60706828f1..e7bff038f6aa70ae5595ab9bfcbcaeb23d17d003 100644 (file)
@@ -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 };