Fix Readline 8.1 build on mingw
authorTom Tromey <tom@tromey.com>
Tue, 2 Mar 2021 20:42:37 +0000 (13:42 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 2 Mar 2021 20:42:37 +0000 (13:42 -0700)
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.

readline/ChangeLog
readline/readline/signals.c

index 4961f999f109b5c7ffed098a8ada710e89975fb9..2f89aad7c83b4bb2be1c51f09d50306fa25c5c65 100644 (file)
@@ -1,3 +1,8 @@
+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.
index f9174ab8a0149a1a078553715643da4f49d20fef..8fedc370a1ae05890b7b128a6515f0dfa3b5885a 100644 (file)
@@ -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 ();