src/events/SDL_quit.c
branchSDL-1.2
changeset 5565 4225f09eb8cb
parent 5500 27348c0ae529
child 6137 4720145f848b
     1.1 --- a/src/events/SDL_quit.c	Wed Jul 13 17:36:29 2011 -0700
     1.2 +++ b/src/events/SDL_quit.c	Thu Jul 14 15:40:07 2011 +0200
     1.3 @@ -48,12 +48,20 @@
     1.4  #ifdef HAVE_SIGACTION
     1.5  	struct sigaction action;
     1.6  	sigaction(SIGINT, NULL, &action);
     1.7 +#  ifdef HAVE_SA_SIGACTION
     1.8  	if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
     1.9 +#  else
    1.10 +	if ( action.sa_handler == SIG_DFL ) {
    1.11 +#  endif
    1.12  		action.sa_handler = SDL_HandleSIG;
    1.13  		sigaction(SIGINT, &action, NULL);
    1.14  	}
    1.15  	sigaction(SIGTERM, NULL, &action);
    1.16 +#  ifdef HAVE_SA_SIGACTION
    1.17  	if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
    1.18 +#  else
    1.19 +	if ( action.sa_handler == SIG_DFL ) {
    1.20 +#  endif
    1.21  		action.sa_handler = SDL_HandleSIG;
    1.22  		sigaction(SIGTERM, &action, NULL);
    1.23  	}