Reinstated Memcheck.  Did the full merge from CVS, except for the
user-specified block stuff, which confused me because I wasn't sure whether
to use the code already in SVN, or the code in CVS.  Perhaps that code
doesn't need to be changed.

Unfortunately, Memcheck doesn't work entirely correctly -- I get some
spurious errors.  Nonetheless I'm checking it in as a starting point.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3353 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/mac_needs.c b/memcheck/mac_needs.c
index 28a828e..d005388 100644
--- a/memcheck/mac_needs.c
+++ b/memcheck/mac_needs.c
@@ -839,7 +839,7 @@
    init_prof_mem();
 }
 
-void MAC_(common_fini)(void (*leak_check)(LeakCheckMode mode))
+void MAC_(common_fini)(void (*leak_check)(ThreadId tid, LeakCheckMode mode))
 {
    MAC_(print_malloc_stats)();
 
@@ -852,7 +852,7 @@
                    "For counts of detected errors, rerun with: -v");
    }
    if (MAC_(clo_leak_check) != LC_Off)
-      (*leak_check)(MAC_(clo_leak_check));
+      leak_check(1/*bogus ThreadId*/, MAC_(clo_leak_check));
 
    done_prof_mem();
 }