summaryrefslogtreecommitdiffstats
path: root/source4/include
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-01-31 00:00:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:36 -0500
commitb98a5bf92222e37eb62422f65ecc048511a8f256 (patch)
tree8165f61779632e5b5b2bd3510755b125b80d4623 /source4/include
parentbf75891495f3ea99fd6d10a521a7bd5a13f624f2 (diff)
downloadsamba-b98a5bf92222e37eb62422f65ecc048511a8f256.tar.gz
samba-b98a5bf92222e37eb62422f65ecc048511a8f256.tar.xz
samba-b98a5bf92222e37eb62422f65ecc048511a8f256.zip
r13243: Bring __FUNCTION__ checks across from Samba 3.
(This used to be commit 92eec049628a79f8d9496c6d199d6de0238e7940)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/debug.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/include/debug.h b/source4/include/debug.h
index 40d04766e1b..8ff937e7b93 100644
--- a/source4/include/debug.h
+++ b/source4/include/debug.h
@@ -18,6 +18,14 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+/* If we have these macros, we can add additional info to the header. */
+
+#ifdef HAVE_FUNCTION_MACRO
+#define FUNCTION_MACRO (__FUNCTION__)
+#else
+#define FUNCTION_MACRO ("")
+#endif
+
/* the debug operations structure - contains function pointers to
various debug implementations of each operation */
struct debug_ops {
@@ -44,7 +52,7 @@ extern int DEBUGLEVEL;
#define _DEBUG(level, body, header) do { \
if (DEBUGLVL(level)) { \
if (header) { \
- do_debug_header(level, __location__, __FUNCTION__); \
+ do_debug_header(level, __location__, FUNCTION_MACRO); \
} \
do_debug body; \
} \