Wed Jul 14 07:47:23 2021 UTC ()
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


(christos)
diff -r1.69 -r1.70 src/lib/libedit/tty.c

cvs diff -r1.69 -r1.70 src/lib/libedit/tty.c (expand / switch to context diff)
--- src/lib/libedit/tty.c 2020/05/31 23:24:23 1.69
+++ src/lib/libedit/tty.c 2021/07/14 07:47:23 1.70
@@ -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