Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
4b70200b
Commit
4b70200b
authored
Jul 20, 2011
by
Ryan C. Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work on systems without sa_sigaction.
parent
1a862ae6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
configure.in
configure.in
+2
-0
SDL_config.h.in
include/SDL_config.h.in
+1
-0
SDL_quit.c
src/events/SDL_quit.c
+9
-0
No files found.
configure.in
View file @
4b70200b
...
...
@@ -236,6 +236,8 @@ if test x$enable_libc = xyes; then
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
AC_CHECK_FUNCS(iconv)
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE(HAVE_SA_SIGACTION)], ,[#include <signal.h>])
fi
AC_CHECK_SIZEOF(void*)
...
...
include/SDL_config.h.in
View file @
4b70200b
...
...
@@ -139,6 +139,7 @@
#undef HAVE_SINF
#undef HAVE_SQRT
#undef HAVE_SIGACTION
#undef HAVE_SA_SIGACTION
#undef HAVE_SETJMP
#undef HAVE_NANOSLEEP
#undef HAVE_SYSCONF
...
...
src/events/SDL_quit.c
View file @
4b70200b
...
...
@@ -49,12 +49,21 @@ 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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment