summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-15 01:52:55 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-15 01:52:55 +0200
commitb62d7aa8eb2da784186b8cd903775dd12c3f34f7 (patch)
treec6066e1a94b488ffb8e5d56ba0888e9675fbcadb
parentd04926914ad0d9ecd7dee3e156198d6baf788598 (diff)
downloadsamba-b62d7aa8eb2da784186b8cd903775dd12c3f34f7.tar.gz
samba-b62d7aa8eb2da784186b8cd903775dd12c3f34f7.tar.bz2
samba-b62d7aa8eb2da784186b8cd903775dd12c3f34f7.zip
Make sure init function sentinels are set for modules.
(This used to be commit fac3463dd505404998b6b00526f1dad6ae47ba84)
-rw-r--r--source4/build/smb_build/header.pm1
-rw-r--r--source4/build/smb_build/input.pm3
2 files changed, 4 insertions, 0 deletions
diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm
index ffac5e2601..dfb7c62e54 100644
--- a/source4/build/smb_build/header.pm
+++ b/source4/build/smb_build/header.pm
@@ -44,6 +44,7 @@ sub _prepare_build_h($)
$DEFINE->{VAL} .= "\t$_, \\\n";
}
+ die("Invalid sentinel") unless ($key->{INIT_FUNCTION_SENTINEL});
$DEFINE->{VAL} .= "\t$key->{INIT_FUNCTION_SENTINEL} \n";
push(@defines,$DEFINE);
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index 9949836675..bb6a120c34 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -84,12 +84,15 @@ sub check_module($$$)
return if ($mod->{ENABLE} ne "YES");
+
if (exists($INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTION_TYPE})) {
$mod->{INIT_FUNCTION_TYPE} = $INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTION_TYPE};
} else {
$mod->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)";
}
+ unless (defined($mod->{INIT_FUNCTION_SENTINEL})) { $mod->{INIT_FUNCTION_SENTINEL} = "NULL"; }
+
if (not defined($mod->{OUTPUT_TYPE})) {
if (not defined($INPUT->{$mod->{SUBSYSTEM}}->{TYPE})) {
die("Invalid type for subsystem $mod->{SUBSYSTEM}");