src/events/SDL_quit.c
changeset 5501 f48c1e0ca9ae
parent 5493 a8849b1193c3
child 5535 96594ac5fd1a
equal deleted inserted replaced
5499:2b8e6d1e3817 5501:f48c1e0ca9ae
    48 SDL_QuitInit(void)
    48 SDL_QuitInit(void)
    49 {
    49 {
    50 #ifdef HAVE_SIGACTION
    50 #ifdef HAVE_SIGACTION
    51     struct sigaction action;
    51     struct sigaction action;
    52     sigaction(SIGINT, NULL, &action);
    52     sigaction(SIGINT, NULL, &action);
    53     if ( action.sa_handler == SIG_DFL && action.sa_sigaction == SIG_DFL ) {
    53     if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
    54         action.sa_handler = SDL_HandleSIG;
    54         action.sa_handler = SDL_HandleSIG;
    55         sigaction(SIGINT, &action, NULL);
    55         sigaction(SIGINT, &action, NULL);
    56     }
    56     }
    57     sigaction(SIGTERM, NULL, &action);
    57     sigaction(SIGTERM, NULL, &action);
    58     if ( action.sa_handler == SIG_DFL && action.sa_sigaction == SIG_DFL ) {
    58     if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
    59         action.sa_handler = SDL_HandleSIG;
    59         action.sa_handler = SDL_HandleSIG;
    60         sigaction(SIGTERM, &action, NULL);
    60         sigaction(SIGTERM, &action, NULL);
    61     }
    61     }
    62 #elif HAVE_SIGNAL_H
    62 #elif HAVE_SIGNAL_H
    63     void (*ohandler) (int);
    63     void (*ohandler) (int);