OSDN Git Service

2004-07-21 Frank Ch. Eigler <fche@redhat.com>
[pf3gnuchains/gcc-fork.git] / libmudflap / mf-runtime.h.in
index 7b0467b..afb04a5 100644 (file)
@@ -15,12 +15,18 @@ typedef unsigned long uintptr_t;
 #endif
 
 
-/* Global declarations used by instrumentation. */
-
+/* Global declarations used by instrumentation.  When _MUDFLAP is
+   defined, these have been auto-declared by the compiler and we
+   should not declare them again (ideally we *would* declare them
+   again, to verify that the compiler's declarations match the
+   library's, but the C++ front end has no mechanism for allowing
+   the re-definition of a structure type).  */
+#ifndef _MUDFLAP
 struct __mf_cache { uintptr_t low; uintptr_t high; };
 extern struct __mf_cache __mf_lookup_cache [];
 extern uintptr_t __mf_lc_mask;
 extern unsigned char __mf_lc_shift;
+#endif
 
 /* Multithreading support.  */
 #ifdef _MUDFLAPTH
@@ -55,7 +61,8 @@ extern void __mf_check (void *ptr, size_t sz, int type, const char *location)
        __attribute((nothrow));
 extern void __mf_register (void *ptr, size_t sz, int type, const char *name) 
        __attribute((nothrow));
-extern void __mf_unregister (void *ptr, size_t sz) __attribute((nothrow));
+extern void __mf_unregister (void *ptr, size_t sz, int type)
+       __attribute((nothrow));
 extern unsigned __mf_watch (void *ptr, size_t sz);
 extern unsigned __mf_unwatch (void *ptr, size_t sz);
 extern void __mf_report ();