7 Bug-Reported-by: Henry Bent <henry.r.bent@gmail.com>
8 Bug-Reference-ID: <CAEdTPBdD0WOW2n0-y-XyZ_VwhbiG-oS3bXfGkOPPG617rGH-Ww@mail.gmail.com>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html
13 There are systems that supply one of select or pselect, but not both.
15 Patch (apply with `patch -p0'):
17 https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00058.html
19 *** ../bash/bash-5.2-patched/lib/readline/input.c 2022-04-08 15:43:24.000000000 -0400
20 --- lib/readline/input.c 2022-11-16 09:10:41.000000000 -0500
24 int _rl_timeout_init (void);
25 int _rl_timeout_sigalrm_handler (void);
26 + #if defined (RL_TIMEOUT_USE_SELECT)
27 int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *);
30 static void _rl_timeout_handle (void);
35 ! #if defined(HAVE_SELECT)
36 fd_set readfds, exceptfds;
37 struct timeval timeout;
41 ! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
42 fd_set readfds, exceptfds;
43 struct timeval timeout;
48 ! #if defined (HAVE_PSELECT)
54 ! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
57 *** ../bash-5.2-patched/lib/sh/input_avail.c 2021-05-24 11:16:33.000000000 -0400
58 --- lib/sh/input_avail.c 2022-11-16 09:12:48.000000000 -0500
61 #endif /* HAVE_SYS_FILE_H */
63 ! #if defined (HAVE_PSELECT)
64 ! # include <signal.h>
67 #if defined (HAVE_UNISTD_H)
69 #endif /* HAVE_SYS_FILE_H */
73 #if defined (HAVE_UNISTD_H)
77 int result, chars_avail;
78 - #if defined(HAVE_SELECT)
79 - fd_set readfds, exceptfds;
81 #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
86 int result, chars_avail;
87 #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
88 + fd_set readfds, exceptfds;
95 ! #if defined (HAVE_SELECT)
98 FD_SET (fd, &readfds);
99 FD_SET (fd, &exceptfds);
101 - #if defined (HAVE_SELECT) || defined (HAVE_PSELECT)
102 sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
107 ! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
109 FD_ZERO (&exceptfds);
110 FD_SET (fd, &readfds);
111 FD_SET (fd, &exceptfds);
112 sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
115 *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
116 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
119 looks for to find the patch level (for the sccs version string). */
121 ! #define PATCHLEVEL 34
123 #endif /* _PATCHLEVEL_H_ */
125 looks for to find the patch level (for the sccs version string). */
127 ! #define PATCHLEVEL 35
129 #endif /* _PATCHLEVEL_H_ */