mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 21:26:41 -05:00
Check sa_sigaction member of struct sigaction
--HG-- branch : SDL-1.2
This commit is contained in:
@@ -185,6 +185,8 @@ if test x$enable_libc = xyes; then
|
||||
|
||||
AC_CHECK_LIB(iconv, libiconv_open, [EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
||||
AC_CHECK_LIB(m, pow, [EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
|
||||
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE(HAVE_SA_SIGACTION)], ,[#include <signal.h>])
|
||||
fi
|
||||
|
||||
if test x$have_inttypes != xyes; then
|
||||
|
||||
@@ -48,12 +48,20 @@ int SDL_QuitInit(void)
|
||||
#ifdef HAVE_SIGACTION
|
||||
struct sigaction action;
|
||||
sigaction(SIGINT, NULL, &action);
|
||||
# ifdef HAVE_SA_SIGACTION
|
||||
if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
|
||||
# else
|
||||
if ( action.sa_handler == SIG_DFL ) {
|
||||
# endif
|
||||
action.sa_handler = SDL_HandleSIG;
|
||||
sigaction(SIGINT, &action, NULL);
|
||||
}
|
||||
sigaction(SIGTERM, NULL, &action);
|
||||
# ifdef HAVE_SA_SIGACTION
|
||||
if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
|
||||
# else
|
||||
if ( action.sa_handler == SIG_DFL ) {
|
||||
# endif
|
||||
action.sa_handler = SDL_HandleSIG;
|
||||
sigaction(SIGTERM, &action, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user