Skip to content

Commit

Permalink
ntdb: remove --disable-ntdb.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>

Autobuild-User(master): Jeremy Allison <[email protected]>
Autobuild-Date(master): Sat Apr 13 02:01:02 CEST 2013 on sn-devel-104
  • Loading branch information
rustyrussell authored and jrasamba committed Apr 13, 2013
1 parent ed6a4e0 commit 41333f9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
8 changes: 0 additions & 8 deletions lib/dbwrap/dbwrap_local_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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. */
Expand All @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions lib/param/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 1 addition & 9 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 41333f9

Please sign in to comment.