modules: standardise on samba_init_module as the hook symbol to resolve
authorAndrew Bartlett <abartlet@samba.org>
Fri, 9 Sep 2011 12:25:43 +0000 (22:25 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 6 Oct 2011 05:18:07 +0000 (07:18 +0200)
lib/util/modules.c
lib/util/samba_modules.h
source3/exports/modules-darwin.syms
source3/m4/aclocal.m4
source3/modules/perfcount_test.c
source3/wscript

index 620611ff176d10d998ba545cb63b16d04202c8f0..2c4622510ba6818a23ac1ec79edb2c1ebd7d2ede 100644 (file)
@@ -156,14 +156,14 @@ static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       init = (init_module_fn)dlsym(handle, "init_samba_module");
+       init = (init_module_fn)dlsym(handle, SAMBA_INIT_MODULE);
 
        /* we must check dlerror() to determine if it worked, because
            dlsym() can validly return NULL */
        error = dlerror();
        if (error) {
-               DEBUG(0, ("Error trying to resolve symbol 'init_samba_module' "
-                         "in %s: %s\n", module_name, error));
+               DEBUG(0, ("Error trying to resolve symbol '" SAMBA_INIT_MODULE
+                         "in %s: %s\n", module_name, error));
                dlclose(handle);
                return NT_STATUS_UNSUCCESSFUL;
        }
index 06f92c5db1a923de48f7b25b237a534cebe96936..ae7895eb1240efb3ba81a74f969da015f5ae3cb0 100644 (file)
@@ -24,7 +24,7 @@
 /* Module support */
 typedef NTSTATUS (*init_module_fn) (void);
 
-NTSTATUS init_samba_module(void);
+NTSTATUS samba_init_module(void);
 
 /* this needs to be a string which is not in the C library. We
    previously used "init_module", but that meant that modules which
index be457614d80260186aad12b6f4e4ccabcbd8be16..276543b8de01186bd1d76ca5396637de4dd1f67b 100644 (file)
@@ -1 +1 @@
-_init_samba_module
+_samba_init_module
index 6112a647fefe1ec7eb4cede277dbe68498962abb..a4db42e5ca94eb7c6ee949bd6066e990b36d1dbb 100644 (file)
@@ -25,7 +25,7 @@ AC_DEFUN(SMB_MODULE,
        fi
        
        if test x"$DEST" = xSHARED; then
-               AC_DEFINE([$1][_init], [init_samba_module], [Whether to build $1 as shared module])
+               AC_DEFINE([$1][_init], [samba_init_module], [Whether to build $1 as shared module])
                $4_MODULES="$$4_MODULES $3"
                AC_MSG_RESULT([shared])
                [$6]
index 99904ac3da342e1d4db89a5da1b8a9872cdc0ea0..8d17ee513f4fdd875ca64c510ce88b5bc637b7c0 100644 (file)
@@ -381,7 +381,7 @@ static struct smb_perfcount_handlers perfcount_test_handlers = {
        perfcount_test_end
 };
 
-NTSTATUS init_samba_module(void)
+NTSTATUS samba_init_module(void)
 {
        return smb_register_perfcounter(SMB_PERFCOUNTER_INTERFACE_VERSION,
                                        "pc_test", &perfcount_test_handlers);
index 86949d258cadd0d019d2679a8660b4c912c3ae08..d7764289d24701765da747947d202eb5b954137e 100644 (file)
@@ -1817,7 +1817,7 @@ main() {
             conf.DEFINE('static_init_%s' % p, '{}')
         if p in shared_list:
             for entry in shared_list[p]:
-                conf.DEFINE('%s_init' % entry, 'init_samba_module')
+                conf.DEFINE('%s_init' % entry, 'samba_init_module')
                 conf.env[shared_env].append('%s' % entry)
 
     if not os.getenv('TOPLEVEL_BUILD'):