# undef MPROTECT_VDB
#endif
+#ifndef SA_SIGINFO
+# define NO_SA_SIGACTION
+#endif
+
+#if defined(NO_SA_SIGACTION) && defined(MPROTECT_VDB) && !defined(DARWIN) \
+ && !defined(MSWIN32) && !defined(MSWINCE)
+# undef MPROTECT_VDB
+#endif
+
#if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB) \
&& !defined(GWW_VDB) && !defined(MANUAL_VDB) \
&& !defined(GC_DISABLE_INCREMENTAL)
STATIC void GC_suspend_handler_inner(ptr_t sig_arg, void *context);
-#ifdef SA_SIGINFO
+#ifndef NO_SA_SIGACTION
STATIC void GC_suspend_handler(int sig, siginfo_t * info GC_ATTR_UNUSED,
void * context GC_ATTR_UNUSED)
#else
# else
/* We believe that in all other cases the full context is already */
/* in the signal handler frame. */
-# ifndef SA_SIGINFO
+# ifdef NO_SA_SIGACTION
void *context = 0;
# endif
GC_suspend_handler_inner((ptr_t)(word)sig, context);
# else
act.sa_flags = 0
# endif
-# ifdef SA_SIGINFO
+# ifndef NO_SA_SIGACTION
| SA_SIGINFO
# endif
;
GC_remove_allowed_signals(&act.sa_mask);
/* GC_sig_thr_restart is set in the resulting mask. */
/* It is unmasked by the handler when necessary. */
-# ifdef SA_SIGINFO
+# ifndef NO_SA_SIGACTION
act.sa_sigaction = GC_suspend_handler;
# else
act.sa_handler = GC_suspend_handler;
ABORT("Cannot set SIG_SUSPEND handler");
}
-# ifdef SA_SIGINFO
+# ifndef NO_SA_SIGACTION
act.sa_flags &= ~SA_SIGINFO;
# endif
act.sa_handler = GC_restart_handler;