added SA_SIGINFO to sa_flags when sa_sigaction is used

This commit is contained in:
cebix 2000-10-08 18:41:35 +00:00
parent ff892aaf57
commit 3c2e4f8c06
3 changed files with 6 additions and 5 deletions

View File

@ -318,6 +318,7 @@ AC_CACHE_CHECK("whether your system supports extended signal handlers",
AC_LANG_CPLUSPLUS
AC_TRY_RUN([
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/mman.h>
@ -332,7 +333,7 @@ AC_CACHE_CHECK("whether your system supports extended signal handlers",
int main()
{ if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
struct sigaction sa; sa.sa_sigaction = segfault_handler; sa.sa_flags = 0;
struct sigaction sa; sa.sa_sigaction = segfault_handler; sa.sa_flags = SA_SIGINFO;
sigaction(SIGSEGV, &sa, 0);
mem[0] = 0;
exit(1); // should not be reached
@ -372,7 +373,7 @@ if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
{ if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
struct sigaction sa; sa.sa_flags = 0;
sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
sigaction(SIGSEGV, &sa, 0);
mem[0] = 0;
exit(1); // should not be reached
@ -383,7 +384,7 @@ if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
)
AC_LANG_RESTORE
])
AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
fi
;;
esac

View File

@ -290,7 +290,7 @@ static bool Screen_fault_handler_init()
// Setup SIGSEGV handler to process writes to frame buffer
sigemptyset(&vosf_sa.sa_mask);
vosf_sa.sa_sigaction = Screen_fault_handler;
vosf_sa.sa_flags = 0;
vosf_sa.sa_flags = SA_SIGINFO;
return (sigaction(SIGSEGV, &vosf_sa, NULL) == 0);
}
#elif defined(HAVE_SIGCONTEXT_SUBTERFUGE)

View File

@ -703,7 +703,7 @@ static bool init_xf86_dga(int width, int height)
the_buffer = (uint8 *)allocate_framebuffer(the_buffer_size);
memset(the_buffer, 0, the_buffer_size);
}
#elif ENABLE_VOSF
#elif defined(ENABLE_VOSF)
// The UAE memory handlers will already handle color conversion, if needed.
use_vosf = false;
#endif