From c13ae707313c5bf9819a75c1699d099565d2494d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Dec 2007 01:28:22 -0600 Subject: r26580: Include sentinel in build.h, in case the list is empty. (This used to be commit f1997dabed584bdc864c4b7235c29603c312ef46) --- source4/build/smb_build/config_mk.pm | 4 +++- source4/build/smb_build/header.pm | 3 +-- source4/build/smb_build/input.pm | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'source4/build') diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index 4f231c0356..7ad6600a8c 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -44,7 +44,8 @@ my $section_types = { "CFLAGS" => "list", "LDFLAGS" => "list", - "STANDARD_VISIBILITY" => "string" + "STANDARD_VISIBILITY" => "string", + "INIT_FUNCTION_SENTINEL" => "string" }, "MODULE" => { "SUBSYSTEM" => "string", @@ -88,6 +89,7 @@ my $section_types = { "LIBRARY_REALNAME" => "string", "INIT_FUNCTION_TYPE" => "string", + "INIT_FUNCTION_SENTINEL" => "string", "OUTPUT_TYPE" => "list", "OBJ_FILES" => "list", diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm index b0dced4897..b52464922b 100644 --- a/source4/build/smb_build/header.pm +++ b/source4/build/smb_build/header.pm @@ -44,13 +44,12 @@ sub _prepare_build_h($) $DEFINE->{VAL} .= "\t$_, \\\n"; unless (/{/) { my $fn = $key->{INIT_FUNCTION_TYPE}; - unless(defined($fn)) { $fn = "NTSTATUS (*) (void)"; } $fn =~ s/\(\*\)/$_/; $output .= "$fn;\n"; } } - $DEFINE->{VAL} =~ s/, \\\n$//g; # Remove the last comma + $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 ae37a7602b..6d5c4f4a1e 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -63,6 +63,10 @@ sub check_subsystem($$$) unless(defined($subsys->{OUTPUT_TYPE})) { $subsys->{OUTPUT_TYPE} = $default_ot; } + + unless (defined($subsys->{INIT_FUNCTION_TYPE})) { $subsys->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; } + unless (defined($subsys->{INIT_FUNCTION_SENTINEL})) { $subsys->{INIT_FUNCTION_SENTINEL} = "NULL"; } + add_libreplace($subsys); } @@ -136,9 +140,9 @@ sub check_library($$$) return; } - unless (defined($lib->{INIT_FUNCTION_TYPE})) { - $lib->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; - } + unless (defined($lib->{INIT_FUNCTION_TYPE})) { $lib->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; } + + unless (defined($lib->{INIT_FUNCTION_SENTINEL})) { $lib->{INIT_FUNCTION_SENTINEL} = "NULL"; } unless(defined($lib->{INSTALLDIR})) { $lib->{INSTALLDIR} = "LIBDIR"; -- cgit