How to compile/ use signals on the Interix platform? I am unable to get it to compile because Interix appears to be non-POSIX compliant, at least in its implementation of signal.h
.
If anyone has found a way to work around this and allow code with signals to compile on Interix, please do let me know how!
Thanks.
Legacy software in C, C++, and is built on Linux and Interix (for Win XP).
Am getting the following errors during compilation, on Interix only; not on Linux, after adding pthread
and signal
code. Cannot use pthreads
without signals because conflicts with Xmotif (compiles but crashes at run time).
errors due to struct differences:
`struct siginfo' has no member named `si_value'
aggregate `sigval val' has incomplete type and cannot be defined
`struct sigaction' has no member named `sa_sigaction'
errors due to undeclared:
`sigqueue' undeclared
`SA_NODEFER' undeclared
`SA_SIGINFO' undeclared
http://www.mail-archive.com/[email protected]/msg10425.html
http://www.gnu.org/software/hello/manual/gnulib/signal_002eh.html
http://en.wikipedia.org/wiki/Interix
http://www.opengroup.org/susv3xbd/signal.h.html
According to the POSIX specification, there struct sigaction
has no member sa_sigaction
, it has sa_handler
.
POSIX: http://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html
Interix: http://www.suacommunity.com/man/2/sigaction.2.html
Interix is POSIX compliant in the case, the code you are porting is not.
Note that Linux can be made to work with sa_handler
.
You may be able to get it work using the correct #DEFINE
s though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With