[binutils-gdb] Fix Readline 8.1 build on mingw

Tom Tromey tromey@sourceware.org
Tue Mar 2 20:48:29 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=19a918553721d68a742929295d6a34ce3266d3c1

commit 19a918553721d68a742929295d6a34ce3266d3c1
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Mar 2 13:42:37 2021 -0700

    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.

Diff:
---
 readline/ChangeLog          | 5 +++++
 readline/readline/signals.c | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/readline/ChangeLog b/readline/ChangeLog
index 4961f999f10..2f89aad7c83 100644
--- a/readline/ChangeLog
+++ b/readline/ChangeLog
@@ -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.
diff --git a/readline/readline/signals.c b/readline/readline/signals.c
index f9174ab8a01..8fedc370a1a 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 ();


More information about the Gdb-cvs mailing list