diff options
Diffstat (limited to 'source4/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"; } |