Check for VALGRIND_RESIZEINPLACE_BLOCK support

Mike Hommey mh+jemalloc at glandium.org
Mon Apr 30 06:15:15 PDT 2012


From: Mike Hommey <mh at glandium.org>

VALGRIND_RESIZEINPLACE_BLOCK was added in valgrind 3.7. Unfortunately, the
__VALGRIND_MINOR__ macro still says 6 in 3.7 :(
---
 configure.ac |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 500e21c..fe45a98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -841,10 +841,7 @@ if test "x$enable_valgrind" = "x1" ; then
 #include <valgrind/valgrind.h>
 #include <valgrind/memcheck.h>
 
-#if defined(__VALGRIND_MAJOR__) && defined(__VALGRIND_MINOR__)		\
-    && (__VALGRIND_MAJOR__ > 3 || (__VALGRIND_MAJOR__ == 3 &&		\
-    __VALGRIND_MINOR__ >= 6))
-#else
+#if !defined(VALGRIND_RESIZEINPLACE_BLOCK)
 #  error "Incompatible Valgrind version"
 #endif
 ], [], [je_cv_valgrind])
-- 
1.7.10




More information about the jemalloc-discuss mailing list