Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit Via Jess Thrysoee, from Adrian Bunk: Fix libedit...



details:   https://anonhg.NetBSD.org/src/rev/fc86489dfcab
branches:  trunk
changeset: 1022356:fc86489dfcab
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 14 07:47:23 2021 +0000

description:
Via Jess Thrysoee, from Adrian Bunk: Fix libedit build on Linux/Alpha
Alpha is the only Linux architecture that has SIGINFO:
    https://sources.debian.org/src/manpages/5.10-1/man7/signal.7/#L522

But even on Alpha Ctrl-T is not supported, and therefore no VSTATUS:
    https://sources.debian.org/src/manpages/5.10-1/man3/termios.3/#L603-L608

For consistency check both signal existence and character existence

diffstat:

 lib/libedit/tty.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r f3916fbbfe40 -r fc86489dfcab lib/libedit/tty.c
--- a/lib/libedit/tty.c Wed Jul 14 07:34:16 2021 +0000
+++ b/lib/libedit/tty.c Wed Jul 14 07:47:23 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.c,v 1.69 2020/05/31 23:24:23 christos Exp $        */
+/*     $NetBSD: tty.c,v 1.70 2021/07/14 07:47:23 christos Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)tty.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: tty.c,v 1.69 2020/05/31 23:24:23 christos Exp $");
+__RCSID("$NetBSD: tty.c,v 1.70 2021/07/14 07:47:23 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -1350,19 +1350,19 @@
                return -1;
 #endif
        switch (sig) {
-#ifdef SIGINT
+#if defined(SIGINT) && defined(VINTR)
        case SIGINT:
                return el->el_tty.t_c[ED_IO][VINTR];
 #endif
-#ifdef SIGQUIT
+#if defined(SIGQUIT) && defined(VQUIT)
        case SIGQUIT:
                return el->el_tty.t_c[ED_IO][VQUIT];
 #endif
-#ifdef SIGINFO
+#if defined(SIGINFO) && defined(VSTATUS)
        case SIGINFO:
                return el->el_tty.t_c[ED_IO][VSTATUS];
 #endif
-#ifdef SIGTSTP
+#if defined(SIGTSTP) && defined(VSUSP)
        case SIGTSTP:
                return el->el_tty.t_c[ED_IO][VSUSP];
 #endif



Home | Main Index | Thread Index | Old Index