While working to import Readline 8.1 into GDB, I found a bug that can
easily be reproduced with a mingw build on Linux.
Configure with --host=i686-w64-mingw32.
You'll have to install various mingw tools first; this is easily done on
Fedora though as they are all packaged there.
Make fails:
../master/signals.c: In function '_rl_handle_signal':
../master/signals.c:270:2: warning: implicit declaration of function
'sigprocmask' [-Wimplicit-function-declaration]
270 | sigprocmask (SIG_BLOCK, &set, &oset);
| ^~~~~~~~~~~
../master/signals.c:270:15: error: 'SIG_BLOCK' undeclared (first use in this
function); did you mean 'SIG_ACK'?
270 | sigprocmask (SIG_BLOCK, &set, &oset);
| ^~~~~~~~~
| SIG_ACK
[...]
The appended patch seems to fix the problem.
Tom
diff --git a/signals.c b/signals.c
index f9174ab..8fedc37 100644
--- a/signals.c
+++ b/signals.c
@@ -266,8 +266,10 @@ _rl_handle_signal (int sig)
case SIGQUIT:
#endif
+#if defined (HAVE_POSIX_SIGNALS)
if (block_sig)
sigprocmask (SIG_BLOCK, &set, &oset);
+#endif
rl_echo_signal_char (sig);
rl_cleanup_after_signal ();