Skip to content

Commit

Permalink
readline: 001 patch added
Browse files Browse the repository at this point in the history
  • Loading branch information
Furniel committed May 28, 2021
1 parent 1b94741 commit 69b9626
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
92 changes: 92 additions & 0 deletions patches/readline/readline81-001.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
READLINE PATCH REPORT
=====================

Readline-Release: 8.1
Patch-ID: readline81-001

Bug-Reported-by: Tom Tromey <[email protected]>
Bug-Reference-ID: <[email protected]>
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.

Patch (apply with `patch -p0'):

*** ../readline-8.1-patched/bind.c 2020-10-26 10:03:14.000000000 -0400
--- bind.c 2021-01-18 16:38:48.000000000 -0500
***************
*** 1235,1239 ****
else if (_rl_strnicmp (args, "version", 7) == 0)
{
! int rlversion, versionarg, op, previ, major, minor;

_rl_parsing_conditionalized_out = 1;
--- 1235,1239 ----
else if (_rl_strnicmp (args, "version", 7) == 0)
{
! int rlversion, versionarg, op, previ, major, minor, opresult;

_rl_parsing_conditionalized_out = 1;
***************
*** 1295,1316 ****
{
case OP_EQ:
! _rl_parsing_conditionalized_out = rlversion == versionarg;
break;
case OP_NE:
! _rl_parsing_conditionalized_out = rlversion != versionarg;
break;
case OP_GT:
! _rl_parsing_conditionalized_out = rlversion > versionarg;
break;
case OP_GE:
! _rl_parsing_conditionalized_out = rlversion >= versionarg;
break;
case OP_LT:
! _rl_parsing_conditionalized_out = rlversion < versionarg;
break;
case OP_LE:
! _rl_parsing_conditionalized_out = rlversion <= versionarg;
break;
}
}
/* Check to see if the first word in ARGS is the same as the
--- 1295,1317 ----
{
case OP_EQ:
! opresult = rlversion == versionarg;
break;
case OP_NE:
! opresult = rlversion != versionarg;
break;
case OP_GT:
! opresult = rlversion > versionarg;
break;
case OP_GE:
! opresult = rlversion >= versionarg;
break;
case OP_LT:
! opresult = rlversion < versionarg;
break;
case OP_LE:
! opresult = rlversion <= versionarg;
break;
}
+ _rl_parsing_conditionalized_out = 1 - opresult;
}
/* Check to see if the first word in ARGS is the same as the

*** ../readline-8.1/patchlevel 2013-11-15 08:11:11.000000000 -0500
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
***************
*** 1,3 ****
# Do not edit -- exists only for use by patch

! 0
--- 1,3 ----
# Do not edit -- exists only for use by patch

! 1
1 change: 1 addition & 0 deletions scripts/readline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ PKG_PRIORITY=extra
#

PKG_PATCHES=(
readline/readline81-001.patch
readline/Fixed-missing-POSIX_SIGNALS-check.patch
)

Expand Down

0 comments on commit 69b9626

Please sign in to comment.