[PATCHES] lib/util - cleanups, build restructuring, charset compatibility
Lukas Slebodnik
lslebodn at redhat.com
Thu Jan 8 03:41:31 MST 2015
On (08/01/15 11:40), Andreas Schneider wrote:
>On Thursday 08 January 2015 11:10:00 Lukas Slebodnik wrote:
>> >From 32ebe0ffe8880f934d147910fd1103a1e6b8cbe1 Mon Sep 17 00:00:00 2001
>> >From: Andreas Schneider <asn at samba.org>
>> >Date: Thu, 8 Jan 2015 10:24:36 +0100
>> >Subject: [PATCH] lib/util: Avoid collision which alread defined consumer
>> >DEBUG>
>> > macro.
>> >
>> >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11033
>> >
>> >Signed-off-by: Andreas Schneider <asn at samba.org>
>> >---
>> >
>> > lib/util/debug.h | 6 +++---
>> > lib/util/fault.h | 5 +++++
>> > 2 files changed, 8 insertions(+), 3 deletions(-)
>> >
>> >diff --git a/lib/util/debug.h b/lib/util/debug.h
>> >index 67d122f..a8a0d69 100644
>> >--- a/lib/util/debug.h
>> >+++ b/lib/util/debug.h
>> >@@ -20,8 +20,8 @@
>> >
>> > along with this program. If not, see <http://www.gnu.org/licenses/>.
>> >
>> > */
>> >
>> >-#ifndef _DEBUG_H
>> >-#define _DEBUG_H
>> >+#ifndef _SAMBA_DEBUG_H
>> >+#define _SAMBA_DEBUG_H
>> >
>> > #include <stdbool.h>
>> > #include <stddef.h>
>> >
>> >@@ -263,4 +263,4 @@ typedef void (*debug_callback_fn)(void *private_ptr,
>> >int level, const char *msg)>
>> > */
>> >
>> > void debug_set_callback(void *private_ptr, debug_callback_fn fn);
>> >
>> >-#endif
>> >+#endif /* _SAMBA_DEBUG_H */
>> >diff --git a/lib/util/fault.h b/lib/util/fault.h
>> >index 98a24a3..aa10a71 100644
>> >--- a/lib/util/fault.h
>> >+++ b/lib/util/fault.h
>> >@@ -24,11 +24,15 @@
>> >
>> > #include <sys/types.h>
>> >
>> > #include "attr.h"
>> >
>> >+
>> >+#ifndef DEBUG
>> >
>> > #include "debug.h"
>> >
>> >+#endif /* DEBUG */
>>
>> Did you consider to move this include after "#ifdef _SAMBA_DEBUG_H"?
>> because macro DEBUG could not be used if macro SMB_ASSERT is not defined.
>
>I don't understand what you mean. _SAMBA_DEBUG_H is only defined if the samba
>debug.h is included.
Sorry, I misread the patch.
LGTM
LS
More information about the samba-technical
mailing list