Module Name: src Committed By: christos Date: Wed Jul 14 07:47:23 UTC 2021
Modified Files: src/lib/libedit: tty.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/lib/libedit/tty.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/tty.c diff -u src/lib/libedit/tty.c:1.69 src/lib/libedit/tty.c:1.70 --- src/lib/libedit/tty.c:1.69 Sun May 31 19:24:23 2020 +++ src/lib/libedit/tty.c Wed Jul 14 03:47:23 2021 @@ -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 @@ tty_get_signal_character(EditLine *el, i 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