summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-01 15:38:37 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-01 18:55:19 +1100
commit28c1e4d3eb3162c0177085bae753102994a35846 (patch)
tree60f1b1ee601024af24723fa0170b8e5994b6e754
parent4404b4c700270c7607d7b8d792ab23ce1d080463 (diff)
downloadsamba-28c1e4d3eb3162c0177085bae753102994a35846.tar.gz
samba-28c1e4d3eb3162c0177085bae753102994a35846.tar.bz2
samba-28c1e4d3eb3162c0177085bae753102994a35846.zip
s4-modules: get rid of the remaining static prototypes for modules
the waf build now generates the prototype declarations for us
-rw-r--r--source4/auth/gensec/gensec.c13
-rw-r--r--source4/auth/ntlm/auth.c9
-rw-r--r--source4/ntptr/ntptr_base.c3
-rw-r--r--source4/ntvfs/ntvfs_base.c11
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c4
-rw-r--r--source4/ntvfs/sysdep/sys_lease.c8
-rw-r--r--source4/ntvfs/sysdep/sys_notify.c4
-rw-r--r--source4/param/share.c4
-rw-r--r--source4/rpc_server/dcerpc_server.c16
-rw-r--r--source4/smbd/server.c19
-rw-r--r--source4/torture/torture.c19
11 files changed, 22 insertions, 88 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 606e4f15bd..0cb0d3d476 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -1394,23 +1394,14 @@ bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism
return lpcfg_parm_bool(settings->lp_ctx, NULL, mechanism, name, default_value);
}
-#ifndef STATIC_gensec_MODULES
-#define STATIC_gensec_MODULES NULL
-#endif
-
/*
initialise the GENSEC subsystem
*/
_PUBLIC_ NTSTATUS gensec_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
- extern NTSTATUS gensec_sasl_init(void);
- extern NTSTATUS gensec_krb5_init(void);
- extern NTSTATUS gensec_schannel_init(void);
- extern NTSTATUS gensec_spnego_init(void);
- extern NTSTATUS gensec_gssapi_init(void);
- extern NTSTATUS gensec_ntlmssp_init(void);
-
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_gensec_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_gensec_MODULES };
init_module_fn *shared_init;
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index 46fd8877d2..f7de0201b6 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -632,13 +632,8 @@ const struct auth_critical_sizes *auth_interface_version(void)
_PUBLIC_ NTSTATUS auth_init(void)
{
static bool initialized = false;
- extern NTSTATUS auth_developer_init(void);
- extern NTSTATUS auth_winbind_init(void);
- extern NTSTATUS auth_anonymous_init(void);
- extern NTSTATUS auth_unix_init(void);
- extern NTSTATUS auth_sam_init(void);
- extern NTSTATUS auth_server_init(void);
-
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_auth_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_auth_MODULES };
if (initialized) return NT_STATUS_OK;
diff --git a/source4/ntptr/ntptr_base.c b/source4/ntptr/ntptr_base.c
index 287a4b6777..268e84b127 100644
--- a/source4/ntptr/ntptr_base.c
+++ b/source4/ntptr/ntptr_base.c
@@ -70,7 +70,8 @@ NTSTATUS ntptr_register(const void *_ops)
NTSTATUS ntptr_init(struct loadparm_context *lp_ctx)
{
- extern NTSTATUS ntptr_simple_ldb_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_ntptr_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_ntptr_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntptr");
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index b581588d9d..d8d73e95fe 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -203,15 +203,8 @@ NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, e
NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
- extern NTSTATUS ntvfs_posix_init(void);
- extern NTSTATUS ntvfs_cifs_init(void);
- extern NTSTATUS ntvfs_smb2_init(void);
- extern NTSTATUS ntvfs_nbench_init(void);
- extern NTSTATUS ntvfs_unixuid_init(void);
- extern NTSTATUS ntvfs_ipc_init(void);
- extern NTSTATUS ntvfs_print_init(void);
- extern NTSTATUS ntvfs_simple_init(void);
- extern NTSTATUS ntvfs_cifs_posix_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_ntvfs_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_ntvfs_MODULES };
init_module_fn *shared_init;
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index 9fb2cdf87b..7a3002cf9f 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -92,8 +92,8 @@ const struct pvfs_acl_ops *pvfs_acl_backend_byname(const char *name)
NTSTATUS pvfs_acl_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
- extern NTSTATUS pvfs_acl_nfs4_init(void);
- extern NTSTATUS pvfs_acl_xattr_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_pvfs_acl_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_pvfs_acl_MODULES };
init_module_fn *shared_init;
diff --git a/source4/ntvfs/sysdep/sys_lease.c b/source4/ntvfs/sysdep/sys_lease.c
index 12fd83e8e0..8b0b3a5110 100644
--- a/source4/ntvfs/sysdep/sys_lease.c
+++ b/source4/ntvfs/sysdep/sys_lease.c
@@ -107,15 +107,11 @@ _PUBLIC_ NTSTATUS sys_lease_register(const struct sys_lease_ops *backend)
return NT_STATUS_OK;
}
-#ifndef STATIC_sys_lease_MODULES
-#define STATIC_sys_lease_MODULES NULL
-#endif
-
_PUBLIC_ NTSTATUS sys_lease_init(void)
{
static bool initialized = false;
- extern NTSTATUS sys_lease_linux_init(void);
-
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_sys_lease_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_sys_lease_MODULES };
if (initialized) return NT_STATUS_OK;
diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c
index 57e921b206..72509e67a5 100644
--- a/source4/ntvfs/sysdep/sys_notify.c
+++ b/source4/ntvfs/sysdep/sys_notify.c
@@ -134,8 +134,8 @@ _PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend)
_PUBLIC_ NTSTATUS sys_notify_init(void)
{
static bool initialized = false;
- extern NTSTATUS sys_notify_inotify_init(void);
-
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_sys_notify_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_sys_notify_MODULES };
if (initialized) return NT_STATUS_OK;
diff --git a/source4/param/share.c b/source4/param/share.c
index 13d591ec1b..477ced7167 100644
--- a/source4/param/share.c
+++ b/source4/param/share.c
@@ -146,8 +146,8 @@ NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name
*/
NTSTATUS share_init(void)
{
- extern NTSTATUS share_ldb_init(void);
- extern NTSTATUS share_classic_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_share_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_share_MODULES };
run_init_functions(static_init);
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 1741b59929..0dc00e524a 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -1224,20 +1224,8 @@ const struct dcesrv_endpoint_server *dcesrv_ep_server_byname(const char *name)
void dcerpc_server_init(struct loadparm_context *lp_ctx)
{
static bool initialized;
- extern NTSTATUS dcerpc_server_wkssvc_init(void);
- extern NTSTATUS dcerpc_server_drsuapi_init(void);
- extern NTSTATUS dcerpc_server_winreg_init(void);
- extern NTSTATUS dcerpc_server_spoolss_init(void);
- extern NTSTATUS dcerpc_server_epmapper_init(void);
- extern NTSTATUS dcerpc_server_srvsvc_init(void);
- extern NTSTATUS dcerpc_server_netlogon_init(void);
- extern NTSTATUS dcerpc_server_rpcecho_init(void);
- extern NTSTATUS dcerpc_server_unixinfo_init(void);
- extern NTSTATUS dcerpc_server_samr_init(void);
- extern NTSTATUS dcerpc_server_remote_init(void);
- extern NTSTATUS dcerpc_server_lsa_init(void);
- extern NTSTATUS dcerpc_server_browser_init(void);
- extern NTSTATUS dcerpc_server_eventlog6_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_dcerpc_server_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES };
init_module_fn *shared_init;
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 56c64f3da0..29deb85921 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -285,23 +285,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
bool opt_interactive = false;
int opt;
poptContext pc;
- extern NTSTATUS server_service_wrepl_init(void);
- extern NTSTATUS server_service_kdc_init(void);
- extern NTSTATUS server_service_ldap_init(void);
- extern NTSTATUS server_service_web_init(void);
- extern NTSTATUS server_service_ldap_init(void);
- extern NTSTATUS server_service_winbind_init(void);
- extern NTSTATUS server_service_nbtd_init(void);
- extern NTSTATUS server_service_auth_init(void);
- extern NTSTATUS server_service_cldapd_init(void);
- extern NTSTATUS server_service_smb_init(void);
- extern NTSTATUS server_service_drepl_init(void);
- extern NTSTATUS server_service_kcc_init(void);
- extern NTSTATUS server_service_dnsupdate_init(void);
- extern NTSTATUS server_service_dns_init(void);
- extern NTSTATUS server_service_rpc_init(void);
- extern NTSTATUS server_service_ntp_signd_init(void);
- extern NTSTATUS server_service_samba3_smb_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_service_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_service_MODULES };
init_module_fn *shared_init;
struct tevent_context *event_ctx;
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index e071a21d88..ffd884a38d 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -59,23 +59,8 @@ NTSTATUS torture_libsmbclient_init(void)
_PUBLIC_ int torture_init(void)
{
- extern NTSTATUS torture_base_init(void);
- extern NTSTATUS torture_ldap_init(void);
- extern NTSTATUS torture_local_init(void);
- extern NTSTATUS torture_nbt_init(void);
- extern NTSTATUS torture_nbench_init(void);
- extern NTSTATUS torture_rap_init(void);
- extern NTSTATUS torture_dfs_init(void);
- extern NTSTATUS torture_rpc_init(void);
- extern NTSTATUS torture_ntp_init(void);
- extern NTSTATUS torture_smb2_init(void);
- extern NTSTATUS torture_net_init(void);
- extern NTSTATUS torture_libnetapi_init(void);
- extern NTSTATUS torture_libsmbclient_init(void);
- extern NTSTATUS torture_raw_init(void);
- extern NTSTATUS torture_unix_init(void);
- extern NTSTATUS torture_winbind_init(void);
- extern NTSTATUS torture_drs_init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_smbtorture_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "smbtorture");