changeset 5759:cdcabd2311e1

readline: Add upstream patch. * src/readline-0-001.patch: Add upstream patch (reformatted to apply in MXE): ftp://ftp.gnu.org/pub/gnu/readline/readline-8.1-patches * dist-files.mk: Include new file in list.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 13 May 2021 11:22:34 +0200
parents e54cda12b8c9
children baeb0900fdf7
files dist-files.mk src/readline-0-001-upstream.patch
diffstat 2 files changed, 87 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Tue Apr 27 09:25:27 2021 -0400
+++ b/dist-files.mk	Thu May 13 11:22:34 2021 +0200
@@ -635,6 +635,7 @@
   qwtplot3d.mk \
   rapidjson-1-prettywriter.patch \
   rapidjson.mk \
+  readline-0-001-upstream.patch \
   readline-1-display.patch \
   readline-1-fixes.patch \
   readline-1-input.patch \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/readline-0-001-upstream.patch	Thu May 13 11:22:34 2021 +0200
@@ -0,0 +1,86 @@
+			   READLINE PATCH REPORT
+			   =====================
+
+Readline-Release: 8.1
+Patch-ID: readline81-001
+
+Bug-Reported-by:	Tom Tromey <tom@tromey.com>
+Bug-Reference-ID:	<875z3u9fd0.fsf@tromey.com>
+Bug-Reference-URL:	https://lists.gnu.org/archive/html/bug-readline/2021-01/msg00009.html
+
+Bug-Description:
+
+The code to check readline versions in an inputrc file had the sense of the
+comparisons reversed.
+
+diff -ur a/input.c b/input.c
+--- a/bind.c	2020-10-26 10:03:14.000000000 -0400
++++ b/bind.c	2021-01-18 16:38:48.000000000 -0500
+@@ -1235,5 +1235,5 @@
+   else if (_rl_strnicmp (args, "version", 7) == 0)
+     {
+-      int rlversion, versionarg, op, previ, major, minor;
++       int rlversion, versionarg, op, previ, major, minor, opresult;
+ 
+       _rl_parsing_conditionalized_out = 1;
+@@ -1295,22 +1295,23 @@
+ 	{
+ 	case OP_EQ:
+-	  _rl_parsing_conditionalized_out = rlversion == versionarg;
++	  opresult = rlversion == versionarg;
+ 	  break;
+ 	case OP_NE:
+-	  _rl_parsing_conditionalized_out = rlversion != versionarg;
++	  opresult = rlversion != versionarg;
+ 	  break;
+ 	case OP_GT:
+-	  _rl_parsing_conditionalized_out = rlversion > versionarg;
++	  opresult = rlversion > versionarg;
+ 	  break;
+ 	case OP_GE:
+-	  _rl_parsing_conditionalized_out = rlversion >= versionarg;
++	  opresult = rlversion >= versionarg;
+ 	  break;
+ 	case OP_LT:
+-	  _rl_parsing_conditionalized_out = rlversion < versionarg;
++	  opresult = rlversion < versionarg;
+ 	  break;
+ 	case OP_LE:
+-	  _rl_parsing_conditionalized_out = rlversion <= versionarg;
++	  opresult = rlversion <= versionarg;
+ 	  break;
+ 	}
++       _rl_parsing_conditionalized_out = 1 - opresult;
+     }
+   /* Check to see if the first word in ARGS is the same as the
+
+- 	  _rl_parsing_conditionalized_out = rlversion > versionarg;
++ 	  opresult = rlversion > versionarg;
+  	  break;
+  	case OP_GE:
+- 	  _rl_parsing_conditionalized_out = rlversion >= versionarg;
++ 	  opresult = rlversion >= versionarg;
+  	  break;
+  	case OP_LT:
+- 	  _rl_parsing_conditionalized_out = rlversion < versionarg;
++ 	  opresult = rlversion < versionarg;
+  	  break;
+  	case OP_LE:
+- 	  _rl_parsing_conditionalized_out = rlversion <= versionarg;
++ 	  opresult = rlversion <= versionarg;
+  	  break;
+  	}
++      _rl_parsing_conditionalized_out = 1 - opresult;
+      }
+    /* Check to see if the first word in ARGS is the same as the
+
+diff -ur a/patchlevel b/patchlevel
+--- a/patchlevel	2013-11-15 08:11:11.000000000 -0500
++++ b/patchlevel	2014-03-21 08:28:40.000000000 -0400
+***************
+@@ -1,3 +1,3 @@
+ # Do not edit -- exists only for use by patch
+ 
+-0
++1
+