diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 18:40:25 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 11:18:34 +0200 |
commit | 0e4c358e2710580d5aeb439d767c87aaf4c0f2f3 (patch) | |
tree | aeca32c597485b907e017e7dd580c9603af14ee2 /lib | |
parent | 61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb (diff) | |
download | samba-0e4c358e2710580d5aeb439d767c87aaf4c0f2f3.tar.gz samba-0e4c358e2710580d5aeb439d767c87aaf4c0f2f3.tar.bz2 samba-0e4c358e2710580d5aeb439d767c87aaf4c0f2f3.zip |
tdb_compat.h: divert every tdb build and includes to tdb_compat
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tdb_compat/wscript | 11 | ||||
-rw-r--r-- | lib/util/tdb_wrap.c | 2 | ||||
-rw-r--r-- | lib/util/tdb_wrap.h | 2 | ||||
-rw-r--r-- | lib/util/util_tdb.c | 2 | ||||
-rwxr-xr-x | lib/util/wscript_build | 4 |
5 files changed, 14 insertions, 7 deletions
diff --git a/lib/tdb_compat/wscript b/lib/tdb_compat/wscript index 14be4e7fe0..8a6f69a96a 100644 --- a/lib/tdb_compat/wscript +++ b/lib/tdb_compat/wscript @@ -1,7 +1,16 @@ #!/usr/bin/env python +def set_options(opt): + opt.RECURSE('lib/tdb') + +def configure(conf): + conf.RECURSE('lib/tdb') + conf.RECURSE('lib/ccan') + def build(bld): + bld.RECURSE('lib/tdb') + bld.RECURSE('lib/ccan') bld.SAMBA_LIBRARY('tdb_compat', source='tdb_compat.c', - deps='replace tdb', + deps='replace tdb ccan', private_library=True) diff --git a/lib/util/tdb_wrap.c b/lib/util/tdb_wrap.c index c9562c6939..b19b4fe67f 100644 --- a/lib/util/tdb_wrap.c +++ b/lib/util/tdb_wrap.c @@ -20,10 +20,8 @@ */ #include "includes.h" -#include <tdb.h> #include "lib/util/dlinklist.h" #include "lib/util/tdb_wrap.h" -#include <tdb.h> /* Log tdb messages via DEBUG(). diff --git a/lib/util/tdb_wrap.h b/lib/util/tdb_wrap.h index 1be2bb059d..6f9f3834d4 100644 --- a/lib/util/tdb_wrap.h +++ b/lib/util/tdb_wrap.h @@ -29,7 +29,7 @@ #ifndef _TDB_WRAP_H_ #define _TDB_WRAP_H_ -#include <tdb.h> +#include "tdb_compat.h" struct tdb_wrap { struct tdb_context *tdb; diff --git a/lib/util/util_tdb.c b/lib/util/util_tdb.c index 4a81678808..33615854bd 100644 --- a/lib/util/util_tdb.c +++ b/lib/util/util_tdb.c @@ -20,7 +20,7 @@ */ #include "includes.h" -#include <tdb.h> +#include "../lib/tdb_compat/tdb_compat.h" #include "../lib/util/util_tdb.h" /* these are little tdb utility functions that are meant to make diff --git a/lib/util/wscript_build b/lib/util/wscript_build index 6c4bb37884..a094fa3b54 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -76,7 +76,7 @@ bld.SAMBA_LIBRARY('wrap_xattr', bld.SAMBA_LIBRARY('UTIL_TDB', source='util_tdb.c', local_include=False, - public_deps='tdb talloc', + public_deps='tdb_compat talloc', private_library=True ) @@ -113,7 +113,7 @@ bld.SAMBA_SUBSYSTEM('UTIL_PW', bld.SAMBA_LIBRARY('tdb-wrap', source='tdb_wrap.c', - deps='tdb talloc samba-util', + deps='tdb_compat talloc samba-util', private_library=True, local_include=False ) |