comparison src/readline-0-001-upstream.patch @ 6516:5ef7d51c2195

readline: Update to version 8.2-001. * src/readline.mk: Update version and checksum. * src/readline-0-001-upstream.patch: Upstream patch re-formatted to apply in MXE Octave. See: https://ftp.gnu.org/pub/gnu/readline/readline-8.2-patches/readline82-001 * src/readline-0-002-upstream.patch: Remove upstream patch for previous version. * src/readline-1-input.patch, src/readline-1-sigwinch.patch: Update patches. * src/readline-3-fd_set.patch: Add patch to guard functions that use types that aren't available on Windows. * src/gdb-1-readline-8.2.patch: Cherry-pick upstream patch. * dist-files.mk: Update files in list.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 12 Nov 2022 17:00:41 +0100
parents baeb0900fdf7
children a76f513700df
comparison
equal deleted inserted replaced
6515:efc41d530cff 6516:5ef7d51c2195
1 READLINE PATCH REPORT 1 READLINE PATCH REPORT
2 ===================== 2 =====================
3 3
4 Readline-Release: 8.1 4 Readline-Release: 8.2
5 Patch-ID: readline81-001 5 Patch-ID: readline82-001
6 6
7 Bug-Reported-by: Tom Tromey <tom@tromey.com> 7 Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
8 Bug-Reference-ID: <875z3u9fd0.fsf@tromey.com> 8 Bug-Reference-ID:
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2021-01/msg00009.html 9 Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
10 10
11 Bug-Description: 11 Bug-Description:
12 12
13 The code to check readline versions in an inputrc file had the sense of the 13 Starting a readline application with an invalid locale specification for
14 comparisons reversed. 14 LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline.
15 15
16 diff -ur a/input.c b/input.c 16 diff -ur a/nls.c b/nls.c
17 --- a/bind.c 2020-10-26 10:03:14.000000000 -0400 17 --- a/nls.c 2022-08-15 09:38:51.000000000 -0400
18 +++ b/bind.c 2021-01-18 16:38:48.000000000 -0500 18 +++ b/nls.c 2021-01-18 2022-10-05 09:23:22.000000000 -0400
19 @@ -1235,5 +1235,5 @@ 19 @@ -142,4 +142,8 @@
20 else if (_rl_strnicmp (args, "version", 7) == 0) 20 lspec = "";
21 { 21 ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
22 - int rlversion, versionarg, op, previ, major, minor; 22 + if (ret == 0 || *ret == 0)
23 + int rlversion, versionarg, op, previ, major, minor, opresult; 23 + ret = setlocale (LC_CTYPE, (char *)NULL);
24 24 + if (ret == 0 || *ret == 0)
25 _rl_parsing_conditionalized_out = 1; 25 + ret = RL_DEFAULT_LOCALE;
26 @@ -1295,22 +1295,23 @@ 26 #else
27 { 27 ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
28 case OP_EQ:
29 - _rl_parsing_conditionalized_out = rlversion == versionarg;
30 + opresult = rlversion == versionarg;
31 break;
32 case OP_NE:
33 - _rl_parsing_conditionalized_out = rlversion != versionarg;
34 + opresult = rlversion != versionarg;
35 break;
36 case OP_GT:
37 - _rl_parsing_conditionalized_out = rlversion > versionarg;
38 + opresult = rlversion > versionarg;
39 break;
40 case OP_GE:
41 - _rl_parsing_conditionalized_out = rlversion >= versionarg;
42 + opresult = rlversion >= versionarg;
43 break;
44 case OP_LT:
45 - _rl_parsing_conditionalized_out = rlversion < versionarg;
46 + opresult = rlversion < versionarg;
47 break;
48 case OP_LE:
49 - _rl_parsing_conditionalized_out = rlversion <= versionarg;
50 + opresult = rlversion <= versionarg;
51 break;
52 }
53 + _rl_parsing_conditionalized_out = 1 - opresult;
54 }
55 /* Check to see if the first word in ARGS is the same as the
56 28
57 diff -ur a/patchlevel b/patchlevel 29 diff -ur a/patchlevel b/patchlevel
58 --- a/patchlevel 2013-11-15 08:11:11.000000000 -0500 30 --- a/patchlevel 2013-11-15 08:11:11.000000000 -0500
59 +++ b/patchlevel 2014-03-21 08:28:40.000000000 -0400 31 +++ b/patchlevel 2014-03-21 08:28:40.000000000 -0400
60 *************** 32 ***************