From 508a33fc2af8f2c1bcfe9aad5362cf3a9762c585 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 May 2012 21:36:48 +0200 Subject: s3:dbwrap: move definition of dbwrap_lock_order to dbwrap.h This is needed in all of the library, not only in the dbwrap_open part. --- source3/lib/dbwrap/dbwrap.h | 6 ++++++ source3/lib/dbwrap/dbwrap_ctdb.c | 1 + source3/lib/dbwrap/dbwrap_open.h | 6 ------ source3/lib/dbwrap/dbwrap_private.h | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/dbwrap/dbwrap.h b/source3/lib/dbwrap/dbwrap.h index 3304bcf4a4..59e5af069e 100644 --- a/source3/lib/dbwrap/dbwrap.h +++ b/source3/lib/dbwrap/dbwrap.h @@ -25,6 +25,12 @@ struct db_record; struct db_context; +enum dbwrap_lock_order { + DBWRAP_LOCK_ORDER_1 = 1, + DBWRAP_LOCK_ORDER_2 = 2, + DBWRAP_LOCK_ORDER_3 = 3 +}; + /* The following definitions come from lib/dbwrap.c */ TDB_DATA dbwrap_record_get_key(const struct db_record *rec); diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 933cad5ebd..1e9975417d 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -22,6 +22,7 @@ #include "system/filesys.h" #include "lib/tdb_wrap/tdb_wrap.h" #include "util_tdb.h" +#include "dbwrap/dbwrap.h" #include "dbwrap/dbwrap_ctdb.h" #include "dbwrap/dbwrap_rbt.h" #include "lib/param/param.h" diff --git a/source3/lib/dbwrap/dbwrap_open.h b/source3/lib/dbwrap/dbwrap_open.h index 9ed2245afd..51c7dfd235 100644 --- a/source3/lib/dbwrap/dbwrap_open.h +++ b/source3/lib/dbwrap/dbwrap_open.h @@ -29,12 +29,6 @@ struct db_context; */ bool db_is_local(const char *name); -enum dbwrap_lock_order { - DBWRAP_LOCK_ORDER_1 = 1, - DBWRAP_LOCK_ORDER_2 = 2, - DBWRAP_LOCK_ORDER_3 = 3 -}; - /** * Convenience function that will determine whether to * open a tdb database via the tdb backend or via the ctdb diff --git a/source3/lib/dbwrap/dbwrap_private.h b/source3/lib/dbwrap/dbwrap_private.h index 94993428a4..c197ffacf2 100644 --- a/source3/lib/dbwrap/dbwrap_private.h +++ b/source3/lib/dbwrap/dbwrap_private.h @@ -23,8 +23,6 @@ #ifndef __DBWRAP_PRIVATE_H__ #define __DBWRAP_PRIVATE_H__ -#include "dbwrap/dbwrap_open.h" - struct db_record { struct db_context *db; TDB_DATA key, value; -- cgit