aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-02 13:42:37 -0700
committerTom Tromey <tom@tromey.com>2021-03-02 13:42:37 -0700
commit19a918553721d68a742929295d6a34ce3266d3c1 (patch)
treeb8ea1ee8639de600e3d543bfd54a95581a01a15e
parentb4f26d541aa7224b70d363932e816e6e1a857633 (diff)
downloadgdb-19a918553721d68a742929295d6a34ce3266d3c1.zip
gdb-19a918553721d68a742929295d6a34ce3266d3c1.tar.gz
gdb-19a918553721d68a742929295d6a34ce3266d3c1.tar.bz2
Fix Readline 8.1 build on mingw
The mingw build fails with Readline 8.1, because sigprocmask is called unconditionally. This patch adds the missing check for HAVE_POSIX_SIGNALS. I reported this upstream here: https://lists.gnu.org/archive/html/bug-readline/2021-01/msg00011.html readline/ChangeLog 2021-03-02 Tom Tromey <tom@tromey.com> * readline/signals.c (_rl_handle_signal): Add missing check for HAVE_POSIX_SIGNALS.
-rw-r--r--readline/ChangeLog5
-rw-r--r--readline/readline/signals.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/readline/ChangeLog b/readline/ChangeLog
index 4961f99..2f89aad 100644
--- a/readline/ChangeLog
+++ b/readline/ChangeLog
@@ -1,5 +1,10 @@
2021-03-02 Tom Tromey <tom@tromey.com>
+ * readline/signals.c (_rl_handle_signal): Add missing check for
+ HAVE_POSIX_SIGNALS.
+
+2021-03-02 Tom Tromey <tom@tromey.com>
+
* Import readline 8.1.
2020-06-30 Tom Tromey <tom@tromey.com>
diff --git a/readline/readline/signals.c b/readline/readline/signals.c
index f9174ab8a..8fedc37 100644
--- a/readline/readline/signals.c
+++ b/readline/readline/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 ();