[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

From: Testing Purposes
Subject: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)
Date: Mon, 7 Dec 2020 18:15:51 -0500

Configuration Information [Automatically generated, do not change]:
Machine: aarch64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux raspberrypi 5.4.72-v8+ #1356 SMP PREEMPT Thu Oct 22
13:58:52 BST 2020 aarch64 G$
Machine Type: aarch64-unknown-linux-gnu

Bash Version: 5.1
Patch Level: 0
Release Status: release

        I just built Bash 5.1 upon its official release today — December 7,
2020.  To confirm the version of readline that's bundled with Bash 5.1, I
ran "gdb bash" and entered "print /x (int) rl_readline_version".  I get
"0x801" as the output.  If I do the same thing with Bash 5.0, I get "0x800".

I believe these values represent readline 8.1 and 8.0, respectively.
However, readline's online documentation at
https://tiswww.case.edu/php/chet/readline/readline.html#SEC25 — and the
"rltech.texi" file in the source code — both indicate that the version code
format should be slightly different:

readline.h defines a C preprocessor variable that should be treated as an
integer, RL_READLINE_VERSION, which may be used to conditionally compile
application code depending on the installed Readline version. The value is
a hexadecimal encoding of the major and minor version numbers of the
library, of the form 0xMMmm. MM is the two-digit major version number; mm
is the two-digit minor version number. For Readline 4.2, for example, the
value of RL_READLINE_VERSION would be 0x0402.

If the version number for readline follows the "0xMMmm" format, shouldn't
the value of "rl_readline_version" be "0x0801" for Bash 5.1 and "0x0800"
for Bash 5.0?  In other words, the "leading 0" after the "x" appears to be

I'm not sure if this is a bug — or if it's an artifact of using gdb to
extract readline's version information.  If it is an artifact, is there a
better way to determine the bundled version of readline that comes with

Thanks, Chet, for your outstanding work!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]