summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 20:40:37 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 20:40:37 +0100
commitb5bd6636907c76f6bb562b62abca78a7aeed83d8 (patch)
tree56f181f238716ba2b530cf3a723f6a28497bf7c6
parenta17f0ab3e0228edcd02b5f180252a54492feb6b8 (diff)
downloadsamba-b5bd6636907c76f6bb562b62abca78a7aeed83d8.tar.gz
samba-b5bd6636907c76f6bb562b62abca78a7aeed83d8.tar.bz2
samba-b5bd6636907c76f6bb562b62abca78a7aeed83d8.zip
Fix use of realpath, fix init functions for ldb.
(This used to be commit ca510136d2c4cae8f520c76df6aaadb5d412bea1)
-rw-r--r--source4/build/smb_build/main.pl4
-rw-r--r--source4/build/smb_build/makefile.pm20
-rw-r--r--source4/build/smb_build/output.pm2
-rw-r--r--source4/dsdb/samdb/ldb_modules/config.mk54
-rw-r--r--source4/lib/ldb/common/ldb_modules.c12
-rw-r--r--source4/lib/ldb/config.mk14
-rw-r--r--source4/lib/ldb/include/ldb_private.h4
-rw-r--r--source4/nbt_server/config.mk2
8 files changed, 58 insertions, 54 deletions
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 47e48c3da7..b23976956c 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -67,8 +67,8 @@ foreach my $key (values %$OUTPUT) {
$mkenv->PythonFiles($key) if defined($key->{PYTHON_FILES});
$mkenv->Manpage($key) if defined($key->{MANPAGE});
$mkenv->Header($key) if defined($key->{PUBLIC_HEADERS});
- if ($key->{TYPE} eq "MODULE" and defined($key->{INIT_FUNCTION})) {
- $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS += \"$key->{INIT_FUNCTION},\"\n");
+ if ($key->{TYPE} eq "MODULE" and $key->{OUTPUT_TYPE} eq "MERGED_OBJ" and defined($key->{INIT_FUNCTION})) {
+ $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS += $key->{INIT_FUNCTION},\n");
}
$mkenv->CFlags($key);
}
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 308c7f2aa6..8a3e99c629 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -207,7 +207,7 @@ sub SharedLibrary($$)
$ctx->{RESULT_SHARED_LIBRARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
\@echo Linking \$\@
- \@mkdir -p \$(D@)
+ \@mkdir -p \$(\@D)
\@\$(SHLD) \$(LDFLAGS) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$($ctx->{NAME}\_FULL_OBJ_LIST) \\
\$($ctx->{NAME}_LINK_FLAGS) \\
@@ -233,7 +233,7 @@ sub MergedObj($$)
#
$ctx->{RESULT_MERGED_OBJ}: \$($ctx->{NAME}_OBJ_LIST)
\@echo Partially linking \$@
- \@mkdir -p \$(D@)
+ \@mkdir -p \$(\@D)
\$(PARTLINK) -o \$@ \$^
__EOD__
@@ -253,7 +253,7 @@ sub StaticLibraryPrimitives($$)
sub InitFunctions($$)
{
my ($self, $ctx) = @_;
- $self->output("\$($ctx->{NAME}_OBJ_LIST): CFLAGS+=-DSTATIC_$ctx->{NAME}_MODULES=\"\\\"\$($ctx->{NAME}_INIT_FUNCTIONS)$ctx->{INIT_FUNCTION_SENTINEL}\\\"\"\n");
+ $self->output("\$($ctx->{NAME}_OBJ_LIST): CFLAGS+=-DSTATIC_$ctx->{NAME}_MODULES=\"\$($ctx->{NAME}_INIT_FUNCTIONS)$ctx->{INIT_FUNCTION_SENTINEL}\"\n");
}
sub StaticLibrary($$)
@@ -273,7 +273,7 @@ sub Header($$)
return if ($#{$ctx->{PUBLIC_HEADERS}} == -1);
- $self->output("PUBLIC_HEADERS += \$(realpath \$(addprefix $ctx->{BASEDIR}/, " . join(" ", @{$ctx->{PUBLIC_HEADERS}}) . "))\n");
+ $self->output("PUBLIC_HEADERS += \$(addprefix $ctx->{BASEDIR}/, " . join(" ", @{$ctx->{PUBLIC_HEADERS}}) . ")\n");
}
sub Binary($$)
@@ -321,7 +321,7 @@ sub PythonFiles($$)
foreach (@{$ctx->{PYTHON_FILES}}) {
my $target = "bin/python/".basename($_);
- $self->output("$target: \$(realpath \$(addprefix $ctx->{BASEDIR}/, $_))\n\n");
+ $self->output("$target: \$(addprefix $ctx->{BASEDIR}/, $_)\n\n");
$self->output("PYTHON_PYS += $target\n");
}
}
@@ -330,7 +330,7 @@ sub Manpage($$)
{
my ($self,$ctx) = @_;
- $self->output("MANPAGES += \$(realpath \$(addprefix $ctx->{BASEDIR}/, $ctx->{MANPAGE}))\n");
+ $self->output("MANPAGES += \$(addprefix $ctx->{BASEDIR}/, $ctx->{MANPAGE})\n");
}
sub ProtoHeader($$)
@@ -343,7 +343,7 @@ sub ProtoHeader($$)
my $pub = undef;
if (defined($ctx->{PRIVATE_PROTO_HEADER})) {
- $priv = "\$(realpath \$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER}))";
+ $priv = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})";
$target .= $priv;
if (defined($ctx->{PUBLIC_PROTO_HEADER})) {
$target.= " ";
@@ -351,16 +351,16 @@ sub ProtoHeader($$)
$self->output("PROTO_HEADERS += $priv\n");
} else {
$ctx->{PRIVATE_PROTO_HEADER} = $ctx->{PUBLIC_PROTO_HEADER};
- $priv = "\$(realpath \$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER}))";
+ $priv = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})";
}
if (defined($ctx->{PUBLIC_PROTO_HEADER})) {
- $pub = "\$(realpath \$(addprefix $ctx->{BASEDIR}/, $ctx->{PUBLIC_PROTO_HEADER}))";
+ $pub = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PUBLIC_PROTO_HEADER})";
$target .= $pub;
$self->output("PROTO_HEADERS += $pub\n");
} else {
$ctx->{PUBLIC_PROTO_HEADER} = $ctx->{PRIVATE_PROTO_HEADER};
- $pub = "\$(realpath \$(addprefix $ctx->{BASEDIR}/, $ctx->{PUBLIC_PROTO_HEADER}))";
+ $pub = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PUBLIC_PROTO_HEADER})";
}
$self->output("$pub: $ctx->{MK_FILE} \$($ctx->{NAME}_OBJ_LIST:.o=.c) \$(srcdir)/script/mkproto.pl\n");
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 9c2e2b8730..6e8803fa23 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -137,7 +137,7 @@ sub create_output($$)
# Combine object lists
if (defined($part->{OBJ_FILES})) {
- my $list = "\$(realpath \$(addprefix $part->{BASEDIR}/, " . join(" ", @{$part->{OBJ_FILES}}) . "))";
+ my $list = "\$(abspath \$(addprefix $part->{BASEDIR}/, " . join(" ", @{$part->{OBJ_FILES}}) . "))";
push(@{$part->{OBJ_LIST}}, $list);
}
diff --git a/source4/dsdb/samdb/ldb_modules/config.mk b/source4/dsdb/samdb/ldb_modules/config.mk
index de93b5638d..62fbe75c80 100644
--- a/source4/dsdb/samdb/ldb_modules/config.mk
+++ b/source4/dsdb/samdb/ldb_modules/config.mk
@@ -4,7 +4,7 @@
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
-INIT_FUNCTION = objectguid_module_module_ops
+INIT_FUNCTION = LDB_MODULE(objectguid)
OBJ_FILES = \
objectguid.o
# End MODULE ldb_objectguid
@@ -17,7 +17,7 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC LIBNDR NDR_MISC NDR_DRSUAPI \
NDR_DRSBLOBS LIBNDR
-INIT_FUNCTION = repl_meta_data_module_module_ops
+INIT_FUNCTION = LDB_MODULE(repl_meta_data)
OBJ_FILES = \
repl_meta_data.o
# End MODULE ldb_repl_meta_data
@@ -29,7 +29,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = dsdb_cache_module_module_ops
+INIT_FUNCTION = LDB_MODULE(dsdb_cache)
OBJ_FILES = \
dsdb_cache.o
# End MODULE ldb_dsdb_cache
@@ -41,7 +41,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = schema_fsmo_module_module_ops
+INIT_FUNCTION = LDB_MODULE(schema_fsmo)
OBJ_FILES = \
schema_fsmo.o
# End MODULE ldb_schema_fsmo
@@ -53,7 +53,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = naming_fsmo_module_module_ops
+INIT_FUNCTION = LDB_MODULE(naming_fsmo)
OBJ_FILES = \
naming_fsmo.o
# End MODULE ldb_naming_fsmo
@@ -65,7 +65,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = pdc_fsmo_module_module_ops
+INIT_FUNCTION = LDB_MODULE(pdc_fsmo)
OBJ_FILES = \
pdc_fsmo.o
# End MODULE ldb_pdc_fsmo
@@ -77,7 +77,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LDAP_ENCODE NDR_MISC SAMDB
-INIT_FUNCTION = samldb_module_module_ops
+INIT_FUNCTION = LDB_MODULE(samldb)
OBJ_FILES = \
samldb.o
#
@@ -89,7 +89,7 @@ OBJ_FILES = \
[MODULE::ldb_samba3sam]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = &ldb_samba3sam_module_module_ops
+INIT_FUNCTION = LDB_MODULE(samba3sam)
PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER LIBSECURITY \
NDR_SECURITY
OBJ_FILES = \
@@ -103,7 +103,7 @@ OBJ_FILES = \
[MODULE::ldb_simple_ldap_map]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = &ldb_simple_ldap_map_module_module_ops
+INIT_FUNCTION = LDB_MODULE(simple_ldap_map)
PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map LIBNDR NDR_MISC
ENABLE = YES
ALIASES = entryuuid nsuniqueid
@@ -117,7 +117,7 @@ OBJ_FILES = \
# # Start MODULE ldb_proxy
# [MODULE::ldb_proxy]
# SUBSYSTEM = LIBLDB
-# INIT_FUNCTION = proxy_module_module_ops
+# INIT_FUNCTION = LDB_MODULE(proxy)
# OBJ_FILES = \
# proxy.o
#
@@ -131,7 +131,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = rootdse_module_module_ops
+INIT_FUNCTION = LDB_MODULE(rootdse)
OBJ_FILES = \
rootdse.o
#
@@ -143,7 +143,7 @@ OBJ_FILES = \
[MODULE::ldb_password_hash]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = password_hash_module_module_ops
+INIT_FUNCTION = LDB_MODULE(password_hash)
OBJ_FILES = password_hash.o
PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
LIBCLI_AUTH NDR_DRSBLOBS KERBEROS SAMDB
@@ -157,7 +157,7 @@ PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = local_password_module_module_ops
+INIT_FUNCTION = LDB_MODULE(local_password)
OBJ_FILES = local_password.o
#
# End MODULE ldb_local_password
@@ -169,7 +169,7 @@ OBJ_FILES = local_password.o
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = &ldb_kludge_acl_module_ops
+INIT_FUNCTION = LDB_MODULE(kludge_acl)
OBJ_FILES = \
kludge_acl.o
#
@@ -182,7 +182,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR LIBSECURITY SAMDB
-INIT_FUNCTION = &ldb_extended_dn_module_ops
+INIT_FUNCTION = LDB_MODULE(extended_dn)
OBJ_FILES = \
extended_dn.o
#
@@ -195,7 +195,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_show_deleted_module_ops
+INIT_FUNCTION = LDB_MODULE(show_deleted)
OBJ_FILES = \
show_deleted.o
#
@@ -208,7 +208,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
-INIT_FUNCTION = &ldb_partition_module_ops
+INIT_FUNCTION = LDB_MODULE(partition)
OBJ_FILES = \
partition.o
#
@@ -221,7 +221,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBLDB
-INIT_FUNCTION = &ldb_schema_module_ops
+INIT_FUNCTION = LDB_MODULE(schema)
OBJ_FILES = \
schema.o schema_syntax.o
#
@@ -235,7 +235,7 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC CREDENTIALS
#Also depends on credentials, but that would loop
-INIT_FUNCTION = &ldb_update_kt_module_ops
+INIT_FUNCTION = LDB_MODULE(update_kt)
OBJ_FILES = \
update_keytab.o
#
@@ -245,7 +245,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_objectclass
[MODULE::ldb_objectclass]
-INIT_FUNCTION = &ldb_objectclass_module_ops
+INIT_FUNCTION = LDB_MODULE(objectclass)
OUTPUT_TYPE = SHARED_LIBRARY
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY NDR_SECURITY SAMDB
@@ -258,7 +258,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_rename]
-INIT_FUNCTION = &ldb_subtree_rename_module_ops
+INIT_FUNCTION = LDB_MODULE(subtree_rename)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -270,7 +270,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_delete]
-INIT_FUNCTION = &ldb_subtree_delete_module_ops
+INIT_FUNCTION = LDB_MODULE(subtree_delete)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -282,7 +282,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_linked_attributes
[MODULE::ldb_linked_attributes]
-INIT_FUNCTION = &ldb_linked_attributes_module_ops
+INIT_FUNCTION = LDB_MODULE(linked_attributes)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
@@ -295,7 +295,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_ranged_results
[MODULE::ldb_ranged_results]
-INIT_FUNCTION = &ldb_ranged_results_module_ops
+INIT_FUNCTION = LDB_MODULE(ranged_results)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -307,7 +307,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_anr
[MODULE::ldb_anr]
-INIT_FUNCTION = &ldb_anr_module_ops
+INIT_FUNCTION = LDB_MODULE(anr)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -320,7 +320,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_normalise
[MODULE::ldb_normalise]
-INIT_FUNCTION = &ldb_normalise_module_ops
+INIT_FUNCTION = LDB_MODULE(normalise)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -333,7 +333,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_instancetype
[MODULE::ldb_instancetype]
-INIT_FUNCTION = &ldb_instancetype_module_ops
+INIT_FUNCTION = LDB_MODULE(instancetype)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index af837d2965..ddbe0f23a6 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -125,14 +125,16 @@ static struct ops_list_entry {
struct ops_list_entry *next;
} *registered_modules = NULL;
+#define LDB_MODULE(name) (&ldb_ ## name ## _module_ops)
+
#ifndef STATIC_LIBLDB_MODULES
#define STATIC_LIBLDB_MODULES \
- &ldb_operational_module_ops, \
- &ldb_rdn_name_module_ops, \
- &ldb_paged_results_module_ops, \
- &ldb_sort_module_ops, \
- &ldb_asq_module_ops, \
+ LDB_MODULE(operational), \
+ LDB_MODULE(rdn_name), \
+ LDB_MODULE(paged_results), \
+ LDB_MODULE(server_sort), \
+ LDB_MODULE(asq), \
NULL
#endif
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
index d6980f341a..7d6328fc52 100644
--- a/source4/lib/ldb/config.mk
+++ b/source4/lib/ldb/config.mk
@@ -3,7 +3,7 @@
[MODULE::ldb_asq]
PRIVATE_DEPENDENCIES = LIBTALLOC
CFLAGS = -Ilib/ldb/include
-INIT_FUNCTION = &ldb_asq_module_ops
+INIT_FUNCTION = LDB_MODULE(asq)
SUBSYSTEM = LIBLDB
OBJ_FILES = \
modules/asq.o
@@ -15,7 +15,7 @@ OBJ_FILES = \
[MODULE::ldb_server_sort]
PRIVATE_DEPENDENCIES = LIBTALLOC
CFLAGS = -Ilib/ldb/include
-INIT_FUNCTION = &ldb_server_sort_module_ops
+INIT_FUNCTION = LDB_MODULE(server_sort)
SUBSYSTEM = LIBLDB
OBJ_FILES = \
modules/sort.o
@@ -25,7 +25,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_paged_results
[MODULE::ldb_paged_results]
-INIT_FUNCTION = &ldb_paged_results_module_ops
+INIT_FUNCTION = LDB_MODULE(paged_results)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -37,7 +37,7 @@ OBJ_FILES = \
################################################
# Start MODULE ldb_paged_results
[MODULE::ldb_paged_searches]
-INIT_FUNCTION = &ldb_paged_searches_module_ops
+INIT_FUNCTION = LDB_MODULE(paged_searches)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -52,7 +52,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_operational_module_ops
+INIT_FUNCTION = LDB_MODULE(operational)
OBJ_FILES = \
modules/operational.o
# End MODULE ldb_operational
@@ -64,7 +64,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_rdn_name_module_ops
+INIT_FUNCTION = LDB_MODULE(rdn_name)
OBJ_FILES = \
modules/rdn_name.o
# End MODULE ldb_rdn_name
@@ -88,7 +88,7 @@ OBJ_FILES = \
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_skel_module_ops
+INIT_FUNCTION = LDB_MODULE(skel)
OBJ_FILES = modules/skel.o
# End MODULE ldb_skel
################################################
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index d2dcc675a5..65bdc713db 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -185,11 +185,13 @@ extern const struct ldb_module_ops ldb_paged_results_module_ops;
extern const struct ldb_module_ops ldb_rdn_name_module_ops;
extern const struct ldb_module_ops ldb_schema_module_ops;
extern const struct ldb_module_ops ldb_asq_module_ops;
-extern const struct ldb_module_ops ldb_sort_module_ops;
+extern const struct ldb_module_ops ldb_server_sort_module_ops;
extern const struct ldb_module_ops ldb_ldap_module_ops;
extern const struct ldb_module_ops ldb_ildap_module_ops;
extern const struct ldb_module_ops ldb_tdb_module_ops;
extern const struct ldb_module_ops ldb_sqlite3_module_ops;
+extern const struct ldb_module_ops ldb_wins_ldb_module_ops;
+extern const struct ldb_module_ops ldb_ranged_results_module_ops;
extern const struct ldb_backend_ops ldb_tdb_backend_ops;
extern const struct ldb_backend_ops ldb_sqlite3_backend_ops;
diff --git a/source4/nbt_server/config.mk b/source4/nbt_server/config.mk
index 9285044768..3036dad0b7 100644
--- a/source4/nbt_server/config.mk
+++ b/source4/nbt_server/config.mk
@@ -17,7 +17,7 @@ PUBLIC_DEPENDENCIES = \
[MODULE::ldb_wins_ldb]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = &ldb_wins_ldb_module_ops
+INIT_FUNCTION = LDB_MODULE(wins_ldb)
OBJ_FILES = \
wins/wins_ldb.o
PRIVATE_DEPENDENCIES = \