talloc: include valgrind headers if available
authorStefan Metzmacher <metze@samba.org>
Mon, 4 Apr 2011 14:28:31 +0000 (16:28 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 8 Apr 2011 07:28:10 +0000 (09:28 +0200)
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
lib/talloc/talloc.c

index b640159c195c1415cccd43831a4774c4f463827b..6f952dcdffbc5a9fc14d7b9e02932beb840053c0 100644 (file)
 #endif
 #endif
 
+/* Special macros that are no-ops except when run under Valgrind on
+ * x86.  They've moved a little bit from valgrind 1.0.4 to 1.9.4 */
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+        /* memcheck.h includes valgrind.h */
+#include <valgrind/memcheck.h>
+#elif defined(HAVE_VALGRIND_H)
+#include <valgrind.h>
+#endif
+
 /* use this to force every realloc to change the pointer, to stress test
    code that might not cope */
 #define ALWAYS_REALLOC 0