The branch, master has been updated via e9615b43b4dc7037da7bc274d720b8e54c7f85bc (commit) via b711faa53f38aa5250808ae5f6db884f198211a0 (commit) via 97ff9d479aa5e535862073c4bba1143877bc2506 (commit) via 715cc00bc01e151c10e3d723cd29e126a6464637 (commit) via 293acaf92e7234665e15c3fb7fd600427ffcd5ce (commit) from a868d2f3d5281dea923718486e4e42b20cf8fe74 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit e9615b43b4dc7037da7bc274d720b8e54c7f85bc Author: Jelmer Vernooij <jel...@samba.org> Date: Wed Jan 21 18:54:20 2009 +0100 Fix path to check_python.m4. commit b711faa53f38aa5250808ae5f6db884f198211a0 Author: Jelmer Vernooij <jel...@samba.org> Date: Wed Jan 21 18:50:16 2009 +0100 libsmbconf: Remove use of some Samba3-specific macros. commit 97ff9d479aa5e535862073c4bba1143877bc2506 Author: Jelmer Vernooij <jel...@samba.org> Date: Wed Jan 21 18:50:02 2009 +0100 libsmbconf: Add build magic for Samba 4. commit 715cc00bc01e151c10e3d723cd29e126a6464637 Merge: 293acaf92e7234665e15c3fb7fd600427ffcd5ce a868d2f3d5281dea923718486e4e42b20cf8fe74 Author: Jelmer Vernooij <jel...@samba.org> Date: Wed Jan 21 18:40:06 2009 +0100 Merge branch 'master' of ssh://git.samba.org/data/git/samba commit 293acaf92e7234665e15c3fb7fd600427ffcd5ce Author: Jelmer Vernooij <jel...@samba.org> Date: Wed Jan 21 18:38:40 2009 +0100 pidl/python: Add explicit casts, fixes warnings about casts when enabled. ----------------------------------------------------------------------- Summary of changes: lib/smbconf/config.mk | 3 +++ lib/smbconf/smbconf.c | 2 +- lib/smbconf/smbconf_private.h | 6 ++++++ lib/smbconf/smbconf_txt.c | 12 ++++++------ lib/smbconf/smbconf_util.c | 4 ++-- pidl/lib/Parse/Pidl/Samba4/Python.pm | 8 ++++---- source3/samba4.m4 | 2 +- source4/main.mk | 1 + 8 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 lib/smbconf/config.mk Changeset truncated at 500 lines: diff --git a/lib/smbconf/config.mk b/lib/smbconf/config.mk new file mode 100644 index 0000000..de66b90 --- /dev/null +++ b/lib/smbconf/config.mk @@ -0,0 +1,3 @@ +[SUBSYSTEM::LIBSMBCONF] + +LIBSMBCONF_OBJ_FILES = $(addprefix ../lib/smbconf/, smbconf.o smbconf_txt.o smbconf_util.o) diff --git a/lib/smbconf/smbconf.c b/lib/smbconf/smbconf.c index d723f0b..bcab0b9 100644 --- a/lib/smbconf/smbconf.c +++ b/lib/smbconf/smbconf.c @@ -130,7 +130,7 @@ WERROR smbconf_get_config(struct smbconf_ctx *ctx, goto done; } - tmp_services = TALLOC_ARRAY(tmp_ctx, struct smbconf_service *, + tmp_services = talloc_array(tmp_ctx, struct smbconf_service *, tmp_num_shares); if (tmp_services == NULL) { diff --git a/lib/smbconf/smbconf_private.h b/lib/smbconf/smbconf_private.h index b0333e9..c9e4418 100644 --- a/lib/smbconf/smbconf_private.h +++ b/lib/smbconf/smbconf_private.h @@ -20,6 +20,12 @@ #ifndef __LIBSMBCONF_PRIVATE_H__ #define __LIBSMBCONF_PRIVATE_H__ +#ifndef GLOBAL_NAME +#define GLOBAL_NAME "global" +#endif + +#include "lib/smbconf/smbconf.h" + struct smbconf_ops { WERROR (*init)(struct smbconf_ctx *ctx, const char *path); int (*shutdown)(struct smbconf_ctx *ctx); diff --git a/lib/smbconf/smbconf_txt.c b/lib/smbconf/smbconf_txt.c index c4d2d2b..1df4a9f 100644 --- a/lib/smbconf/smbconf_txt.c +++ b/lib/smbconf/smbconf_txt.c @@ -79,7 +79,7 @@ static bool smbconf_txt_do_section(const char *section, void *private_data) cache->current_share = cache->num_shares; cache->num_shares++; - cache->param_names = TALLOC_REALLOC_ARRAY(cache, + cache->param_names = talloc_realloc(cache, cache->param_names, char **, cache->num_shares); @@ -88,7 +88,7 @@ static bool smbconf_txt_do_section(const char *section, void *private_data) } cache->param_names[cache->current_share] = NULL; - cache->param_values = TALLOC_REALLOC_ARRAY(cache, + cache->param_values = talloc_realloc(cache, cache->param_values, char **, cache->num_shares); @@ -97,7 +97,7 @@ static bool smbconf_txt_do_section(const char *section, void *private_data) } cache->param_values[cache->current_share] = NULL; - cache->num_params = TALLOC_REALLOC_ARRAY(cache, + cache->num_params = talloc_realloc(cache, cache->num_params, uint32_t, cache->num_shares); @@ -170,7 +170,7 @@ static WERROR smbconf_txt_init_cache(struct smbconf_ctx *ctx) smbconf_txt_flush_cache(ctx); } - pd(ctx)->cache = TALLOC_ZERO_P(pd(ctx), struct txt_cache); + pd(ctx)->cache = talloc_zero(pd(ctx), struct txt_cache); if (pd(ctx)->cache == NULL) { return WERR_NOMEM; @@ -229,7 +229,7 @@ static WERROR smbconf_txt_init(struct smbconf_ctx *ctx, const char *path) return WERR_NOMEM; } - ctx->data = TALLOC_ZERO_P(ctx, struct txt_private_data); + ctx->data = talloc_zero(ctx, struct txt_private_data); if (ctx->data == NULL) { return WERR_NOMEM; } @@ -420,7 +420,7 @@ static WERROR smbconf_txt_get_share(struct smbconf_ctx *ctx, tmp_ctx = talloc_stackframe(); - tmp_service = TALLOC_ZERO_P(tmp_ctx, struct smbconf_service); + tmp_service = talloc_zero(tmp_ctx, struct smbconf_service); if (tmp_service == NULL) { werr = WERR_NOMEM; goto done; diff --git a/lib/smbconf/smbconf_util.c b/lib/smbconf/smbconf_util.c index 5eb5e96..b309a34 100644 --- a/lib/smbconf/smbconf_util.c +++ b/lib/smbconf/smbconf_util.c @@ -49,7 +49,7 @@ WERROR smbconf_init_internal(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, return WERR_INVALID_PARAM; } - ctx = TALLOC_ZERO_P(mem_ctx, struct smbconf_ctx); + ctx = talloc_zero(mem_ctx, struct smbconf_ctx); if (ctx == NULL) { return WERR_NOMEM; } @@ -86,7 +86,7 @@ WERROR smbconf_add_string_to_array(TALLOC_CTX *mem_ctx, return WERR_INVALID_PARAM; } - new_array = TALLOC_REALLOC_ARRAY(mem_ctx, *array, char *, count + 1); + new_array = talloc_realloc(mem_ctx, *array, char *, count + 1); if (new_array == NULL) { return WERR_NOMEM; } diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 6d25fcd..3efe77b 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -195,7 +195,7 @@ sub PythonStruct($$$$$$) $self->pidl("static PyObject *py_$name\_get_$e->{NAME}(PyObject *obj, void *closure)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(obj);"); $self->pidl("PyObject *py_$e->{NAME};"); $self->ConvertObjectToPython("py_talloc_get_mem_ctx(obj)", $env, $e, $varname, "py_$e->{NAME}", "return NULL;"); $self->pidl("return py_$e->{NAME};"); @@ -206,7 +206,7 @@ sub PythonStruct($$$$$$) $self->pidl("static int py_$name\_set_$e->{NAME}(PyObject *py_obj, PyObject *value, void *closure)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);"); my $mem_ctx = "py_talloc_get_mem_ctx(py_obj)"; my $l = $e->{LEVELS}[0]; my $nl = GetNextLevel($e, $l); @@ -250,7 +250,7 @@ sub PythonStruct($$$$$$) $self->pidl("static PyObject *py_$name\_ndr_pack(PyObject *py_obj)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);"); $self->pidl("DATA_BLOB blob;"); $self->pidl("enum ndr_err_code err;"); $self->pidl("err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_push_flags_fn_t)ndr_push_$name);"); @@ -269,7 +269,7 @@ sub PythonStruct($$$$$$) $self->pidl("static PyObject *py_$name\_ndr_unpack(PyObject *py_obj, PyObject *args)"); $self->pidl("{"); $self->indent; - $self->pidl("$cname *object = py_talloc_get_ptr(py_obj);"); + $self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);"); $self->pidl("DATA_BLOB blob;"); $self->pidl("enum ndr_err_code err;"); $self->pidl("if (!PyArg_ParseTuple(args, \"s#:__ndr_unpack__\", &blob.data, &blob.length))"); diff --git a/source3/samba4.m4 b/source3/samba4.m4 index a7916ef..421ace0 100644 --- a/source3/samba4.m4 +++ b/source3/samba4.m4 @@ -2,7 +2,7 @@ AC_SUBST(BLDSHARED) smbtorture4_path=bin/smbtorture4 m4_include(build/m4/public.m4) -m4_include(build/m4/check_python.m4) +m4_include(../m4/check_python.m4) AC_SAMBA_PYTHON_DEVEL([ SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS]) diff --git a/source4/main.mk b/source4/main.mk index fa87530..df31c90 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -47,3 +47,4 @@ mkinclude client/config.mk mkinclude libcli/config.mk mkinclude scripting/python/config.mk mkinclude kdc/config.mk +mkinclude ../lib/smbconf/config.mk -- Samba Shared Repository