[SCM] Samba Shared Repository - branch v4-2-test updated
Karolin Seeger
kseeger at samba.org
Mon Apr 20 16:06:12 MDT 2015
The branch, v4-2-test has been updated
via 6135c95 lib/util: Include DEBUG macro in internal header files before samba_util.h
from 6352ce7 waf: Fix systemd detection
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-2-test
- Log -----------------------------------------------------------------
commit 6135c950c4dbf3840a95fe48e5f0a3e7c752c599
Author: Lukas Slebodnik <lslebodn at redhat.com>
Date: Thu Mar 5 11:26:46 2015 +0100
lib/util: Include DEBUG macro in internal header files before samba_util.h
It's best practice to include external header files before internal
header files. In this case internal DEBUG macro cannot be defined and
therefore samba version of debug macro will be included
in header file "util/fault.h".
In file included from example.c:27:0:
src/util/util.h:127:0: error: "DEBUG" redefined [-Werror]
#define DEBUG(level, format, ...) do { \
^
In file included from /usr/include/samba-4.0/util/fault.h:29:0,
from /usr/include/samba-4.0/samba_util.h:62,
from /usr/include/samba-4.0/ndr.h:30,
from example.c:24:
/usr/include/samba-4.0/util/debug.h:182:0: note: this is the location of the previous definition
#define DEBUG( level, body ) \
^
CC src/providers/ad/libsss_ad_common_la-ad_domain_info.lo
cc1: all warnings being treated as errors
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11033
Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Mar 11 18:47:22 CET 2015 on sn-devel-104
(cherry picked from commit 9643a4b1ef2ada764f454ecc82aa6936217967fc)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-2-test): Tue Apr 21 00:05:08 CEST 2015 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
lib/util/fault.h | 4 +---
lib/util/memcache.c | 2 +-
source3/include/includes.h | 4 +++-
source4/include/includes.h | 2 ++
4 files changed, 7 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/fault.h b/lib/util/fault.h
index aa10a71..0ac6cb9 100644
--- a/lib/util/fault.h
+++ b/lib/util/fault.h
@@ -25,9 +25,7 @@
#include "attr.h"
-#ifndef DEBUG
-#include "debug.h"
-#endif /* DEBUG */
+/* Please include header file debug.h if you want to use macro SMB_ASSERT */
/**
* assert macros
diff --git a/lib/util/memcache.c b/lib/util/memcache.c
index 50e59fc..2f2e77c 100644
--- a/lib/util/memcache.c
+++ b/lib/util/memcache.c
@@ -19,8 +19,8 @@
#include "replace.h"
#include <talloc.h>
-#include "../lib/util/samba_util.h"
#include "../lib/util/debug.h"
+#include "../lib/util/samba_util.h"
#include "../lib/util/dlinklist.h"
#include "../lib/util/rbtree.h"
#include "memcache.h"
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 0715608..b61742a 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -356,6 +356,9 @@ enum timestamp_set_resolution {
typedef char fstring[FSTRING_LEN];
#endif
+/* debug.h need to be included before samba_util.h for the macro SMB_ASSERT */
+#include "../lib/util/debug.h"
+
/* Lists, trees, caching, database... */
#include "../lib/util/samba_util.h"
#include "../lib/util/util_net.h"
@@ -371,7 +374,6 @@ typedef char fstring[FSTRING_LEN];
#include "../lib/util/data_blob.h"
#include "../lib/util/time.h"
-#include "../lib/util/debug.h"
#include "../lib/util/debug_s3.h"
#include "../libcli/util/ntstatus.h"
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 46b158e..5aabb8e 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -57,6 +57,8 @@
#endif
#include "../lib/util/xfile.h"
#include "../lib/util/attr.h"
+
+/* debug.h need to be included before samba_util.h for the macro SMB_ASSERT */
#include "../lib/util/debug.h"
#include "../lib/util/samba_util.h"
--
Samba Shared Repository
More information about the samba-cvs
mailing list