Implement suppressions for leak checks, which is a fairly frequently
asked-for feature.

A leak-check suppression looks like any other, and has the name 'Leak':

{
   example-leak-suppression
   Memcheck,Addrcheck:Leak
   fun:malloc
   fun:foo
   fun:main
}

Fitting this into the core/skin split proved very tricky.  Problem is
we want to scan the suppressions list to find Leak suppressions, but

- The core code can't do it because LeakSupp is a skin-specific
  suppression kind.

- The skin code can't do it because most (all) of the types and
  structures for the suppressions are private to the core.

Eventual "solution" (least-worst thing I could think of) is for the
skins using the leak checker to pass it the value of LeakSupp.
Even that isn't really clean because the skins consider it a value
of type MemCheckSuppKind but the core thinks it must be a
CoreSuppKind, and the two are not to be reconciled.  So I kludged
around this by casting it to a UInt.

Nick, perhaps you know some way to smooth this out?

Apart from that all changes are straightforward.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1390 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/mc_common.c b/memcheck/mc_common.c
index e90a3ae..f3e5548 100644
--- a/memcheck/mc_common.c
+++ b/memcheck/mc_common.c
@@ -377,7 +377,7 @@
 #define STREQ(s1,s2) (s1 != NULL && s2 != NULL \
                       && VG_(strcmp)((s1),(s2))==0)
 
-extern Bool SK_(error_matches_suppression)(Error* err, Supp* su)
+Bool SK_(error_matches_suppression)(Error* err, Supp* su)
 {
    UInt su_size;
    MemCheckError* err_extra = VG_(get_error_extra)(err);
@@ -681,6 +681,7 @@
    }
 }
 
+
 /*--------------------------------------------------------------------*/
 /*--- end                                              mc_common.c ---*/
 /*--------------------------------------------------------------------*/