summaryrefslogtreecommitdiff
path: root/wscript_build
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-20 16:58:15 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-20 11:18:34 +0200
commit61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb (patch)
treefaa7f5e9176338f3d9e236860c57cd26132a7864 /wscript_build
parenteb8cb4f5486ec8648527e78c110b9167887ee479 (diff)
downloadsamba-61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb.tar.gz
samba-61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb.tar.bz2
samba-61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb.zip
lib/tdb_compat: header for tdb1 vs tdb2.
TDB2's API is slightly different from TDB1. In particular, all functions return 0 (TDB_SUCCESS) or a negative error number, rather than -1 or tdb_null and storing the error in tdb_error() (though TDB2 does that as well). The simplest fix is to replace all the different functions with a wrapper, and that is done here. Compatibility functions: tdb_null: not used as an error return, so not defined by tdb2. tdb_fetch_compat: TDB1-style data-returning tdb_fetch. tdb_firstkey_compat: TDB1-style data-returning tdb_firstkey tdb_nextkey_compat: TDB1-style data-returning tdb_nextkey, with TDB2-style free of old key. tdb_errorstr_compat: TDB1-style tdb_errorstr() which takes TDB instead of ecode. TDB_CONTEXT: TDB1-style typedef for struct tdb_context. tdb_open_compat: Simplified open routine which takes log function, sets TDB_ALLOW_NESTING as Samba expects, and adds TDB_CLEAR_IF_FIRST support. Things defined away in TDB2 wrappers: tdb_traverse_read: TDB2's tdb_traverse only uses read-locks anyway. tdb_reopen/tdb_reopen_all: TDB2 detects this error itself. TDB_INCOMPATIBLE_HASH: TDB2 uses the Jenkins hash already. TDB_VOLATILE: TDB2 shouldn't have freelist scaling issues. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'wscript_build')
-rw-r--r--wscript_build1
1 files changed, 1 insertions, 0 deletions
diff --git a/wscript_build b/wscript_build
index d42978ff66..a6e2cab8fb 100644
--- a/wscript_build
+++ b/wscript_build
@@ -38,6 +38,7 @@ bld.RECURSE('lib/talloc')
bld.RECURSE('lib/tdb')
bld.RECURSE('lib/tevent')
bld.RECURSE('lib/ccan')
+bld.RECURSE('lib/tdb_compat')
bld.RECURSE('source4/lib/ldb')
bld.RECURSE('source4/dynconfig')
bld.RECURSE('lib/util/charset')