2022年11月15日(火) 9:04 Henry Bent <henry.r.b...@gmail.com>: > In bash-5.2.9 if HAVE_SELECT is set but HAVE_PSELECT is not, we still need > the "fd_set readfds;" at line 808 in lib/readline/input.c. Found on Tru64 > 5.1.
This seems to be reported repeatedly for different lines in the source code. https://lists.gnu.org/archive/html/bug-bash/2021-05/msg00088.html https://lists.gnu.org/archive/html/bug-bash/2021-06/msg00160.html I think someone needs to finally check the fixed version actually compiles in a real Tru64 machine. I attach a possible patch [202211-0044.HAVE_PSELECT-in-True64.patch] but haven't tested it in Tru64, so I'm not sure if this is all. > This > is because the Tru64 linker will still produce an executable and return > true even if the executable contains unresolved symbols. I'm not > immediately sure of a fix for that one. I guess that should be fixed at the side of autoconf. I thought the configure script in the distributed version of Bash might be old so checked it, but it is actually generated by the latest version of autoconf-2.71 (2021-01). This can be a regression of autoconf because these STRTO* tests seem to have existed for at least twenty years (according to git blame config.h.in) and bash seems to have worked in Tru64 for this period. Maybe you could try an older version of autoconf (e.g. 2.69) to regenerate the configure script. -- Koichi
From 3c0d445ee514a7068e5b634e8ea531c19f8a3d68 Mon Sep 17 00:00:00 2001 From: Koichi Murase <myoga.mur...@gmail.com> Date: Tue, 15 Nov 2022 11:32:01 +0900 Subject: [PATCH] fix for HAVE_PSELECT in Tru64 https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html --- lib/readline/input.c | 2 +- lib/sh/input_avail.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/readline/input.c b/lib/readline/input.c index da4da455..1ec31805 100644 --- a/lib/readline/input.c +++ b/lib/readline/input.c @@ -250,7 +250,7 @@ rl_gather_tyi (void) register int tem, result; int chars_avail, k; char input; -#if defined(HAVE_SELECT) +#if defined (HAVE_PSELECT) || defined(HAVE_SELECT) fd_set readfds, exceptfds; struct timeval timeout; #endif diff --git a/lib/sh/input_avail.c b/lib/sh/input_avail.c index 2ac44616..f31798f3 100644 --- a/lib/sh/input_avail.c +++ b/lib/sh/input_avail.c @@ -107,10 +107,8 @@ nchars_avail (fd, nchars) int nchars; { int result, chars_avail; -#if defined(HAVE_SELECT) - fd_set readfds, exceptfds; -#endif #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + fd_set readfds, exceptfds; sigset_t set, oset; #endif -- 2.37.2