diff options
author | Martin Pool <mbp@samba.org> | 2003-03-13 06:18:18 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2003-03-13 06:18:18 +0000 |
commit | 197f98aededbb456951be2d0d7f8ac587006a60d (patch) | |
tree | 0eabde2aec37316e314f04f40df6c8a6f055b79f /source3 | |
parent | 9951cca72fcbba4d4f93ac0e30bab2e4f54487f5 (diff) | |
download | samba-197f98aededbb456951be2d0d7f8ac587006a60d.tar.gz samba-197f98aededbb456951be2d0d7f8ac587006a60d.tar.bz2 samba-197f98aededbb456951be2d0d7f8ac587006a60d.zip |
In Valgrind 1.9.4, the headers have moved to <valgrind/valgrind.h>,
etc. So check for that as well as the old names when including macros
and conditionally defining -DVALGRIND.
(This used to be commit c9151c7b1113e2f01bd33d4dd301a2e7e2040b35)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/includes.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index b6abdd99ce..25245e9c0c 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -433,15 +433,19 @@ #include <com_err.h> #endif -#if HAVE_VALGRIND_H -/* Special macros that are no-ops except when run under Valgrind on x86. */ +/* 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 */ +#if HAVE_VALGRIND_MEMCHECK_H + /* memcheck.h includes valgrind.h */ +#include <valgrind/memcheck.h> +#elif HAVE_VALGRIND_H #include <valgrind.h> #endif /* If we have --enable-developer and the valgrind header is present, * then we're OK to use it. Set a macro so this logic can be done only * once. */ -#if defined(DEVELOPER) && HAVE_VALGRIND_H +#if defined(DEVELOPER) && (HAVE_VALGRIND_H || HAVE_VALGRIND_VALGRIND_H) #define VALGRIND #endif |