svn commit: samba r26580 - in branches/SAMBA_4_0: . source/auth
source/auth/gensec source/build/smb_build source/lib/events
source/lib/ldb/common source/ntptr source/ntvfs
source/ntvfs/sysdep source/param source/rpc_server
source/scripting/ejs source/scripting/python source/smbd
source/torture
jelmer at samba.org
jelmer at samba.org
Mon Dec 24 01:28:29 GMT 2007
Author: jelmer
Date: 2007-12-24 01:28:22 +0000 (Mon, 24 Dec 2007)
New Revision: 26580
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26580
Log:
Include sentinel in build.h, in case the list is empty.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/auth/auth.c
branches/SAMBA_4_0/source/auth/gensec/gensec.c
branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
branches/SAMBA_4_0/source/build/smb_build/header.pm
branches/SAMBA_4_0/source/build/smb_build/input.pm
branches/SAMBA_4_0/source/lib/events/events.c
branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
branches/SAMBA_4_0/source/ntptr/ntptr_base.c
branches/SAMBA_4_0/source/ntvfs/ntvfs_base.c
branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c
branches/SAMBA_4_0/source/param/share.c
branches/SAMBA_4_0/source/rpc_server/service_rpc.c
branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
branches/SAMBA_4_0/source/scripting/python/config.mk
branches/SAMBA_4_0/source/smbd/process_model.c
branches/SAMBA_4_0/source/smbd/server.c
branches/SAMBA_4_0/source/torture/torture.c
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/SAMBA_4_0/source/auth/auth.c
===================================================================
--- branches/SAMBA_4_0/source/auth/auth.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/auth/auth.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -516,7 +516,7 @@
{
static bool initialized = false;
- init_module_fn static_init[] = { STATIC_auth_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_auth_MODULES };
if (initialized) return NT_STATUS_OK;
initialized = true;
Modified: branches/SAMBA_4_0/source/auth/gensec/gensec.c
===================================================================
--- branches/SAMBA_4_0/source/auth/gensec/gensec.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/auth/gensec/gensec.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -1268,7 +1268,7 @@
{
static bool initialized = false;
- init_module_fn static_init[] = { STATIC_gensec_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_gensec_MODULES };
init_module_fn *shared_init;
if (initialized) return NT_STATUS_OK;
Modified: branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/config_mk.pm 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/build/smb_build/config_mk.pm 2007-12-24 01:28:22 UTC (rev 26580)
@@ -44,7 +44,8 @@
"CFLAGS" => "list",
"LDFLAGS" => "list",
- "STANDARD_VISIBILITY" => "string"
+ "STANDARD_VISIBILITY" => "string",
+ "INIT_FUNCTION_SENTINEL" => "string"
},
"MODULE" => {
"SUBSYSTEM" => "string",
@@ -88,6 +89,7 @@
"LIBRARY_REALNAME" => "string",
"INIT_FUNCTION_TYPE" => "string",
+ "INIT_FUNCTION_SENTINEL" => "string",
"OUTPUT_TYPE" => "list",
"OBJ_FILES" => "list",
Modified: branches/SAMBA_4_0/source/build/smb_build/header.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/header.pm 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/build/smb_build/header.pm 2007-12-24 01:28:22 UTC (rev 26580)
@@ -44,13 +44,12 @@
$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);
}
Modified: branches/SAMBA_4_0/source/build/smb_build/input.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/input.pm 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/build/smb_build/input.pm 2007-12-24 01:28:22 UTC (rev 26580)
@@ -63,6 +63,10 @@
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,10 +140,10 @@
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";
}
Modified: branches/SAMBA_4_0/source/lib/events/events.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/lib/events/events.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -102,7 +102,7 @@
static void event_backend_init(void)
{
#if _SAMBA_BUILD_
- init_module_fn static_init[] = { STATIC_LIBEVENTS_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_LIBEVENTS_MODULES };
init_module_fn *shared_init;
if (event_backends) return;
shared_init = load_samba_modules(NULL, global_loadparm, "events");
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -160,12 +160,13 @@
ldb_rdn_name_init, \
ldb_paged_results_init, \
ldb_sort_init, \
- ldb_asq_init
+ ldb_asq_init, \
+ NULL
#endif
int ldb_global_init(void)
{
- int (*static_init_fns[])(void) = { STATIC_LIBLDB_MODULES, NULL };
+ int (*static_init_fns[])(void) = { STATIC_LIBLDB_MODULES };
static int initialized = 0;
int ret = 0, i;
Modified: branches/SAMBA_4_0/source/ntptr/ntptr_base.c
===================================================================
--- branches/SAMBA_4_0/source/ntptr/ntptr_base.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/ntptr/ntptr_base.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -71,7 +71,7 @@
NTSTATUS ntptr_init(struct loadparm_context *lp_ctx)
{
- init_module_fn static_init[] = { STATIC_ntptr_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_ntptr_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntptr");
run_init_functions(static_init);
Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs_base.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ntvfs_base.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/ntvfs/ntvfs_base.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -202,7 +202,7 @@
NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
- init_module_fn static_init[] = { STATIC_ntvfs_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_ntvfs_MODULES };
init_module_fn *shared_init;
if (initialized) return NT_STATUS_OK;
Modified: branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -125,7 +125,7 @@
{
static bool initialized = false;
- init_module_fn static_init[] = { STATIC_sys_notify_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_sys_notify_MODULES };
init_module_fn *shared_init;
if (initialized) return NT_STATUS_OK;
Modified: branches/SAMBA_4_0/source/param/share.c
===================================================================
--- branches/SAMBA_4_0/source/param/share.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/param/share.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -146,7 +146,7 @@
*/
NTSTATUS share_init(void)
{
- init_module_fn static_init[] = { STATIC_share_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_share_MODULES };
run_init_functions(static_init);
Modified: branches/SAMBA_4_0/source/rpc_server/service_rpc.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/service_rpc.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/rpc_server/service_rpc.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -467,7 +467,7 @@
NTSTATUS server_service_rpc_init(void)
{
- init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, global_loadparm, "dcerpc_server");
run_init_functions(static_init);
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -173,7 +173,7 @@
*/
void smb_setup_ejs_functions(void (*exception_handler)(const char *))
{
- init_module_fn static_init[] = { STATIC_smbcalls_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_smbcalls_MODULES };
init_module_fn *shared_init;
ejs_exception_handler = exception_handler;
Modified: branches/SAMBA_4_0/source/scripting/python/config.mk
===================================================================
--- branches/SAMBA_4_0/source/scripting/python/config.mk 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/scripting/python/config.mk 2007-12-24 01:28:22 UTC (rev 26580)
@@ -4,6 +4,7 @@
[SUBSYSTEM::LIBPYTHON]
PUBLIC_DEPENDENCIES = EXT_LIB_PYTHON
+INIT_FUNCTION_SENTINEL = { NULL, NULL }
OBJ_FILES = modules.o
[PYTHON::python_uuid]
Modified: branches/SAMBA_4_0/source/smbd/process_model.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/process_model.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/smbd/process_model.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -82,7 +82,7 @@
NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
{
- init_module_fn static_init[] = { STATIC_process_model_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_process_model_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
run_init_functions(static_init);
Modified: branches/SAMBA_4_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/server.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/smbd/server.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -187,7 +187,7 @@
bool opt_interactive = false;
int opt;
poptContext pc;
- init_module_fn static_init[] = { STATIC_service_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_service_MODULES };
init_module_fn *shared_init;
struct event_context *event_ctx;
NTSTATUS status;
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c 2007-12-24 00:35:40 UTC (rev 26579)
+++ branches/SAMBA_4_0/source/torture/torture.c 2007-12-24 01:28:22 UTC (rev 26580)
@@ -64,7 +64,7 @@
int torture_init(void)
{
- init_module_fn static_init[] = { STATIC_torture_MODULES, NULL };
+ init_module_fn static_init[] = { STATIC_torture_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "torture");
run_init_functions(static_init);
More information about the samba-cvs
mailing list