* checksums.c [CHECKSUMS] (GC_record_fault): Do not define unless
MPROTECT_VDB and not DARWIN.
* os_dep.c [MPROTECT_VDB && CHECKSUMS] (GC_record_fault): Do not
declare if DARWIN.
STATIC size_t GC_n_faulted = 0;
-void GC_record_fault(struct hblk * h)
-{
+#if defined(MPROTECT_VDB) && !defined(DARWIN)
+ void GC_record_fault(struct hblk * h)
+ {
word page = (word)h & ~(GC_page_size - 1);
GC_ASSERT(GC_page_size != 0);
if (GC_n_faulted >= NSUMS) ABORT("write fault log overflowed");
GC_faulted[GC_n_faulted++] = page;
-}
+ }
+#endif
STATIC GC_bool GC_was_faulted(struct hblk *h)
{
set_pht_entry_from_index(db, index)
#endif /* !THREADS */
-#ifdef CHECKSUMS
- void GC_record_fault(struct hblk * h); /* from checksums.c */
-#endif
-
#ifndef DARWIN
+# ifdef CHECKSUMS
+ void GC_record_fault(struct hblk * h); /* from checksums.c */
+# endif
+
# if !defined(MSWIN32) && !defined(MSWINCE)
# include <errno.h>
# if defined(FREEBSD) || defined(HURD) || defined(HPUX)