summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-20 18:40:25 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-20 11:18:34 +0200
commit0e4c358e2710580d5aeb439d767c87aaf4c0f2f3 (patch)
treeaeca32c597485b907e017e7dd580c9603af14ee2 /source4
parent61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb (diff)
downloadsamba-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 'source4')
-rw-r--r--source4/cluster/local.c2
-rw-r--r--source4/lib/ldb-samba/ldb_wrap.c2
-rw-r--r--source4/lib/ldb-samba/wscript_build2
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.h2
-rwxr-xr-xsource4/lib/ldb/wscript17
-rw-r--r--source4/lib/messaging/messaging.c2
-rw-r--r--source4/ntvfs/common/brlock.c2
-rw-r--r--source4/ntvfs/common/brlock_tdb.c2
-rw-r--r--source4/ntvfs/common/notify.c2
-rw-r--r--source4/ntvfs/common/opendb_tdb.c2
-rw-r--r--source4/ntvfs/posix/python/pyxattr_tdb.c2
-rw-r--r--source4/ntvfs/posix/vfs_posix.c2
-rw-r--r--source4/ntvfs/posix/xattr_tdb.c2
-rw-r--r--source4/torture/basic/mangle_test.c2
-rw-r--r--source4/torture/local/dbspeed.c2
15 files changed, 25 insertions, 20 deletions
diff --git a/source4/cluster/local.c b/source4/cluster/local.c
index 833a86b07f..0a294b4d1d 100644
--- a/source4/cluster/local.c
+++ b/source4/cluster/local.c
@@ -22,7 +22,7 @@
#include "includes.h"
#include "cluster/cluster.h"
#include "cluster/cluster_private.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include "lib/util/tdb_wrap.h"
#include "system/filesys.h"
#include "param/param.h"
diff --git a/source4/lib/ldb-samba/ldb_wrap.c b/source4/lib/ldb-samba/ldb_wrap.c
index d713dfffbf..66213bf288 100644
--- a/source4/lib/ldb-samba/ldb_wrap.c
+++ b/source4/lib/ldb-samba/ldb_wrap.c
@@ -35,7 +35,7 @@
#include "dsdb/samdb/samdb.h"
#include "param/param.h"
#include "../lib/util/dlinklist.h"
-#include <tdb.h>
+#include "../lib/tdb_compat/tdb_compat.h"
/*
this is used to catch debug messages from ldb
diff --git a/source4/lib/ldb-samba/wscript_build b/source4/lib/ldb-samba/wscript_build
index e6a13f3933..2e1cacba64 100644
--- a/source4/lib/ldb-samba/wscript_build
+++ b/source4/lib/ldb-samba/wscript_build
@@ -8,7 +8,7 @@ bld.SAMBA_LIBRARY('ldbsamba',
source='ldif_handlers.c',
autoproto='ldif_handlers_proto.h',
public_deps='ldb',
- deps='security ndr NDR_DRSBLOBS NDR_DNSP ldbwrap samdb-common SAMDB_SCHEMA tdb pyldb-util errors',
+ deps='security ndr NDR_DRSBLOBS NDR_DNSP ldbwrap samdb-common SAMDB_SCHEMA tdb_compat pyldb-util errors',
private_library=True
)
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.h b/source4/lib/ldb/ldb_tdb/ldb_tdb.h
index 3d793d27df..82127a1f56 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.h
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.h
@@ -1,7 +1,7 @@
#include "replace.h"
#include "system/filesys.h"
#include "system/time.h"
-#include "tdb.h"
+#include "tdb_compat.h"
#include "ldb_module.h"
/* this private structure is used by the ltdb backend in the
diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript
index b59e782e45..393f99f630 100755
--- a/source4/lib/ldb/wscript
+++ b/source4/lib/ldb/wscript
@@ -16,29 +16,33 @@ sys.path.insert(0, srcdir + '/buildtools/wafsamba')
import wafsamba, samba_dist, Options
samba_dist.DIST_DIRS('''source4/lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
- lib/tdb:lib/tdb lib/tevent:lib/tevent lib/popt:lib/popt
+ lib/tdb:lib/tdb lib/tdb_compat:lib/tdb_compat lib/ccan:lib/ccan lib/tevent:lib/tevent lib/popt:lib/popt
buildtools:buildtools''')
def set_options(opt):
opt.BUILTIN_DEFAULT('replace')
opt.PRIVATE_EXTENSION_DEFAULT('ldb', noextension='ldb')
- opt.RECURSE('lib/tdb')
+ opt.RECURSE('lib/tdb_compat')
opt.RECURSE('lib/tevent')
opt.RECURSE('lib/replace')
opt.tool_options('python') # options for disabling pyc or pyo compilation
def configure(conf):
- conf.RECURSE('lib/tdb')
+ conf.RECURSE('lib/tdb_compat')
conf.RECURSE('lib/tevent')
conf.RECURSE('lib/popt')
conf.RECURSE('lib/replace')
+ conf.RECURSE('lib/tdb_compat')
conf.find_program('python', var='PYTHON')
conf.find_program('xsltproc', var='XSLTPROC')
conf.check_tool('python')
conf.check_python_version((2,4,2))
conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True)
+ # This make #include <ccan/...> work.
+ conf.ADD_EXTRA_INCLUDES('''#lib''')
+
# where does the default LIBDIR end up? in conf.env somewhere?
#
conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb')
@@ -72,10 +76,11 @@ def configure(conf):
conf.SAMBA_CONFIG_H()
def build(bld):
- bld.RECURSE('lib/tdb')
+ bld.RECURSE('lib/tdb_compat')
bld.RECURSE('lib/tevent')
bld.RECURSE('lib/popt')
bld.RECURSE('lib/replace')
+ bld.RECURSE('lib/tdb_compat')
if bld.env.standalone_ldb:
private_library = False
@@ -233,14 +238,14 @@ def build(bld):
init_function='ldb_tdb_init',
module_init_name='ldb_init_module',
internal_module=False,
- deps='tdb ldb',
+ deps='tdb_compat ldb',
subsystem='ldb')
# have a separate subsystem for common/ldb.c, so it can rebuild
# for install with a different -DLDB_MODULESDIR=
bld.SAMBA_SUBSYSTEM('LIBLDB_MAIN',
'common/ldb.c',
- deps='tevent',
+ deps='tevent tdb_compat',
includes='include',
cflags=['-DLDB_MODULESDIR=\"%s\"' % modules_dir])
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index aa1b43308f..13fc188155 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -30,7 +30,7 @@
#include "lib/util/tdb_wrap.h"
#include "../lib/util/unix_privs.h"
#include "librpc/rpc/dcerpc.h"
-#include <tdb.h>
+#include "../lib/tdb_compat/tdb_compat.h"
#include "../lib/util/util_tdb.h"
#include "cluster/cluster.h"
#include "../lib/util/tevent_ntstatus.h"
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index 142b4ff799..a6232f8596 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -26,7 +26,7 @@
#include "includes.h"
#include "system/filesys.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include "messaging/messaging.h"
#include "lib/messaging/irpc.h"
#include "libcli/libcli.h"
diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c
index 3fd0edcc69..885eda98cd 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -26,7 +26,7 @@
#include "includes.h"
#include "system/filesys.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include "messaging/messaging.h"
#include "lib/util/tdb_wrap.h"
#include "lib/messaging/irpc.h"
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index e3335feb91..98f17a6565 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -25,7 +25,7 @@
#include "includes.h"
#include "system/filesys.h"
-#include <tdb.h>
+#include "../lib/tdb_compat/tdb_compat.h"
#include "../lib/util/util_tdb.h"
#include "messaging/messaging.h"
#include "lib/util/tdb_wrap.h"
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index 7c2707f7c6..851d838203 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -40,7 +40,7 @@
#include "includes.h"
#include "system/filesys.h"
-#include <tdb.h>
+#include "../lib/tdb_compat/tdb_compat.h"
#include "messaging/messaging.h"
#include "lib/util/tdb_wrap.h"
#include "lib/messaging/irpc.h"
diff --git a/source4/ntvfs/posix/python/pyxattr_tdb.c b/source4/ntvfs/posix/python/pyxattr_tdb.c
index 34b449f70f..2b28aca365 100644
--- a/source4/ntvfs/posix/python/pyxattr_tdb.c
+++ b/source4/ntvfs/posix/python/pyxattr_tdb.c
@@ -20,7 +20,7 @@
#include <Python.h>
#include "includes.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include "lib/util/tdb_wrap.h"
#include "librpc/ndr/libndr.h"
#include "lib/util/wrap_xattr.h"
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 5b89f1e608..00ed146c96 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -26,7 +26,7 @@
#include "includes.h"
#include "vfs_posix.h"
#include "librpc/gen_ndr/security.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include "lib/util/tdb_wrap.h"
#include "libcli/security/security.h"
#include "lib/events/events.h"
diff --git a/source4/ntvfs/posix/xattr_tdb.c b/source4/ntvfs/posix/xattr_tdb.c
index 2d6f1d94d0..a2e8111ded 100644
--- a/source4/ntvfs/posix/xattr_tdb.c
+++ b/source4/ntvfs/posix/xattr_tdb.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "lib/util/tdb_wrap.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include "vfs_posix.h"
#define XATTR_LIST_ATTR ".xattr_list"
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 0b7d696e67..a15dc00939 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -20,7 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "system/dir.h"
-#include <tdb.h>
+#include "../lib/tdb_compat/tdb_compat.h"
#include "../lib/util/util_tdb.h"
#include "libcli/libcli.h"
#include "torture/util.h"
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c
index 55fed70b0a..92deb4f818 100644
--- a/source4/torture/local/dbspeed.c
+++ b/source4/torture/local/dbspeed.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "system/filesys.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include <ldb.h>
#include <ldb_errors.h>
#include "ldb_wrap.h"