From e131c94ac1b06cc49b1c25717d3496dba8b0b3df Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 May 2011 13:42:05 -0700 Subject: More const fixes for compiler warnings from the waf build. --- source3/intl/lang_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/intl') diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index 8fcb9f2bfc..15793b7828 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -236,7 +236,7 @@ const char *lang_msg(const char *msgid) void lang_msg_free(const char *msgstr) { if (!tdb) return; - free((void *)msgstr); + free(discard_const_p(void, msgstr)); } /* -- cgit From d8cfca3a9bd2b6b6c562fd202377d95a98eb5472 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 5 May 2011 11:25:29 +0200 Subject: s3: only include tdb headers where needed. Guenther --- source3/intl/lang_tdb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/intl') diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index 15793b7828..c6206c16e4 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -20,6 +20,7 @@ #include "includes.h" #include "system/filesys.h" #include "intl/lang_tdb.h" +#include "util_tdb.h" static TDB_CONTEXT *tdb; -- cgit From de46ad9084aff4384f33660acf91da3b81554a88 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 6 Jun 2011 14:37:06 +1000 Subject: lib/util use modules_path(), data_path() and shlib_ext() from source3 This brings these helpful utility functions in common, as they are not based on either loadparm system. (The 'modules dir' parameter from Samba4 will shortly be removed, so there is no loss in functionality) Andrew Bartlett --- source3/intl/lang_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/intl') diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index c6206c16e4..6070e29e5a 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -131,7 +131,7 @@ bool lang_tdb_init(const char *lang) return True; if (asprintf(&msg_path, "%s.msg", - data_path((const char *)lang)) == -1) { + data_path(talloc_tos(), (const char *)lang)) == -1) { DEBUG(0, ("asprintf failed\n")); goto done; } -- cgit From 3ec4966942dc468cfd6e32bf221d4427cc6aba86 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 10 Jun 2011 15:04:36 +0200 Subject: source3/intl/lang_tdb.h: fix licence/copyright Guenther --- source3/intl/lang_tdb.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'source3/intl') diff --git a/source3/intl/lang_tdb.h b/source3/intl/lang_tdb.h index da246846d0..2f9c3f19e5 100644 --- a/source3/intl/lang_tdb.h +++ b/source3/intl/lang_tdb.h @@ -1,3 +1,24 @@ +/* + Unix SMB/CIFS implementation. + tdb based replacement for gettext + Copyright (C) Andrew Tridgell 2001 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef _INTL_LANG_TDB_H_ +#define _INTL_LANG_TDB_H_ /* The following definitions come from intl/lang_tdb.c */ @@ -5,3 +26,5 @@ bool lang_tdb_init(const char *lang); const char *lang_msg(const char *msgid); void lang_msg_free(const char *msgstr); char *lang_tdb_current(void); + +#endif /* _INTL_LANG_TDB_H_ */ -- cgit