-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange-ness with SIGINFO and SIGWINCH #30
Comments
Furthermore, why is the handling of these two signals so very different from the more commonly used ones in I suspect that since these were never used (because of the |
A couple of options here:
I kind of like the last option. |
It seems these two signals have not been working since at least 2009. Detection of these signals seems to have never been added to the configure.ac script and the code guarded by #ifdef then bit-rotted (the idiom used to handle these signals seems to have been abandoned for something simpler/better in 2009). This fix simply handles these signals the same way the other signals are handled in System/Posix/Signals.hsc. Closes: haskell#30
When working on building an x86_64-linux to aarch64-linux cross compiler, I got the error:
which I do not get when building a native compiler. The problems here are as follows:
SIGWINCH
not definedThe above
foreign import
statement is enclosed in an#ifdef
like this:but the
SIGWINCH
identifier is never defined, because no-one ever added it to the list os signals to look for inconfigure.ac
(the same is true forSIGINFO
).CPP not working correctly during cross-compiling
However, with
SIGWINCH
undefined, the parser should have dropped that line completely. Since there is no warning on native compiles, this suggests the CPP is not working correctly during cross compiling. Obviously not a problem to be fixed in theunix
package, but a contributor to even finding the other problems here.The
#ifdef
is not correct.The current configure script, when it finds a signal
SIGXXXX
definesCONST_SIGXXXX
so the#ifdef
should be using that instead of the bare signal name.Detecting
SIGINFO
not working correctly.If I update
configure.ac
to detect these two signals (on Linux), I get the following in the fileinclude/HsUnixConfig.h
:The value for
SIGWINCH
is fine, but the value forSIGINFO
is not. It turns out thatSIGINFO
is a BSD-ism that is not available on Linux. Theconfigure.ac
detection code needs to be fixed to leaveCONST_SIGINFO
undefined on platforms whereSIGINFO
does not exist.The text was updated successfully, but these errors were encountered: