ntdb: remove --disable-ntdb.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 11 Apr 2013 07:42:16 +0000 (17:12 +0930)
committerJeremy Allison <jra@samba.org>
Sat, 13 Apr 2013 00:01:02 +0000 (02:01 +0200)
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@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 13 02:01:02 CEST 2013 on sn-devel-104

lib/dbwrap/dbwrap_local_open.c
lib/param/util.c
wscript

index c2eb7b73eeb0c1d1d63be5bc87455ba4deb1f13d..56048afa849ff5c24a18f42319d4dea1303be5e8 100644 (file)
 #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",
index 29266c493d041c8b88f3926784b2d5bce535907a..8c3badfcb96ee0a8b3e59ed825500c248962998f 100644 (file)
@@ -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 4944a72bc33358518d9f3e54f91e4f91c1d93a03..dad54d1c6cba2878d14091c33863f01808a00dd0 100644 (file)
--- 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')