-static void
-memory_fault_handler(int signal, siginfo_t *siginfo, void *void_context)
-{
- /* The way that we extract low level information like the fault
- * address is not specified by POSIX. */
-#if defined __FreeBSD__
- void *fault_addr = siginfo->si_addr;
-#elif defined __OpenBSD__
- void *fault_addr = siginfo->si_addr;
-#else
-#error unsupported BSD variant
-#endif
- if (!gencgc_handle_wp_violation(fault_addr)) {
- interrupt_handle_now(signal, siginfo, void_context);
- }
-}
-void
-os_install_interrupt_handlers(void)
-{
-#if defined __FreeBSD__
- interrupt_install_low_level_handler(SIGBUS, memory_fault_handler);
-#elif defined __OpenBSD__
- interrupt_install_low_level_handler(SIGSEGV, memory_fault_handler);
-#else
-#error unsupported BSD variant
-#endif
-}
-
-#endif /* !defined GENCGC */
-
-/* feh!
- *
- * DL_WORKAROUND enables "stubbing" of various functions from libc et
- * al. This is necessary when using dynamic linking in FreeBSD, as the
- * symbols in the dynamic libraries will not have known addresses (in
- * sbcl.nm).
- *
- * FIXME: This flag should be set in Config.bsd */
-#define DL_WORKAROUND 1