summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-13 10:20:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:53:36 -0500
commitf236700ef67d4f93ec56ec7808584552e94e0dfe (patch)
tree3572ba5a82860e9dc60661161997b77704867cdc /source4/lib
parentb2d1f7890765fca5a119d43f4906e885c245005f (diff)
downloadsamba-f236700ef67d4f93ec56ec7808584552e94e0dfe.tar.gz
samba-f236700ef67d4f93ec56ec7808584552e94e0dfe.tar.bz2
samba-f236700ef67d4f93ec56ec7808584552e94e0dfe.zip
r665: merge over the new build system from my tmp branch
to the main SAMBA_4_0 tree. NOTE: that it's not completely ready, but it's functional:-) metze (This used to be commit c78a2ddb28ec50d6570a83b1f66f18a5c3621731)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/basic.m446
-rw-r--r--source4/lib/cmdline/config.m48
-rw-r--r--source4/lib/iconv.m42
-rw-r--r--source4/lib/ldb/config.m458
-rw-r--r--source4/lib/ldb/config.mk88
-rw-r--r--source4/lib/popt/config.m47
-rw-r--r--source4/lib/registry/common/reg_interface.c2
-rw-r--r--source4/lib/registry/config.m434
-rw-r--r--source4/lib/registry/reg_backend_dir/reg_backend_dir.c2
-rw-r--r--source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c2
-rw-r--r--source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c4
-rw-r--r--source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c2
-rw-r--r--source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c2
-rw-r--r--source4/lib/registry/reg_backend_w95/reg_backend_w95.c2
-rw-r--r--source4/lib/registry/reg_backend_wine/reg_backend_wine.c2
-rw-r--r--source4/lib/registry/tools/gregedit.c39
-rw-r--r--source4/lib/registry/tools/regdiff.c2
-rw-r--r--source4/lib/registry/tools/regpatch.c2
-rw-r--r--source4/lib/registry/tools/regshell.c4
-rw-r--r--source4/lib/registry/tools/regtree.c2
20 files changed, 189 insertions, 121 deletions
diff --git a/source4/lib/basic.m4 b/source4/lib/basic.m4
index 712a4826b7..ac5f82440e 100644
--- a/source4/lib/basic.m4
+++ b/source4/lib/basic.m4
@@ -1,26 +1,26 @@
dnl # LIB BASIC subsystem
SMB_SUBSYSTEM(LIBBASIC,[lib/version.o],
- [lib/debug.o lib/fault.o \
- lib/getsmbpass.o lib/interface.o \
- lib/interfaces.o lib/pidfile.o lib/replace.o \
- lib/signal.o lib/system.o lib/sendfile.o lib/time.o \
- lib/genrand.o lib/username.o \
- lib/util_getent.o lib/util_pw.o lib/smbrun.o \
- lib/bitmap.o lib/snprintf.o lib/dprintf.o \
- lib/xfile.o lib/wins_srv.o \
- lib/util_str.o lib/util_sid.o lib/util_uuid.o \
- lib/util_unistr.o lib/util_file.o lib/data_blob.o \
- lib/util.o lib/util_sock.o \
- lib/talloc.o lib/substitute.o lib/fsusage.o \
- lib/ms_fnmatch.o lib/select.o lib/messages.o \
- lib/tallocmsg.o lib/dmallocmsg.o \
- lib/smbpasswd.o \
- nsswitch/wb_client.o nsswitch/wb_common.o \
- lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \
- lib/gencache.o lib/module.o lib/mutex.o \
- lib/ldap_escape.o lib/events.o \
- lib/crypto/crc32.o lib/crypto/md5.o \
- lib/crypto/hmacmd5.o lib/crypto/md4.o \
- lib/tdb/tdb.o lib/tdb/spinlock.o lib/tdb/tdbutil.o \$(CHARSET_OBJS)],
- lib/libbasic_public_proto.h)
+ [lib/debug.o lib/fault.o
+ lib/getsmbpass.o lib/interface.o
+ lib/interfaces.o lib/pidfile.o lib/replace.o
+ lib/signal.o lib/system.o lib/sendfile.o lib/time.o
+ lib/genrand.o lib/username.o
+ lib/util_getent.o lib/util_pw.o lib/smbrun.o
+ lib/bitmap.o lib/snprintf.o lib/dprintf.o
+ lib/xfile.o lib/wins_srv.o
+ lib/util_str.o lib/util_sid.o lib/util_uuid.o
+ lib/util_unistr.o lib/util_file.o lib/data_blob.o
+ lib/util.o lib/util_sock.o
+ lib/talloc.o lib/substitute.o lib/fsusage.o
+ lib/ms_fnmatch.o lib/select.o lib/messages.o
+ lib/tallocmsg.o lib/dmallocmsg.o
+ lib/smbpasswd.o
+ nsswitch/wb_client.o nsswitch/wb_common.o
+ lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o
+ lib/gencache.o lib/module.o lib/mutex.o
+ lib/ldap_escape.o lib/events.o
+ lib/crypto/crc32.o lib/crypto/md5.o
+ lib/crypto/hmacmd5.o lib/crypto/md4.o
+ lib/tdb/tdb.o lib/tdb/spinlock.o lib/tdb/tdbutil.o],[],
+ [CHARSET])
diff --git a/source4/lib/cmdline/config.m4 b/source4/lib/cmdline/config.m4
index 6e9a8f4508..8316dff10f 100644
--- a/source4/lib/cmdline/config.m4
+++ b/source4/lib/cmdline/config.m4
@@ -72,8 +72,10 @@ AC_CHECK_LIB(readline, rl_completion_matches,
TMP_LIBCMDLINE_OBJS="lib/cmdline/readline.o lib/cmdline/popt_common.o"
TMP_LIBCMDLINE_LIBS="$TERMLIBS"
+#hack...
+LIBS="$LIBS $TERMLIBS"
+
SMB_SUBSYSTEM(LIBCMDLINE,[],
[${TMP_LIBCMDLINE_OBJS}],
- [],
- [],
- [${TMP_LIBCMDLINE_LIBS}])
+ [ALLLIBS],
+ [LIBPOPT])
diff --git a/source4/lib/iconv.m4 b/source4/lib/iconv.m4
index 26512ff326..282fa69b2d 100644
--- a/source4/lib/iconv.m4
+++ b/source4/lib/iconv.m4
@@ -63,4 +63,4 @@ if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; th
Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!])
fi
-SMB_SUBSYSTEM(CHARSET,lib/iconv.o,lib/charcnv.o)
+SMB_SUBSYSTEM(CHARSET,lib/iconv.o,lib/charcnv.o,[${TMP_CHARSET_LIBS}])
diff --git a/source4/lib/ldb/config.m4 b/source4/lib/ldb/config.m4
index f450acce00..16805132fd 100644
--- a/source4/lib/ldb/config.m4
+++ b/source4/lib/ldb/config.m4
@@ -1,45 +1,19 @@
if test x"$with_ldap_support" = x"yes"; then
-SMB_SUBSYSTEM(LIBLDB_LDAP,[lib/ldb/ldb_ldap/ldb_ldap.o])
+ SMB_MODULE_DEFAULT(libldb_ldap,STATIC)
fi
-SMB_SUBSYSTEM(LIBLDB,[lib/ldb/common/ldb.o],
- [lib/ldb/common/ldb_ldif.o \
- lib/ldb/common/ldb_parse.o \
- lib/ldb/common/ldb_msg.o \
- lib/ldb/common/util.o \
- lib/ldb/common/ldb_utf8.o \
- lib/ldb/common/ldb_alloc.o \
- lib/ldb/common/ldb_debug.o \
- lib/ldb/ldb_tdb/ldb_search.o \
- lib/ldb/ldb_tdb/ldb_tdb.o \
- lib/ldb/ldb_tdb/ldb_pack.o \
- lib/ldb/ldb_tdb/ldb_index.o \
- lib/ldb/ldb_tdb/ldb_match.o \
- lib/ldb/ldb_tdb/ldb_cache.o \
- \$(LIBLDB_LDAP_OBJS)],
- lib/ldb/include/ldb.h)
-
-SMB_SUBSYSTEM(LDBADD,[],
- [lib/ldb/tools/ldbadd.o \
- \$(LIBBASIC_OBJS) \$(LIBSMB_OBJS) \$(CONFIG_OBJS) \$(LIBLDB_OBJS)],
- lib/ldb/include/proto.h)
-
-SMB_SUBSYSTEM(LDBDEL,[],
- [lib/ldb/tools/ldbdel.o \
- \$(LIBBASIC_OBJS) \$(LIBSMB_OBJS) \$(CONFIG_OBJS) \$(LIBLDB_OBJS)],
- lib/ldb/include/proto.h)
-
-SMB_SUBSYSTEM(LDBMODIFY,[],
- [lib/ldb/tools/ldbmodify.o \
- \$(LIBBASIC_OBJS) \$(LIBSMB_OBJS) \$(CONFIG_OBJS) \$(LIBLDB_OBJS)],
- lib/ldb/include/proto.h)
-
-SMB_SUBSYSTEM(LDBSEARCH,[],
- [lib/ldb/tools/ldbsearch.o \
- \$(LIBBASIC_OBJS) \$(LIBSMB_OBJS) \$(CONFIG_OBJS) \$(LIBLDB_OBJS)],
- lib/ldb/include/proto.h)
-
-SMB_SUBSYSTEM(LDBEDIT,[],
- [lib/ldb/tools/ldbedit.o \
- \$(LIBBASIC_OBJS) \$(LIBSMB_OBJS) \$(CONFIG_OBJS) \$(LIBLDB_OBJS)],
- lib/ldb/include/proto.h)
+SMB_MODULE_MK(libldb_ldap,LIBLDB,NOT,lib/ldb/config.mk)
+
+SMB_MODULE_MK(libldb_tdb,LIBLDB,STATIC,lib/ldb/config.mk)
+
+SMB_SUBSYSTEM_MK(LIBLDB,lib/ldb/config.mk)
+
+SMB_BINARY_MK(ldbadd,lib/ldb/config.mk)
+
+SMB_BINARY_MK(ldbdel,lib/ldb/config.mk)
+
+SMB_BINARY_MK(ldbmodify,lib/ldb/config.mk)
+
+SMB_BINARY_MK(ldbsearch,lib/ldb/config.mk)
+
+SMB_BINARY_MK(ldbedit,lib/ldb/config.mk)
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
new file mode 100644
index 0000000000..c44d3e6bf0
--- /dev/null
+++ b/source4/lib/ldb/config.mk
@@ -0,0 +1,88 @@
+################################################
+# Start MODULE libldb_ldap
+[MODULE::libldb_ldap]
+INIT_OBJ_FILES = \
+ lib/ldb/ldb_ldap/ldb_ldap.o
+# End MODULE libldb_tdb
+################################################
+
+################################################
+# Start MODULE libldb_tdb
+[MODULE::libldb_tdb]
+INIT_OBJ_FILES = \
+ lib/ldb/ldb_tdb/ldb_tdb.o
+ADD_OBJ_FILES = \
+ lib/ldb/ldb_tdb/ldb_search.o \
+ lib/ldb/ldb_tdb/ldb_pack.o \
+ lib/ldb/ldb_tdb/ldb_index.o \
+ lib/ldb/ldb_tdb/ldb_match.o \
+ lib/ldb/ldb_tdb/ldb_cache.o
+# End MODULE libldb_tdb
+################################################
+
+################################################
+# Start SUBSYSTEM LIBLDB
+[SUBSYSTEM::LIBLDB]
+INIT_OBJ_FILES = \
+ lib/ldb/common/ldb.o
+ADD_OBJ_FILES = \
+ lib/ldb/common/ldb_ldif.o \
+ lib/ldb/common/ldb_parse.o \
+ lib/ldb/common/ldb_msg.o \
+ lib/ldb/common/util.o \
+ lib/ldb/common/ldb_utf8.o \
+ lib/ldb/common/ldb_alloc.o \
+ lib/ldb/common/ldb_debug.o
+#
+# End SUBSYSTEM LIBLDB
+################################################
+
+################################################
+# Start BINARY ldbadd
+[BINARY::ldbadd]
+OBJ_FILES= \
+ lib/ldb/tools/ldbadd.o
+REQUIRED_SUBSYSTEMS = \
+ LIBBASIC LIBSMB CONFIG LIBCMDLINE LIBLDB
+# End BINARY ldbadd
+################################################
+
+################################################
+# Start BINARY ldbdel
+[BINARY::ldbdel]
+OBJ_FILES= \
+ lib/ldb/tools/ldbdel.o
+REQUIRED_SUBSYSTEMS = \
+ LIBBASIC LIBSMB CONFIG LIBCMDLINE LIBLDB
+# End BINARY ldbdel
+################################################
+
+################################################
+# Start BINARY ldbmodify
+[BINARY::ldbmodify]
+OBJ_FILES= \
+ lib/ldb/tools/ldbmodify.o
+REQUIRED_SUBSYSTEMS = \
+ LIBBASIC LIBSMB CONFIG LIBCMDLINE LIBLDB
+# End BINARY ldbmodify
+################################################
+
+################################################
+# Start BINARY ldbsearch
+[BINARY::ldbsearch]
+OBJ_FILES= \
+ lib/ldb/tools/ldbsearch.o
+REQUIRED_SUBSYSTEMS = \
+ LIBBASIC LIBSMB CONFIG LIBCMDLINE LIBLDB
+# End BINARY ldbsearch
+################################################
+
+################################################
+# Start BINARY ldbedit
+[BINARY::ldbedit]
+OBJ_FILES= \
+ lib/ldb/tools/ldbedit.o
+REQUIRED_SUBSYSTEMS = \
+ LIBBASIC LIBSMB CONFIG LIBCMDLINE LIBLDB
+# End BINARY ldbedit
+################################################
diff --git a/source4/lib/popt/config.m4 b/source4/lib/popt/config.m4
index 6ac5d91079..5af1d08d20 100644
--- a/source4/lib/popt/config.m4
+++ b/source4/lib/popt/config.m4
@@ -33,8 +33,9 @@ else
AC_MSG_RESULT(no)
fi
+#hack
+LIBS="$LIBS ${TMP_LIBPOPT_LIBS}"
+
SMB_SUBSYSTEM(LIBPOPT,[],
[${TMP_LIBPOPT_OBJS}],
- [],
- [],
- [${TMP_LIBPOPT_LIBS}])
+ [])
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index 3600ab62ea..4d1726c542 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -83,7 +83,7 @@ WERROR reg_open(const char *backend, const char *location, const char *credentia
if (!NT_STATUS_IS_OK(status))
return WERR_GENERAL_FAILURE;
- static_init_reg;
+ static_init_registry;
reg_first_init = False;
}
diff --git a/source4/lib/registry/config.m4 b/source4/lib/registry/config.m4
index d8acb26397..af4470d983 100644
--- a/source4/lib/registry/config.m4
+++ b/source4/lib/registry/config.m4
@@ -5,16 +5,28 @@ if test t$BLDSHARED = ttrue; then
fi
LIBWINREG=libwinregistry
-PKG_CHECK_MODULES(GCONF, gconf-2.0, [ SMB_MODULE_DEFAULT(reg_gconf,STATIC)
- CFLAGS="$CFLAGS $GCONF_CFLAGS";], [AC_MSG_WARN([GConf not found, not building reg_gconf])])
+PKG_CHECK_MODULES(GCONF, gconf-2.0, [ SMB_MODULE_DEFAULT(registry_gconf,STATIC)
+ CFLAGS="$CFLAGS $GCONF_CFLAGS";], [AC_MSG_WARN([GConf not found, not building registry_gconf])])
+AC_CONFIG_FILES(lib/registry/winregistry.pc)
-PKG_CHECK_MODULES(GTK, glib-2.0 gtk+-2.0, [ CFLAGS="$CFLAGS $GTK_CFLAGS"; ], [ AC_MSG_WARN([Will be unable to build gregedit])])
+SMB_BINARY_ENABLE(gregedit,NO)
-SMB_MODULE(reg_nt4, REG, STATIC, lib/registry/reg_backend_nt4/reg_backend_nt4.o)
-SMB_MODULE(reg_w95, REG, STATIC, lib/registry/reg_backend_w95/reg_backend_w95.o)
-SMB_MODULE(reg_dir, REG, STATIC, lib/registry/reg_backend_dir/reg_backend_dir.o)
-SMB_MODULE(reg_rpc, REG, STATIC, lib/registry/reg_backend_rpc/reg_backend_rpc.o)
-SMB_MODULE(reg_gconf, REG, NOT, lib/registry/reg_backend_gconf/reg_backend_gconf.o, [], [$GCONF_LIBS])
-SMB_MODULE(reg_ldb, REG, NOT, lib/registry/reg_backend_ldb/reg_backend_ldb.o)
-SMB_SUBSYSTEM(REG,lib/registry/common/reg_interface.o,[lib/registry/common/reg_objects.o lib/registry/common/reg_util.o],lib/registry/common/winregistry_proto.h,[])
-AC_CONFIG_FILES(lib/registry/winregistry.pc)
+PKG_CHECK_MODULES(GTK, glib-2.0 gtk+-2.0, [ SMB_BINARY_ENABLE(gregedit,YES)
+ CFLAGS="$CFLAGS $GTK_CFLAGS"; ], [ AC_MSG_WARN([Will be unable to build gregedit])])
+
+SMB_MODULE(registry_nt4, REGISTRY, STATIC, lib/registry/reg_backend_nt4/reg_backend_nt4.o)
+SMB_MODULE(registry_w95, REGISTRY, STATIC, lib/registry/reg_backend_w95/reg_backend_w95.o)
+SMB_MODULE(registry_dir, REGISTRY, STATIC, lib/registry/reg_backend_dir/reg_backend_dir.o)
+SMB_MODULE(registry_rpc, REGISTRY, STATIC, lib/registry/reg_backend_rpc/reg_backend_rpc.o,[],[],[LIBSMB])
+SMB_MODULE(registry_gconf, REGISTRY, NOT, lib/registry/reg_backend_gconf/reg_backend_gconf.o])
+SMB_MODULE(registry_ldb, REGISTRY, NOT, lib/registry/reg_backend_ldb/reg_backend_ldb.o,[],[],[LIBLDB])
+SMB_SUBSYSTEM(REGISTRY,lib/registry/common/reg_interface.o,
+ [lib/registry/common/reg_objects.o lib/registry/common/reg_util.o],
+ [],
+ [LIBBASIC])
+
+SMB_BINARY(regdiff, [REG], [BIN], lib/registry/tools/regdiff.o,[],[CONFIG LIBBASIC LIBCMDLINE REGISTRY])
+SMB_BINARY(regpatch, [REG], [BIN], lib/registry/tools/regpatch.o,[],[CONFIG LIBBASIC LIBCMDLINE REGISTRY])
+SMB_BINARY(regshell, [REG], [BIN], lib/registry/tools/regshell.o,[],[CONFIG LIBBASIC LIBCMDLINE REGISTRY])
+SMB_BINARY(regtree, [REG], [BIN], lib/registry/tools/regtree.o,[],[CONFIG LIBBASIC LIBCMDLINE REGISTRY])
+SMB_BINARY(gregedit, [REG], [BIN], lib/registry/tools/gregedit.o,[],[CONFIG LIBBASIC LIBCMDLINE REGISTRY])
diff --git a/source4/lib/registry/reg_backend_dir/reg_backend_dir.c b/source4/lib/registry/reg_backend_dir/reg_backend_dir.c
index 960d5f3e04..517324fdd2 100644
--- a/source4/lib/registry/reg_backend_dir/reg_backend_dir.c
+++ b/source4/lib/registry/reg_backend_dir/reg_backend_dir.c
@@ -138,7 +138,7 @@ static struct registry_ops reg_backend_dir = {
.del_value = reg_dir_del_value,
};
-NTSTATUS reg_dir_init(void)
+NTSTATUS registry_dir_init(void)
{
return register_backend("registry", &reg_backend_dir);
}
diff --git a/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c b/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c
index 1acb3cbcec..8f9fd6625b 100644
--- a/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c
+++ b/source4/lib/registry/reg_backend_gconf/reg_backend_gconf.c
@@ -194,7 +194,7 @@ static struct registry_ops reg_backend_gconf = {
*/
};
-NTSTATUS reg_gconf_init(void)
+NTSTATUS registry_gconf_init(void)
{
return register_backend("registry", &reg_backend_gconf);
}
diff --git a/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c b/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c
index 9e561b1e6c..498dc6991b 100644
--- a/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c
+++ b/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "lib/registry/common/registry.h"
-char *reg_path_to_ldb(TALLOC_CTX *mem_ctx, const char *path)
+static char *reg_path_to_ldb(TALLOC_CTX *mem_ctx, const char *path)
{
char *ret = talloc_strdup(mem_ctx, "(dn=");
char *begin = (char *)path;
@@ -116,7 +116,7 @@ static struct registry_ops reg_backend_ldb = {
.fetch_subkeys = ldb_fetch_subkeys,
};
-NTSTATUS reg_ldb_init(void)
+NTSTATUS registry_ldb_init(void)
{
return register_backend("registry", &reg_backend_ldb);
}
diff --git a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c
index ff39954a9f..cb3c284811 100644
--- a/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c
+++ b/source4/lib/registry/reg_backend_nt4/reg_backend_nt4.c
@@ -1752,7 +1752,7 @@ static struct registry_ops reg_backend_nt4 = {
*/
};
-NTSTATUS reg_nt4_init(void)
+NTSTATUS registry_nt4_init(void)
{
return register_backend("registry", &reg_backend_nt4);
}
diff --git a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
index de2c2261b9..0b2919366d 100644
--- a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
@@ -429,7 +429,7 @@ static struct registry_ops reg_backend_rpc = {
.num_values = rpc_num_values,
};
-NTSTATUS reg_rpc_init(void)
+NTSTATUS registry_rpc_init(void)
{
return register_backend("registry", &reg_backend_rpc);
}
diff --git a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c
index 80108fd541..c5d2e24103 100644
--- a/source4/lib/registry/reg_backend_w95/reg_backend_w95.c
+++ b/source4/lib/registry/reg_backend_w95/reg_backend_w95.c
@@ -361,7 +361,7 @@ static struct registry_ops reg_backend_w95 = {
.get_subkey_by_index = w95_get_subkey_by_index,
};
-NTSTATUS reg_w95_init(void)
+NTSTATUS registry_w95_init(void)
{
return register_backend("registry", &reg_backend_w95);
}
diff --git a/source4/lib/registry/reg_backend_wine/reg_backend_wine.c b/source4/lib/registry/reg_backend_wine/reg_backend_wine.c
index fd7d04bcf0..249af27e13 100644
--- a/source4/lib/registry/reg_backend_wine/reg_backend_wine.c
+++ b/source4/lib/registry/reg_backend_wine/reg_backend_wine.c
@@ -26,7 +26,7 @@ static REG_OPS reg_backend_wine = {
.name = "wine",
};
-NTSTATUS reg_wine_init(void)
+NTSTATUS registry_wine_init(void)
{
register_backend("registry", &reg_backend_wine);
return NT_STATUS_OK;
diff --git a/source4/lib/registry/tools/gregedit.c b/source4/lib/registry/tools/gregedit.c
index 4bbde9a37d..b5751ca00b 100644
--- a/source4/lib/registry/tools/gregedit.c
+++ b/source4/lib/registry/tools/gregedit.c
@@ -142,7 +142,7 @@ static void registry_load_root()
gtk_widget_set_sensitive( save_as, True );
}
-GtkWidget* create_rpcwin (void)
+static GtkWidget* create_rpcwin (void)
{
GtkWidget *dialog_vbox1;
GtkWidget *table1;
@@ -242,7 +242,7 @@ static void on_open_file_activate (GtkMenuItem *menuitem, gpointer user_data)
gtk_widget_destroy(openfilewin);
}
-void on_open_gconf_activate (GtkMenuItem *menuitem,
+static void on_open_gconf_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
WERROR error = reg_open("gconf", NULL, NULL, &registry);
@@ -254,8 +254,7 @@ void on_open_gconf_activate (GtkMenuItem *menuitem,
registry_load_root();
}
-void
-on_open_remote_activate (GtkMenuItem *menuitem,
+static void on_open_remote_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
char *location, *credentials;
@@ -281,8 +280,7 @@ on_open_remote_activate (GtkMenuItem *menuitem,
}
-void
-on_save_activate (GtkMenuItem *menuitem,
+static void on_save_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
WERROR error = reg_save(registry, NULL);
@@ -292,8 +290,7 @@ on_save_activate (GtkMenuItem *menuitem,
}
-void
-on_save_as_activate (GtkMenuItem *menuitem,
+static void on_save_as_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gint result;
@@ -316,55 +313,49 @@ on_save_as_activate (GtkMenuItem *menuitem,
}
-void
-on_quit_activate (GtkMenuItem *menuitem,
+static void on_quit_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gtk_main_quit();
}
-void
-on_cut_activate (GtkMenuItem *menuitem,
+static void on_cut_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
/* FIXME */
}
-void
-on_copy_activate (GtkMenuItem *menuitem,
+static void on_copy_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
/* FIXME */
}
-void
-on_paste_activate (GtkMenuItem *menuitem,
+static void on_paste_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
/* FIXME */
}
-void
-on_delete_activate (GtkMenuItem *menuitem,
+static void on_delete_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
/* FIXME */
}
-void
-on_about_activate (GtkMenuItem *menuitem,
+static void on_about_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gtk_dialog_run(GTK_DIALOG(create_aboutwin()));
gtk_widget_destroy(aboutwin);
}
-void on_key_activate (GtkTreeView *treeview,
+static void on_key_activate (GtkTreeView *treeview,
GtkTreePath *path,
gpointer user_data)
{
@@ -400,7 +391,7 @@ void on_key_activate (GtkTreeView *treeview,
if(!W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) gtk_show_werror(error);
}
-GtkWidget* create_mainwin (void)
+static GtkWidget* create_mainwin (void)
{
GtkWidget *vbox1;
GtkWidget *menubar;
@@ -685,7 +676,7 @@ static GtkWidget* create_aboutwin (void)
}
-GtkWidget* create_openfilewin (void)
+static GtkWidget* create_openfilewin (void)
{
GtkWidget *ok_button;
GtkWidget *cancel_button;
@@ -704,7 +695,7 @@ GtkWidget* create_openfilewin (void)
return openfilewin;
}
-GtkWidget* create_savefilewin (void)
+static GtkWidget* create_savefilewin (void)
{
GtkWidget *ok_button;
GtkWidget *cancel_button;
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index 888270f61f..d9419208cd 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -21,7 +21,7 @@
#include "includes.h"
-void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
+static void writediff(REG_KEY *oldkey, REG_KEY *newkey, FILE *out)
{
int i;
REG_KEY *t1, *t2;
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index d4b036afe9..64c2637a0c 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -664,7 +664,7 @@ static CMD_FILE *cmd_file_create(const char *file)
char *str_type(unsigned char type);
-int nt_apply_reg_command_file(REG_KEY *root, const char *cmd_file_name)
+static int nt_apply_reg_command_file(REG_KEY *root, const char *cmd_file_name)
{
CMD *cmd;
BOOL modified = False;
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index b78f4256f0..e8b01081e8 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -173,7 +173,7 @@ static REG_KEY *cmd_help(REG_KEY *cur, int argc, char **argv)
return NULL;
}
-REG_KEY *process_cmd(REG_KEY *k, char *line)
+static REG_KEY *process_cmd(REG_KEY *k, char *line)
{
int argc;
char **argv = NULL;
@@ -196,7 +196,7 @@ REG_KEY *process_cmd(REG_KEY *k, char *line)
return k;
}
-int main (int argc, char **argv)
+ int main(int argc, char **argv)
{
int opt;
const char *backend = "dir";
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 4d0d4b2909..477c63af2c 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -21,7 +21,7 @@
#include "includes.h"
-void print_tree(int l, REG_KEY *p, int fullpath, int novals)
+static void print_tree(int l, REG_KEY *p, int fullpath, int novals)
{
REG_KEY *subkey;
REG_VAL *value;