-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Recently I’ve pulled changes from SDL 1.2 trunk and there is problem
with SDL_Quit.
It looks like this (here is snippet):
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
ifdef HAVE_SIGACTION
struct sigaction action;
sigaction(SIGINT, NULL, &action);
if ( action.sa_handler == SIG_DFL && action.sa_sigaction ==
(void*)SIG_DFL ) {
action.sa_handler = SDL_HandleSIG;
sigaction(SIGINT, &action, NULL);
}
sigaction(SIGTERM, NULL, &action);
if ( action.sa_handler == SIG_DFL && action.sa_sigaction ==
(void*)SIG_DFL ) {
action.sa_handler = SDL_HandleSIG;
sigaction(SIGTERM, &action, NULL);
}
The problem is that compiler complains that action struct doesn’t have
member ‘sa_sigaction’, so lines:
if ( action.sa_handler == SIG_DFL && action.sa_sigaction ==
(void*)SIG_DFL )
and
if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL )
break the build.
Someone has told me that sa_sigaction required by POSIX, but it also
says: "The storage occupied by sa_handler and sa_sigaction may overlap,
and a conforming application shall not use both simultaneously."
And sa_sigaction field is only valid if the SA_SIGINFO flag is set, and
it never equals (void*)SIG_DFL in that case.
So it looks like an error for me.
I’m using gcc 4.3.2.
P.S. How can I obtain write access to Mercurial SDL 1.2 branch. I wrote
two weeks ago to feedback address from the main page, but I didn’t
received any reply yet.
Regards,
Pawel Goralski
@Pawel_Goralski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJOHIUhAAoJEBDLM06eKs6dvYsH/RmLFceo5aCcdOrDYUSRzo7R
bGl8nYiM2MGMx8OaMCB6KagC+aO5ejBBOJDfsnjee6jGa6ateyybJsiElZKIIHDw
3eyOaEdVklUFXRpHpTq1EWzyA4+DAKbggbFbpy/HJ21j2icH8W+Ju1F/sGQzvP2M
IA4cRdWiL/tNzBpabpbpIHMQVpWawMJ4d9b7AsHzw/1uejil/ja4kmb1UTi504hq
RJSlxZ0jSk0lAWLjHAbp+67C1bc/3zfLWRKF1wMfsXndVB5ZtR1yEWWobmMXOApA
cbGeiqVsLapIcT87oRZPV487nvw4LlVvG2j5QBHWxx7Xy5QPAdp3RlLmrjH2opA=
=fw2S
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2844 bytes
Desc: Kryptograficzna sygnatura S/MIME
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110712/77d45541/attachment.bin