summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/samba3.py2
-rw-r--r--lib/tdb_compat/wscript11
-rw-r--r--lib/util/tdb_wrap.c2
-rw-r--r--lib/util/tdb_wrap.h2
-rw-r--r--lib/util/util_tdb.c2
-rwxr-xr-xlib/util/wscript_build4
-rw-r--r--libcli/auth/schannel_state_tdb.c2
-rw-r--r--source3/configure.in1
-rw-r--r--source3/groupdb/mapping.c2
-rw-r--r--source3/include/ctdbd_conn.h2
-rw-r--r--source3/include/dbwrap.h2
-rw-r--r--source3/include/util_tdb.h2
-rw-r--r--source3/lib/eventlog/eventlog.h2
-rw-r--r--source3/lib/tdb_validate.h2
-rw-r--r--source3/libsmb/smb_share_modes.c2
-rw-r--r--source3/smbd/globals.c2
-rw-r--r--source3/smbd/statcache.c2
-rw-r--r--source3/wscript6
-rwxr-xr-xsource3/wscript_build80
-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
-rw-r--r--wscript_build1
35 files changed, 94 insertions, 82 deletions
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index e44e28bba9..d73fa3a829 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -51,7 +51,7 @@ def s3_fix_kwargs(bld, kwargs):
s3reldir = os_path_relpath(s3dir, bld.curdir)
# the extra_includes list is relative to the source3 directory
- extra_includes = [ '.', 'include', 'lib' ]
+ extra_includes = [ '.', 'include', 'lib', '../lib/tdb_compat' ]
if bld.env.use_intree_heimdal:
extra_includes += [ '../source4/heimdal/lib/com_err',
'../source4/heimdal/lib/gssapi',
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
)
diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c
index ca35a11abe..f95691fd5c 100644
--- a/libcli/auth/schannel_state_tdb.c
+++ b/libcli/auth/schannel_state_tdb.c
@@ -23,7 +23,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 "../libcli/auth/schannel.h"
#include "../librpc/gen_ndr/ndr_schannel.h"
diff --git a/source3/configure.in b/source3/configure.in
index 2d248cc4a5..e8662da0e7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -41,6 +41,7 @@ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${CCAN_CFLAGS}"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/tdb_compat"
SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt"
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index e37c951237..70c96f186c 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -26,7 +26,7 @@
#include "groupdb/mapping.h"
#include "../libcli/security/security.h"
#include "lib/winbind_util.h"
-#include <tdb.h>
+#include "tdb_compat.h"
static const struct mapping_backend *backend;
diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h
index 36b6542da0..3d712674e0 100644
--- a/source3/include/ctdbd_conn.h
+++ b/source3/include/ctdbd_conn.h
@@ -20,7 +20,7 @@
#ifndef _CTDBD_CONN_H
#define _CTDBD_CONN_H
-#include <tdb.h>
+#include "tdb_compat.h"
struct ctdbd_connection;
struct messaging_context;
diff --git a/source3/include/dbwrap.h b/source3/include/dbwrap.h
index d657ee7f30..303a554938 100644
--- a/source3/include/dbwrap.h
+++ b/source3/include/dbwrap.h
@@ -20,7 +20,7 @@
#ifndef __DBWRAP_H__
#define __DBWRAP_H__
-#include <tdb.h>
+#include "tdb_compat.h"
struct db_record {
TDB_DATA key, value;
diff --git a/source3/include/util_tdb.h b/source3/include/util_tdb.h
index a6144ba44d..f127cea1ea 100644
--- a/source3/include/util_tdb.h
+++ b/source3/include/util_tdb.h
@@ -20,7 +20,7 @@
#ifndef __TDBUTIL_H__
#define __TDBUTIL_H__
-#include <tdb.h>
+#include "tdb_compat.h"
#include <talloc.h> /* for tdb_wrap_open() */
#include "../libcli/util/ntstatus.h" /* for map_nt_error_from_tdb() */
diff --git a/source3/lib/eventlog/eventlog.h b/source3/lib/eventlog/eventlog.h
index b485bfe08e..694732d184 100644
--- a/source3/lib/eventlog/eventlog.h
+++ b/source3/lib/eventlog/eventlog.h
@@ -17,7 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <tdb.h>
+#include "tdb_compat.h"
/* Defines for TDB keys */
#define EVT_OLDEST_ENTRY "INFO/oldest_entry"
diff --git a/source3/lib/tdb_validate.h b/source3/lib/tdb_validate.h
index 3e7c20d04c..5bb043d292 100644
--- a/source3/lib/tdb_validate.h
+++ b/source3/lib/tdb_validate.h
@@ -23,7 +23,7 @@
#define __TDB_VALIDATE_H__
#include "lib/replace/replace.h"
-#include <tdb.h>
+#include "tdb_compat.h"
/**
* Flag field for keeping track of the status of a validation.
diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c
index 133b5b82f0..bb405969f3 100644
--- a/source3/libsmb/smb_share_modes.c
+++ b/source3/libsmb/smb_share_modes.c
@@ -27,7 +27,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "smb_share_modes.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#include <ccan/hash/hash.h>
/* Database context handle. */
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index 93f2ad701b..b3cf0bd7d2 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -22,7 +22,7 @@
#include "smbd/globals.h"
#include "memcache.h"
#include "messages.h"
-#include <tdb.h>
+#include "tdb_compat.h"
#if defined(WITH_AIO)
struct aio_extra *aio_list_head = NULL;
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c
index e2ccc74a87..e1597fdd58 100644
--- a/source3/smbd/statcache.c
+++ b/source3/smbd/statcache.c
@@ -25,7 +25,7 @@
#include "smbd/smbd.h"
#include "messages.h"
#include "smbprofile.h"
-#include <tdb.h>
+#include "tdb_compat.h"
/****************************************************************************
Stat cache code used in unix_convert.
diff --git a/source3/wscript b/source3/wscript
index 4b5d98bbc3..12bb08bfd7 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -25,7 +25,7 @@ def set_options(opt):
opt.RECURSE('../lib/nss_wrapper')
opt.RECURSE('../lib/socket_wrapper')
opt.RECURSE('../lib/tevent')
- opt.RECURSE('../lib/tdb')
+ opt.RECURSE('../lib/tdb_compat')
opt.add_option('--with-static-modules',
help=("Comma-separated list of names of modules to statically link in"),
@@ -93,7 +93,7 @@ def configure(conf):
conf.RECURSE('../lib/replace')
conf.RECURSE('build')
conf.RECURSE('../lib/ccan')
- conf.RECURSE('../lib/tdb')
+ conf.RECURSE('../lib/tdb_compat')
conf.RECURSE('../lib/talloc')
conf.RECURSE('../lib/tevent')
conf.RECURSE('../lib/popt')
@@ -105,7 +105,7 @@ def configure(conf):
conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace #lib''')
if not conf.env.USING_SYSTEM_TDB:
- conf.ADD_EXTRA_INCLUDES('#lib/tdb/include')
+ conf.ADD_EXTRA_INCLUDES('#lib/tdb_compat')
if not conf.env.USING_SYSTEM_TEVENT:
conf.ADD_EXTRA_INCLUDES('#lib/tevent')
if not conf.env.USING_SYSTEM_TALLOC:
diff --git a/source3/wscript_build b/source3/wscript_build
index 0e8ec502f5..0e76d1f7af 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -662,7 +662,7 @@ bld.SAMBA3_LIBRARY('rpc_client',
bld.SAMBA3_LIBRARY('netapi',
source=LIBNETAPI_SRC,
- public_deps='''talloc tdb cap wbclient LIB_NONSMBD LIBSMB KRBCLIENT
+ public_deps='''talloc tdb_compat cap wbclient LIB_NONSMBD LIBSMB KRBCLIENT
passdb SMBLDAP PARAM_WITHOUT_REG samba-util
LIBMSRPC_GEN msrpc3 ads LIBNET DCUTIL NDR_LIBNETAPI
RPC_CLIENT_SCHANNEL smbconf REG_SMBCONF TOKEN_UTIL
@@ -675,7 +675,7 @@ bld.SAMBA3_LIBRARY('netapi',
bld.SAMBA3_LIBRARY('libsmb/smbclient',
source=LIBSMBCLIENT_SRC,
- public_deps='''talloc tdb wbclient cap param LIB_NONSMBD LIBSMB KRBCLIENT passdb SMBLDAP
+ public_deps='''talloc tdb_compat wbclient cap param LIB_NONSMBD LIBSMB KRBCLIENT passdb SMBLDAP
LIBMSRPC_GEN msrpc3 LIBCLI_LSA3 RPC_NDR_SRVSVC POPT_SAMBA3''',
public_headers='include/libsmbclient.h',
vnum='0',
@@ -683,7 +683,7 @@ bld.SAMBA3_LIBRARY('libsmb/smbclient',
bld.SAMBA3_LIBRARY('smbsharemodes',
source=LIBSMBSHAREMODES_SRC,
- public_deps='''talloc tdb''',
+ public_deps='''talloc tdb_compat''',
deps='''ccan''',
public_headers='include/smb_share_modes.h',
vnum='0',
@@ -722,7 +722,7 @@ bld.SAMBA3_SUBSYSTEM('AVAHI',
bld.SAMBA3_SUBSYSTEM('GROUPDB',
source=GROUPDB_SRC,
- deps='tdb')
+ deps='tdb_compat')
bld.SAMBA3_SUBSYSTEM('TLDAP',
source=TLDAP_SRC,
@@ -885,7 +885,7 @@ bld.SAMBA3_LIBRARY('smbd_conn',
bld.SAMBA3_LIBRARY('smbd_base',
source=SMBD_SRC_BASE,
- deps='''tdb tevent dl krb5 ldap gssapi gssapi_krb5
+ deps='''tdb_compat tevent dl krb5 ldap gssapi gssapi_krb5
samba-util wbclient crypt nsl cups cap z passdb
PARAM_WITHOUT_REG samba3core LIBSMB POPT_SAMBA3 KRBCLIENT AVAHI
LIBMSRPC_GEN msrpc3 ads LIBADS_SERVER LIBADS_PRINTER
@@ -902,7 +902,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
bld.SAMBA3_SUBSYSTEM('LOCKING',
source='${LOCKING_SRC}',
- deps='''tdb talloc''',
+ deps='''tdb_compat talloc''',
vars=locals())
bld.SAMBA3_SUBSYSTEM('PROFILE',
@@ -1116,7 +1116,7 @@ bld.SAMBA3_BINARY('smbd/smbd',
bld.SAMBA3_BINARY('nmbd/nmbd',
source=NMBD_SRC,
- deps='''talloc tdb tevent z cap wbclient dl
+ deps='''talloc tdb_compat tevent z cap wbclient dl
passdb param ldap LIB_NONSMBD LIBSMB
POPT_SAMBA3 KRBCLIENT NDR_SAMR NDR_LSA PROFILE''',
install_path='${SBINDIR}',
@@ -1124,7 +1124,7 @@ bld.SAMBA3_BINARY('nmbd/nmbd',
bld.SAMBA3_BINARY('winbindd/winbindd',
source=WINBINDD_SRC,
- deps='''talloc tdb tevent cap dl z
+ deps='''talloc tdb_compat tevent cap dl z
wbclient passdb ldap param LIB_NONSMBD LIBSMB
POPT_SAMBA3 KRBCLIENT LIBMSRPC_GEN msrpc3 ads LIBADS_SERVER
SRV_NDR_WBINT RPC_NDR_WBINT NDR_WBINT LIBAFS
@@ -1151,7 +1151,7 @@ bld.SAMBA3_BINARY('web/swat',
bld.SAMBA3_BINARY('rpcclient/rpcclient',
source=RPCCLIENT_SRC,
- deps='''talloc tdb cap POPT_SAMBA3 passdb LIBSMB LIB_NONSMBD
+ deps='''talloc tdb_compat cap POPT_SAMBA3 passdb LIBSMB LIB_NONSMBD
PARAM_WITHOUT_REG wbclient param KRBCLIENT LIBMSRPC_GEN msrpc3
ads SMBREADLINE DCUTIL RPC_NDR_WINREG RPC_NDR_ECHO
RPC_CLIENT_SCHANNEL
@@ -1164,7 +1164,7 @@ bld.SAMBA3_BINARY('rpcclient/rpcclient',
bld.SAMBA3_BINARY('client/smbclient' + bld.env.suffix3,
source=CLIENT_SRC,
- deps='''talloc tdb cap POPT_SAMBA3 passdb LIBSMB LIB_NONSMBD
+ deps='''talloc tdb_compat cap POPT_SAMBA3 passdb LIBSMB LIB_NONSMBD
PARAM_WITHOUT_REG wbclient param KRBCLIENT LIBMSRPC_GEN
msrpc3 SMBREADLINE libsmb/smbclient RPC_NDR_SRVSVC INIT_LSA
LIBCLI_SMB_COMMON''',
@@ -1172,7 +1172,7 @@ bld.SAMBA3_BINARY('client/smbclient' + bld.env.suffix3,
bld.SAMBA3_BINARY('net',
source=NET_SRC,
- deps='''talloc tdb netapi addns cap intl POPT_SAMBA3 passdb LIBSMB LIB_NONSMBD
+ deps='''talloc tdb_compat netapi addns cap intl POPT_SAMBA3 passdb LIBSMB LIB_NONSMBD
PARAM_WITHOUT_REG wbclient param KRBCLIENT LIBMSRPC_GEN msrpc3 LIBGPO ads LIBADS_SERVER LIBADS_PRINTER
LIBAFS LIBAFS_SETTOKEN SMBREADLINE PASSWD_UTIL LIBNET
LIBNET_DSSYNC LIBNET_SAMSYNC LIBEVENTLOG DCUTIL
@@ -1186,12 +1186,12 @@ bld.SAMBA3_BINARY('net',
bld.SAMBA3_BINARY('profiles',
source=PROFILES_SRC,
- deps='''talloc tdb cap tevent POPT_SAMBA3 param samba3core LIBSMB_ERR LIB_NONSMBD REGFIO''',
+ deps='''talloc tdb_compat cap tevent POPT_SAMBA3 param samba3core LIBSMB_ERR LIB_NONSMBD REGFIO''',
vars=locals())
bld.SAMBA3_BINARY('smbspool',
source=CUPS_SRC,
- deps='''talloc tdb tevent cap wbclient POPT_SAMBA3 param LIBSMB LIB_NONSMBD samba3core
+ deps='''talloc tdb_compat tevent cap wbclient POPT_SAMBA3 param LIBSMB LIB_NONSMBD samba3core
KRBCLIENT asn1util LIBTSOCKET NDR_SAMR NDR_LSA''',
vars=locals())
@@ -1204,61 +1204,61 @@ bld.SAMBA3_BINARY('testparm',
bld.SAMBA3_BINARY('smbta-util',
source=SMBTA_UTIL_SRC,
- deps='''talloc tdb tevent cap param POPT_SAMBA3 LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap param POPT_SAMBA3 LIB_NONSMBD
LIBSMB_ERR''',
vars=locals())
bld.SAMBA3_BINARY('smbstatus',
source=STATUS_SRC,
- deps='''talloc tdb tevent cap param POPT_SAMBA3 LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap param POPT_SAMBA3 LIB_NONSMBD
LIBSMB_ERR LOCKING PROFILE FNAME_UTIL''',
vars=locals())
bld.SAMBA3_BINARY('smbcontrol',
source=SMBCONTROL_SRC,
- deps='''talloc tdb tevent cap param LIB_NONSMBD LIBSMB_ERR POPT_SAMBA3 PRINTBASE''',
+ deps='''talloc tdb_compat tevent cap param LIB_NONSMBD LIBSMB_ERR POPT_SAMBA3 PRINTBASE''',
vars=locals())
bld.SAMBA3_BINARY('smbtree',
source=SMBTREE_SRC,
- deps='''talloc tdb tevent cap wbclient param LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap wbclient param LIB_NONSMBD
LIBSMB LIBSMB_ERR POPT_SAMBA3 KRBCLIENT passdb SMBLDAP LIBMSRPC_GEN msrpc3 PROFILE
RPC_NDR_SRVSVC''',
vars=locals())
bld.SAMBA3_BINARY('smbpasswd',
source=SMBPASSWD_SRC,
- deps='''talloc tdb tevent cap wbclient param LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap wbclient param LIB_NONSMBD
LIBSMB LIBSMB_ERR POPT_SAMBA3 KRBCLIENT passdb SMBLDAP LIBMSRPC_GEN msrpc3 PASSWD_UTIL
LIBCLI_SAMR INIT_LSA PASSCHANGE''',
vars=locals())
bld.SAMBA3_BINARY('pdbedit',
source=PDBEDIT_SRC,
- deps='''talloc tdb tevent cap wbclient param LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap wbclient param LIB_NONSMBD
LIBNTLMSSP LIBSMB_ERR POPT_SAMBA3 passdb SMBLDAP
PASSWD_UTIL cli-ldap-common''',
vars=locals())
bld.SAMBA3_BINARY('smbget',
source=SMBGET_SRC,
- deps='''talloc tdb libsmb/smbclient POPT_SAMBA3''',
+ deps='''talloc tdb_compat libsmb/smbclient POPT_SAMBA3''',
vars=locals())
bld.SAMBA3_BINARY('nmblookup' + bld.env.suffix3,
source=NMBLOOKUP_SRC,
- deps='''talloc tdb tevent cap param LIB_NONSMBD POPT_SAMBA3 LIBSMB_ERR LIBNMB''',
+ deps='''talloc tdb_compat tevent cap param LIB_NONSMBD POPT_SAMBA3 LIBSMB_ERR LIBNMB''',
vars=locals())
bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
source=SMBTORTURE_SRC,
- deps='''talloc tdb tevent cap wbclient param LIBSMB KRBCLIENT TLDAP
+ deps='''talloc tdb_compat tevent cap wbclient param LIBSMB KRBCLIENT TLDAP
LIB_NONSMBD POPT_SAMBA3 asn1util LIBTSOCKET NDR_LSA msrpc3 LIBMSRPC_GEN RPC_NDR_ECHO WB_REQTRANS''',
vars=locals())
bld.SAMBA3_BINARY('smbconftort',
source=SMBCONFTORT_SRC,
- deps='''talloc tdb tevent cap wbclient param LIB_NONSMBD LIBSMB_ERR POPT_SAMBA3''',
+ deps='''talloc tdb_compat tevent cap wbclient param LIB_NONSMBD LIBSMB_ERR POPT_SAMBA3''',
vars=locals())
bld.SAMBA3_BINARY('replacetort',
@@ -1268,25 +1268,25 @@ bld.SAMBA3_BINARY('replacetort',
bld.SAMBA3_BINARY('masktest' + bld.env.suffix3,
source=MASKTEST_SRC,
- deps='''talloc tdb cap wbclient param LIB_NONSMBD LIBSMB KRBCLIENT
+ deps='''talloc tdb_compat cap wbclient param LIB_NONSMBD LIBSMB KRBCLIENT
asn1util LIBTSOCKET NDR_SAMR NDR_LSA''',
vars=locals())
bld.SAMBA3_BINARY('msgtest',
source=MSGTEST_SRC,
- deps='''talloc tdb tevent cap param LIBSMB_ERR LIB_NONSMBD''',
+ deps='''talloc tdb_compat tevent cap param LIBSMB_ERR LIB_NONSMBD''',
vars=locals())
bld.SAMBA3_BINARY('smbcacls',
source=SMBCACLS_SRC,
- deps='''talloc tdb cap wbclient param LIBSMB KRBCLIENT
+ deps='''talloc tdb_compat cap wbclient param LIBSMB KRBCLIENT
LIB_NONSMBD passdb POPT_SAMBA3 SMBLDAP LIBMSRPC_GEN
msrpc3 LIBCLI_LSA3''',
vars=locals())
bld.SAMBA3_BINARY('smbcquotas',
source=SMBCQUOTAS_SRC,
- deps='''talloc tdb cap wbclient param LIB_NONSMBD LIBSMB KRBCLIENT
+ deps='''talloc tdb_compat cap wbclient param LIB_NONSMBD LIBSMB KRBCLIENT
POPT_SAMBA3 passdb SMBLDAP LIBMSRPC_GEN msrpc3
LIBCLI_LSA3''',
vars=locals())
@@ -1299,18 +1299,18 @@ bld.SAMBA3_BINARY('eventlogadm',
bld.SAMBA3_BINARY('sharesec',
source=SHARESEC_SRC,
- deps='''talloc tdb tevent cap wbclient param LIB_NONSMBD LIBSMB_ERR POPT_SAMBA3''',
+ deps='''talloc tdb_compat tevent cap wbclient param LIB_NONSMBD LIBSMB_ERR POPT_SAMBA3''',
vars=locals())
bld.SAMBA3_BINARY('locktest' + bld.env.suffix3,
source=LOCKTEST_SRC,
- deps='''talloc tdb tevent cap wbclient param KRBCLIENT LIBSMB LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap wbclient param KRBCLIENT LIBSMB LIB_NONSMBD
asn1util LIBTSOCKET NDR_SAMR NDR_LSA LOCKING FNAME_UTIL''',
vars=locals())
bld.SAMBA3_BINARY('pdbtest',
source=PDBTEST_SRC,
- deps='''talloc tdb cap wbclient param LIBSMB KRBCLIENT LIB_NONSMBD passdb
+ deps='''talloc tdb_compat cap wbclient param LIBSMB KRBCLIENT LIB_NONSMBD passdb
SMBLDAP POPT_SAMBA3 NDR_SAMR NDR_LSA''',
vars=locals())
@@ -1321,7 +1321,7 @@ bld.SAMBA3_BINARY('vfstest',
bld.SAMBA3_BINARY('smbiconv',
source=SMBICONV_SRC,
- deps='''talloc tdb tevent cap param LIB_NONSMBD POPT_SAMBA3 LIBSMB_ERR''',
+ deps='''talloc tdb_compat tevent cap param LIB_NONSMBD POPT_SAMBA3 LIBSMB_ERR''',
vars=locals())
bld.SAMBA3_BINARY('log2pcap',
@@ -1331,7 +1331,7 @@ bld.SAMBA3_BINARY('log2pcap',
bld.SAMBA3_BINARY('locktest2',
source=LOCKTEST2_SRC,
- deps='''talloc tdb tevent cap wbclient param KRBCLIENT LIBSMB LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap wbclient param KRBCLIENT LIBSMB LIB_NONSMBD
asn1util LIBTSOCKET NDR_SAMR NDR_LSA LOCKING FNAME_UTIL''',
vars=locals())
@@ -1360,7 +1360,7 @@ bld.SAMBA3_BINARY('wbinfo' + bld.env.suffix3,
bld.SAMBA3_BINARY('ntlm_auth' + bld.env.suffix3,
source=NTLM_AUTH_SRC,
- deps='''tdb talloc cap KRB5_WRAP k5crypto wbclient param LIB_NONSMBD
+ deps='''tdb_compat talloc cap KRB5_WRAP k5crypto wbclient param LIB_NONSMBD
samba3core LIBNTLMSSP POPT_SAMBA3 asn1util LIBTSOCKET
passdb SMBLDAP winbind-client LIBINIPARSER LIBADS_SERVER
NDR_SAMR NDR_LSA NDR_NETLOGON cli-ldap-common LIBNMB SLCACHE SPNEGO_PARSE KRBCLIENT''',
@@ -1372,35 +1372,35 @@ bld.SAMBA3_BINARY('timelimit',
bld.SAMBA3_BINARY('rpc_open_tcp',
source=RPC_OPEN_TCP_SRC,
- deps='''talloc tdb tevent cap wbclient KRBCLIENT param samba3core LIBSMB LIB_NONSMBD
+ deps='''talloc tdb_compat tevent cap wbclient KRBCLIENT param samba3core LIBSMB LIB_NONSMBD
LIBSMB_ERR asn1util LIBTSOCKET LIBMSRPC_GEN msrpc3''',
vars=locals())
bld.SAMBA3_BINARY('test_lp_load',
source=TEST_LP_LOAD_SRC,
- deps='''talloc tdb tevent cap wbclient param LIB_NONSMBD POPT_SAMBA3 LIBNTLMSSP''',
+ deps='''talloc tdb_compat tevent cap wbclient param LIB_NONSMBD POPT_SAMBA3 LIBNTLMSSP''',
vars=locals())
bld.SAMBA3_BINARY('dbwrap_tool',
source=DBWRAP_TOOL_SRC,
- deps='''talloc tdb tevent cap param LIB_NONSMBD LIBSMB_ERR''',
+ deps='''talloc tdb_compat tevent cap param LIB_NONSMBD LIBSMB_ERR''',
vars=locals())
bld.SAMBA3_BINARY('dbwrap_torture',
source=DBWRAP_TORTURE_SRC,
- deps='''talloc tdb tevent cap param LIB_NONSMBD LIBSMB_ERR
+ deps='''talloc tdb_compat tevent cap param LIB_NONSMBD LIBSMB_ERR
POPT_SAMBA3''',
vars=locals())
bld.SAMBA3_BINARY('split_tokens',
source=SPLIT_TOKENS_SRC,
- deps='''talloc tdb tevent cap wbclient param LIB_NONSMBD POPT_SAMBA3
+ deps='''talloc tdb_compat tevent cap wbclient param LIB_NONSMBD POPT_SAMBA3
LIBNTLMSSP''',
vars=locals())
bld.SAMBA3_BINARY('vlp',
source=VLP_SRC,
- deps='''talloc tdb PARAM_UTIL UTIL_TDB samba3core param''',
+ deps='''talloc tdb_compat PARAM_UTIL UTIL_TDB samba3core param''',
vars=locals())
swat_dir = os.path.join(bld.curdir, '../swat')
@@ -1450,7 +1450,7 @@ bld.RECURSE('../lib/smbconf')
bld.RECURSE('../lib/socket_wrapper')
bld.RECURSE('../lib/uid_wrapper')
bld.RECURSE('../lib/talloc')
-bld.RECURSE('../lib/tdb')
+bld.RECURSE('../lib/tdb_compat')
bld.RECURSE('../lib/util')
bld.RECURSE('../lib/tevent')
bld.RECURSE('../lib/tsocket')
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"
diff --git a/wscript_build b/wscript_build
index a6e2cab8fb..ff4f7f323c 100644
--- a/wscript_build
+++ b/wscript_build
@@ -35,7 +35,6 @@ bld.SAMBA_MKVERSION('version.h')
bld.RECURSE('lib/replace')
bld.RECURSE('lib/socket')
bld.RECURSE('lib/talloc')
-bld.RECURSE('lib/tdb')
bld.RECURSE('lib/tevent')
bld.RECURSE('lib/ccan')
bld.RECURSE('lib/tdb_compat')