From b62d7aa8eb2da784186b8cd903775dd12c3f34f7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 15 Apr 2008 01:52:55 +0200 Subject: Make sure init function sentinels are set for modules. (This used to be commit fac3463dd505404998b6b00526f1dad6ae47ba84) --- source4/build/smb_build/header.pm | 1 + source4/build/smb_build/input.pm | 3 +++ 2 files changed, 4 insertions(+) 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}"); -- cgit