diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-02 16:32:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:11 -0500 |
commit | 26af14c39b88b0e7eb53657b89be65d865804688 (patch) | |
tree | ac73da63e8b053514ff8ecf465027d02227feea1 /source4/build/smb_build | |
parent | 0efc7293181dc06d79c0edc21677f900597fc760 (diff) | |
download | samba-26af14c39b88b0e7eb53657b89be65d865804688.tar.gz samba-26af14c39b88b0e7eb53657b89be65d865804688.tar.bz2 samba-26af14c39b88b0e7eb53657b89be65d865804688.zip |
r13786: [merge] Add registration functions for LDB modules
Applications that use LDB modules will now have to run ldb_global_init()
before they can use LDB.
The next step will be adding support for loading LDB modules from .so
files. This will also allow us to use one LDB without difference between the
standalone and the Samba-specific build
(This used to be commit 52a235650514039bf8ffee99a784bbc1b6ae6b92)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r-- | source4/build/smb_build/config_mk.pm | 2 | ||||
-rw-r--r-- | source4/build/smb_build/header.pm | 7 | ||||
-rw-r--r-- | source4/build/smb_build/input.pm | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index 1475ee09ee..c7ff8648eb 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -67,6 +67,8 @@ my $section_types = { "MAJOR_VERSION" => "string", "MINOR_VERSION" => "string", "RELEASE_VERSION" => "string", + + "INIT_FUNCTION_TYPE" => "string", "OBJ_FILES" => "list", diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm index 456c29368a..1cc5361b65 100644 --- a/source4/build/smb_build/header.pm +++ b/source4/build/smb_build/header.pm @@ -30,13 +30,16 @@ sub _prepare_build_h($) my $DEFINE = (); next if ($key->{TYPE} ne "LIBRARY" and $key->{TYPE} ne "SUBSYSTEM"); next unless defined($key->{INIT_FUNCTIONS}); - + $DEFINE->{COMMENT} = "$key->{TYPE} $key->{NAME} INIT"; $DEFINE->{KEY} = "STATIC_$key->{NAME}_MODULES"; $DEFINE->{VAL} = "{ \\\n"; foreach (@{$key->{INIT_FUNCTIONS}}) { $DEFINE->{VAL} .= "\t$_, \\\n"; - $output .= "NTSTATUS $_(void);\n"; + my $fn = $key->{INIT_FUNCTION_TYPE}; + unless(defined($fn)) { $fn = "NTSTATUS (*) (void)"; } + $fn =~ s/\(\*\)/$_/; + $output .= "$fn;\n"; } $DEFINE->{VAL} .= "\tNULL \\\n }"; diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index c34930f39a..fbeeddcda1 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -97,6 +97,10 @@ sub check_library($$$) return; } + unless (defined($lib->{INIT_FUNCTION_TYPE})) { + $lib->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; + } + $lib->{INSTALLDIR} = "LIBDIR"; } |