[PATCH 9/9] ntdb: remove --disable-ntdb.

Rusty Russell rusty at rustcorp.com.au
Thu Apr 11 01:42:16 MDT 2013


Remove DISABLE_NTDB option, and --disable-ntdb from waf build.  This just
means that it will always get built: it isn't used by default yet.

Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
 lib/dbwrap/dbwrap_local_open.c |    8 --------
 lib/param/util.c               |    2 --
 wscript                        |   10 +---------
 3 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/lib/dbwrap/dbwrap_local_open.c b/lib/dbwrap/dbwrap_local_open.c
index c2eb7b7..56048af 100644
--- a/lib/dbwrap/dbwrap_local_open.c
+++ b/lib/dbwrap/dbwrap_local_open.c
@@ -23,14 +23,11 @@
 #include "dbwrap/dbwrap_tdb.h"
 #include "dbwrap/dbwrap_ntdb.h"
 #include "tdb.h"
-#ifndef DISABLE_NTDB
 #include "lib/util/util_ntdb.h"
-#endif
 #include "lib/param/param.h"
 #include "system/filesys.h"
 #include "ccan/str/str.h"
 
-#ifndef DISABLE_NTDB
 struct flag_map {
 	int tdb_flag;
 	int ntdb_flag;
@@ -157,7 +154,6 @@ static bool tdb_to_ntdb(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx,
 		  ntdbname, tdbbase, bakbase));
 	return true;
 }
-#endif /* !DISABLE_NTDB */
 
 struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
 				     struct loadparm_context *lp_ctx,
@@ -196,9 +192,6 @@ struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
 	}
 
 	if (name == ntdbname) {
-#ifdef DISABLE_NTDB
-		DEBUG(1, ("WARNING: no ntdb support to open '%s'\n", name));
-#else
 		int ntdb_flags = tdb_flags_to_ntdb_flags(tdb_flags);
 
 		/* For non-internal databases, we upgrade on demand. */
@@ -212,7 +205,6 @@ struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
 		}
 		db = db_open_ntdb(mem_ctx, lp_ctx, ntdbname, hash_size,
 				  ntdb_flags, open_flags, mode, lock_order);
-#endif
 	} else {
 		if (!streq(ntdbname, tdbname) && file_exist(ntdbname)) {
 			DEBUG(0, ("Refusing to open '%s' when '%s' exists\n",
diff --git a/lib/param/util.c b/lib/param/util.c
index 29266c4..8c3badf 100644
--- a/lib/param/util.c
+++ b/lib/param/util.c
@@ -206,11 +206,9 @@ char *lpcfg_private_db_path(TALLOC_CTX *mem_ctx,
 {
 	const char *extension = ".tdb";
 
-#ifndef DISABLE_NTDB
 	if (lpcfg_use_ntdb(lp_ctx)) {
 		extension = ".ntdb";
 	}
-#endif
 
 	return talloc_asprintf(mem_ctx, "%s/%s%s",
 			       lpcfg_private_dir(lp_ctx), name, extension);
diff --git a/wscript b/wscript
index 1ef55ab..121c31b 100644
--- a/wscript
+++ b/wscript
@@ -58,10 +58,6 @@ def set_options(opt):
 
     gr = opt.option_group('developer options')
 
-    opt.add_option('--disable-ntdb',
-                   help=("disable ntdb"),
-                   action="store_true", dest='disable_ntdb', default=False)
-
 
     opt.tool_options('python') # options for disabling pyc or pyo compilation
     # enable options related to building python extensions
@@ -120,11 +116,7 @@ def configure(conf):
     conf.RECURSE('source4/ntvfs/sysdep')
     conf.RECURSE('lib/util')
     conf.RECURSE('lib/ccan')
-    conf.env.disable_ntdb = getattr(Options.options, 'disable_ntdb', False)
-    if not Options.options.disable_ntdb:
-        conf.RECURSE('lib/ntdb')
-    else:
-        conf.DEFINE('DISABLE_NTDB', 1)
+    conf.RECURSE('lib/ntdb')
     conf.RECURSE('lib/zlib')
     conf.RECURSE('lib/util/charset')
     conf.RECURSE('source4/auth')
-- 
1.7.10.4



More information about the samba-technical mailing list