From 732ef44992c7a5a6b4dd74ea5e5ddaab18bb1b86 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 23 Dec 2008 00:58:15 +0100 Subject: [PATCH] Make c-stack work on Haiku. --- ChangeLog | 9 +++++++++ lib/c-stack.c | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cbd0f5ed1b..e027a6ae76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-12-22 Ingo Weinhold (tiny change) + Eric Blake + Paolo Bonzini + Bruno Haible + + Make c-stack work on Haiku. + * lib/c-stack.c (SA_ONSTACK): Define fallback. + (c_stack_action): Use SA_ONSTACK flag. + 2008-12-22 Bruno Haible * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8): Treat Haiku like BeOS. diff --git a/lib/c-stack.c b/lib/c-stack.c index ae300af0f7..023f8479ae 100644 --- a/lib/c-stack.c +++ b/lib/c-stack.c @@ -82,6 +82,9 @@ typedef struct sigaltstack stack_t; # define SIGACTION_WORKS 1 #else # define SIGACTION_WORKS 0 +# ifndef SA_ONSTACK +# define SA_ONSTACK 0 +# endif #endif extern char *program_name; @@ -317,7 +320,7 @@ c_stack_action (void (*action) (int)) act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO; act.sa_sigaction = segv_handler; # else - act.sa_flags = SA_NODEFER | SA_RESETHAND; + act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND; act.sa_handler = die; # endif -- 2.30.2