@@ -42,6 +42,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="13">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>5.46</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="12">
|
||||
<Date>2024-12-05</Date>
|
||||
<Version>5.46</Version>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>GNU libraries and utilities for producing multi-lingual messages</Summary>
|
||||
<Description>The GNU gettext package provides a set of tools and documentation for producing multi-lingual messages in programs. Tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs, a runtime library which supports the retrieval of translated messages, and stand-alone programs for handling the translatable and the already translated strings. Gettext provides an easy to use library and tools for creating, using, and modifying natural language catalogs and is a powerful and simple method for internationalizing programs.</Description>
|
||||
<Archive sha1sum="750ea7d98fbf7dc73d7264f02711c3daaf60536b" type="targz">http://ftp.gnu.org/pub/gnu/gettext/gettext-0.24.2.tar.gz</Archive>
|
||||
<Archive sha1sum="303f56fa7f0acba9400b6e92afe2f9cdcf0ce8e7" type="targz">http://ftp.gnu.org/pub/gnu/gettext/gettext-0.26.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>acl-devel</Dependency>
|
||||
<Dependency>glib2-devel</Dependency>
|
||||
@@ -79,6 +79,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="23">
|
||||
<Date>2025-10-28</Date>
|
||||
<Version>0.26</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="22">
|
||||
<Date>2025-07-07</Date>
|
||||
<Version>0.24.2</Version>
|
||||
|
||||
@@ -145,6 +145,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="63">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>2.86.1</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="62">
|
||||
<Date>2025-10-22</Date>
|
||||
<Version>2.86.1</Version>
|
||||
|
||||
@@ -56,6 +56,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="12">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>3.5.2</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="11">
|
||||
<Date>2025-08-04</Date>
|
||||
<Version>3.5.2</Version>
|
||||
|
||||
@@ -32,7 +32,9 @@ CONFIGPARAMS = "--without-debug \
|
||||
--without-gpm"
|
||||
|
||||
def setup():
|
||||
shelltools.move("ncurses-*", "ncurses-6.4")
|
||||
shelltools.move("ncurses-*", "ncurses-6.5")
|
||||
|
||||
pisitools.cflags.add(" -std=gnu17")
|
||||
|
||||
shelltools.makedirs(NCURSES)
|
||||
shelltools.makedirs(NCURSESW)
|
||||
@@ -96,11 +98,11 @@ def install():
|
||||
pisitools.dosym("libncurses.a", "%s/libcurses.a" % LIB)
|
||||
|
||||
#for fix
|
||||
pisitools.dosym("libncursesw.so.6.4", "%s/libncursesw.so.5" % LIB)
|
||||
pisitools.dosym("libncursesw.so.6.5", "%s/libncursesw.so.5" % LIB)
|
||||
# pisitools.dosym("libncurses.so.6.4", "%s/libncurses.so.5" % LIB)
|
||||
pisitools.dosym("libpanelw.so.6.4", "%s/libpanelw.so.5" % LIB)
|
||||
pisitools.dosym("libformw.so.6.4", "%s/libformw.so.5" % LIB)
|
||||
pisitools.dosym("libmenuw.so.6.4", "%s/libmenuw.so.5" % LIB)
|
||||
pisitools.dosym("libpanelw.so.6.5", "%s/libpanelw.so.5" % LIB)
|
||||
pisitools.dosym("libformw.so.6.5", "%s/libformw.so.5" % LIB)
|
||||
pisitools.dosym("libmenuw.so.6.5", "%s/libmenuw.so.5" % LIB)
|
||||
|
||||
# shelltools.cd("../%s" % NCURSES)
|
||||
# for lib in ["ncurses", "form", "panel", "menu"]:
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Summary>Console display library</Summary>
|
||||
<Description>The NCurses is a library of functions that manage an application's display on character-cell terminals. The NCurses library defines many functions such as moving mouse and cursor, keyboard mapping and dispaying in color.</Description>
|
||||
<!-- <Archive sha1sum="bb5eb3f34b3ecd5bac8d0b58164b847f135b3d62" type="targz">mirrors://gnu/ncurses/ncurses-6.4.tar.gz</Archive> -->
|
||||
<Archive sha1sum="cb68a5d2404d9050bfaf46c586c24902207a4c01" type="targz">https://github.com/ThomasDickey/ncurses-snapshots/archive/refs/tags/v6_4_20240420.tar.gz</Archive>
|
||||
<Archive sha1sum="c2860a6dc25a74232a3241ccf3e119a8ba81d7ab" type="targz">https://github.com/ThomasDickey/ncurses-snapshots/archive/refs/tags/v6_5_20250802.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<!-- <Dependency>gnuconfig</Dependency> -->
|
||||
<!-- <Dependency>readline-devel</Dependency> -->
|
||||
@@ -68,6 +68,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="14">
|
||||
<Date>2025-10-29</Date>
|
||||
<Version>6.5</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="13">
|
||||
<Date>2024-06-03</Date>
|
||||
<Version>6.4</Version>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<Dependency versionFrom="2.0.0">libnsl-devel</Dependency>
|
||||
<Dependency>audit-devel</Dependency>
|
||||
<Dependency>libtirpc-devel</Dependency>
|
||||
<Dependency>libxcrypt-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">glibc.patch</Patch>
|
||||
@@ -35,7 +36,7 @@
|
||||
<Dependency>audit</Dependency>
|
||||
<Dependency>libnsl</Dependency>
|
||||
<Dependency>libtirpc</Dependency>
|
||||
<!-- <Dependency>libxcrypt</Dependency> -->
|
||||
<Dependency versionFrom="4.4.38">libxcrypt</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
@@ -71,6 +72,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="18">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>1.7.1</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="17">
|
||||
<Date>2025-06-18</Date>
|
||||
<Version>1.7.1</Version>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<Dependency versionFrom="6.2.23">db-devel</Dependency>
|
||||
<Dependency>gdbm-devel</Dependency>
|
||||
<Dependency>zlib-devel</Dependency>
|
||||
<Dependency>libxcrypt-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch>CVE-2016-2381_duplicate_env.diff</Patch> -->
|
||||
@@ -41,6 +42,7 @@
|
||||
<Dependency versionFrom="6.2.23">db</Dependency>
|
||||
<Dependency>gdbm</Dependency>
|
||||
<Dependency>zlib</Dependency>
|
||||
<Dependency versionFrom="4.4.38">libxcrypt</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
@@ -56,6 +58,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="12">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>5.40.2</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="11">
|
||||
<Date>2025-05-17</Date>
|
||||
<Version>5.40.2</Version>
|
||||
|
||||
@@ -34,7 +34,8 @@ def setup():
|
||||
|
||||
#os.system("echo -e '\033[0;36mBuilding Python\033[0m' ")
|
||||
|
||||
pisitools.cflags.add("-fwrapv -std=c17")
|
||||
# pisitools.cflags.add("-fwrapv -std=c++17")
|
||||
pisitools.cflags.add("-fwrapv -std=gnu17")
|
||||
|
||||
# no rpath
|
||||
pisitools.dosed("configure.ac", "-rpath \$\(LIBDIR\) ")
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<Dependency>ncurses-devel</Dependency>
|
||||
<Dependency versionFrom="1.1.1w">openssl-devel</Dependency>
|
||||
<Dependency>readline-devel</Dependency>
|
||||
<Dependency>libxcrypt-devel</Dependency>
|
||||
<Dependency versionFrom="2.32">glibc-devel</Dependency>
|
||||
<!-- Bootstrap -->
|
||||
<!-- Comment these deps when bootstrapping -->
|
||||
@@ -63,6 +64,7 @@
|
||||
<Dependency>ncurses</Dependency>
|
||||
<Dependency>openssl</Dependency>
|
||||
<Dependency>readline</Dependency>
|
||||
<Dependency versionFrom="4.4.38">libxcrypt</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
@@ -143,6 +145,13 @@
|
||||
</Package>-->
|
||||
|
||||
<History>
|
||||
<Update release="53">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>2.7.18</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="52">
|
||||
<Date>2025-10-15</Date>
|
||||
<Version>2.7.18</Version>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<Dependency>ncurses-devel</Dependency>
|
||||
<Dependency versionFrom="3.5.2">openssl-devel</Dependency>
|
||||
<Dependency>readline-devel</Dependency>
|
||||
<Dependency>libxcrypt-devel</Dependency>
|
||||
<Dependency>mpdecimal-devel</Dependency>
|
||||
<!--<Dependency>valgrind</Dependency>-->
|
||||
<!--<Dependency>tcl-devel</Dependency>-->
|
||||
@@ -51,6 +52,7 @@
|
||||
<Dependency>openssl</Dependency>
|
||||
<Dependency>readline</Dependency>
|
||||
<Dependency>mpdecimal</Dependency>
|
||||
<Dependency versionFrom="4.4.38">libxcrypt</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable" permanent="0">/usr/bin/p*</Path>
|
||||
@@ -132,6 +134,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="66">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>3.11.14</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="65">
|
||||
<Date>2025-10-16</Date>
|
||||
<Version>3.11.14</Version>
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-001
|
||||
|
||||
Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Starting a readline application with an invalid locale specification for
|
||||
LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400
|
||||
--- nls.c 2022-10-05 09:23:22.000000000 -0400
|
||||
***************
|
||||
*** 142,145 ****
|
||||
--- 142,149 ----
|
||||
lspec = "";
|
||||
ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
|
||||
+ if (ret == 0 || *ret == 0)
|
||||
+ ret = setlocale (LC_CTYPE, (char *)NULL);
|
||||
+ if (ret == 0 || *ret == 0)
|
||||
+ ret = RL_DEFAULT_LOCALE;
|
||||
#else
|
||||
ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
|
||||
|
||||
*** ../readline-8.2/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,48 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-002
|
||||
|
||||
Bug-Reported-by: srobertson@peratonlabs.com
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00049.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
It's possible for readline to try to zero out a line that's not null-
|
||||
terminated, leading to a memory fault.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400
|
||||
--- display.c 2022-12-13 13:11:22.000000000 -0500
|
||||
***************
|
||||
*** 2684,2692 ****
|
||||
|
||||
if (visible_line)
|
||||
! {
|
||||
! temp = visible_line;
|
||||
! while (*temp)
|
||||
! *temp++ = '\0';
|
||||
! }
|
||||
rl_on_new_line ();
|
||||
forced_display++;
|
||||
--- 2735,2740 ----
|
||||
|
||||
if (visible_line)
|
||||
! memset (visible_line, 0, line_size);
|
||||
!
|
||||
rl_on_new_line ();
|
||||
forced_display++;
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 1
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 2
|
||||
@@ -1,43 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-003
|
||||
|
||||
Bug-Reported-by: Stefan Klinger <readline-gnu.org@stefan-klinger.de>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-08/msg00018.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
The custom color prefix that readline uses to color possible completions
|
||||
must have a leading `.'.
|
||||
|
||||
*** ../readline-8.2-patched/colors.c 2021-12-08 11:38:25.000000000 -0500
|
||||
--- colors.c 2023-08-28 16:40:04.000000000 -0400
|
||||
***************
|
||||
*** 74,78 ****
|
||||
static void restore_default_color (void);
|
||||
|
||||
! #define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix"
|
||||
|
||||
COLOR_EXT_TYPE *_rl_color_ext_list = 0;
|
||||
--- 74,78 ----
|
||||
static void restore_default_color (void);
|
||||
|
||||
! #define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix"
|
||||
|
||||
COLOR_EXT_TYPE *_rl_color_ext_list = 0;
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 2
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 3
|
||||
@@ -1,65 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-004
|
||||
|
||||
Bug-Reported-by: Henry Bent <henry.r.bent@gmail.com>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
There are systems that supply one of select or pselect, but not both.
|
||||
|
||||
*** ../readline-8.2-patched/input.c 2022-04-08 15:43:24.000000000 -0400
|
||||
--- input.c 2022-11-28 09:41:08.000000000 -0500
|
||||
***************
|
||||
*** 152,156 ****
|
||||
--- 152,158 ----
|
||||
int _rl_timeout_init (void);
|
||||
int _rl_timeout_sigalrm_handler (void);
|
||||
+ #if defined (RL_TIMEOUT_USE_SELECT)
|
||||
int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *);
|
||||
+ #endif
|
||||
|
||||
static void _rl_timeout_handle (void);
|
||||
***************
|
||||
*** 249,253 ****
|
||||
int chars_avail, k;
|
||||
char input;
|
||||
! #if defined(HAVE_SELECT)
|
||||
fd_set readfds, exceptfds;
|
||||
struct timeval timeout;
|
||||
--- 251,255 ----
|
||||
int chars_avail, k;
|
||||
char input;
|
||||
! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
|
||||
fd_set readfds, exceptfds;
|
||||
struct timeval timeout;
|
||||
***************
|
||||
*** 806,810 ****
|
||||
unsigned char c;
|
||||
int fd;
|
||||
! #if defined (HAVE_PSELECT)
|
||||
sigset_t empty_set;
|
||||
fd_set readfds;
|
||||
--- 815,819 ----
|
||||
unsigned char c;
|
||||
int fd;
|
||||
! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
|
||||
sigset_t empty_set;
|
||||
fd_set readfds;
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 3
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 4
|
||||
@@ -1,50 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-005
|
||||
|
||||
Bug-Reported-by: Simon Marchi <simon.marchi@polymtl.ca>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00005.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
If an application is using readline in callback mode, and a signal arrives
|
||||
after readline checks for it in rl_callback_read_char() but before it
|
||||
restores the application's signal handlers, it won't get processed until the
|
||||
next time the application calls rl_callback_read_char(). Readline needs to
|
||||
check for and resend any pending signals after restoring the application's
|
||||
signal handlers.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/callback.c 2022-04-29 12:02:56.000000000 -0400
|
||||
--- callback.c 2022-10-11 10:59:06.000000000 -0400
|
||||
***************
|
||||
*** 116,120 ****
|
||||
do { \
|
||||
if (rl_persistent_signal_handlers == 0) \
|
||||
! rl_clear_signals (); \
|
||||
return; \
|
||||
} while (0)
|
||||
--- 116,123 ----
|
||||
do { \
|
||||
if (rl_persistent_signal_handlers == 0) \
|
||||
! { \
|
||||
! rl_clear_signals (); \
|
||||
! if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \
|
||||
! } \
|
||||
return; \
|
||||
} while (0)
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 4
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 5
|
||||
@@ -1,99 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-006
|
||||
|
||||
Bug-Reported-by: Tom de Vries <tdevries@suse.de>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00001.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
This is a variant of the same issue as the one fixed by patch 5. In this
|
||||
case, the signal arrives and is pending before readline calls rl_getc().
|
||||
When this happens, the pending signal will be handled by the loop, but may
|
||||
alter or destroy some state that the callback uses. Readline needs to treat
|
||||
this case the same way it would if a signal interrupts pselect/select, so
|
||||
compound operations like searches and reading numeric arguments get cleaned
|
||||
up properly.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/input.c 2022-12-22 16:15:48.000000000 -0500
|
||||
--- input.c 2023-01-10 11:53:45.000000000 -0500
|
||||
***************
|
||||
*** 812,816 ****
|
||||
rl_getc (FILE *stream)
|
||||
{
|
||||
! int result;
|
||||
unsigned char c;
|
||||
int fd;
|
||||
--- 812,816 ----
|
||||
rl_getc (FILE *stream)
|
||||
{
|
||||
! int result, ostate, osig;
|
||||
unsigned char c;
|
||||
int fd;
|
||||
***************
|
||||
*** 823,828 ****
|
||||
--- 823,842 ----
|
||||
while (1)
|
||||
{
|
||||
+ osig = _rl_caught_signal;
|
||||
+ ostate = rl_readline_state;
|
||||
+
|
||||
RL_CHECK_SIGNALS ();
|
||||
|
||||
+ #if defined (READLINE_CALLBACKS)
|
||||
+ /* Do signal handling post-processing here, but just in callback mode
|
||||
+ for right now because the signal cleanup can change some of the
|
||||
+ callback state, and we need to either let the application have a
|
||||
+ chance to react or abort some current operation that gets cleaned
|
||||
+ up by rl_callback_sigcleanup(). If not, we'll just run through the
|
||||
+ loop again. */
|
||||
+ if (osig != 0 && (ostate & RL_STATE_CALLBACK))
|
||||
+ goto postproc_signal;
|
||||
+ #endif
|
||||
+
|
||||
/* We know at this point that _rl_caught_signal == 0 */
|
||||
|
||||
***************
|
||||
*** 888,891 ****
|
||||
--- 902,908 ----
|
||||
|
||||
handle_error:
|
||||
+ osig = _rl_caught_signal;
|
||||
+ ostate = rl_readline_state;
|
||||
+
|
||||
/* If the error that we received was EINTR, then try again,
|
||||
this is simply an interrupted system call to read (). We allow
|
||||
***************
|
||||
*** 928,933 ****
|
||||
--- 945,959 ----
|
||||
#endif /* SIGALRM */
|
||||
|
||||
+ postproc_signal:
|
||||
+ /* POSIX says read(2)/pselect(2)/select(2) don't return EINTR for any
|
||||
+ reason other than being interrupted by a signal, so we can safely
|
||||
+ call the application's signal event hook. */
|
||||
if (rl_signal_event_hook)
|
||||
(*rl_signal_event_hook) ();
|
||||
+ #if defined (READLINE_CALLBACKS)
|
||||
+ else if (osig == SIGINT && (ostate & RL_STATE_CALLBACK) && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG)))
|
||||
+ /* just these cases for now */
|
||||
+ _rl_abort_internal ();
|
||||
+ #endif
|
||||
}
|
||||
}
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 5
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 6
|
||||
@@ -1,48 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-007
|
||||
|
||||
Bug-Reported-by: Kevin Pulo <kev@pulo.com.au>
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-11/msg00002.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
If readline is called with no prompt, it should display a newline if return
|
||||
is typed on an empty line. It should still suppress the final newline if
|
||||
return is typed on the last (empty) line of a multi-line command.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400
|
||||
--- display.c 2022-12-13 13:11:22.000000000 -0500
|
||||
***************
|
||||
*** 3342,3348 ****
|
||||
&last_face[_rl_screenwidth - 1 + woff], 1);
|
||||
}
|
||||
! _rl_vis_botlin = 0;
|
||||
! if (botline_length > 0 || _rl_last_c_pos > 0)
|
||||
rl_crlf ();
|
||||
fflush (rl_outstream);
|
||||
rl_display_fixed++;
|
||||
--- 3394,3400 ----
|
||||
&last_face[_rl_screenwidth - 1 + woff], 1);
|
||||
}
|
||||
! if ((_rl_vis_botlin == 0 && botline_length == 0) || botline_length > 0 || _rl_last_c_pos > 0)
|
||||
rl_crlf ();
|
||||
+ _rl_vis_botlin = 0;
|
||||
fflush (rl_outstream);
|
||||
rl_display_fixed++;
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 6
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 7
|
||||
@@ -1,77 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-008
|
||||
|
||||
Bug-Reported-by:
|
||||
Bug-Reference-ID:
|
||||
Bug-Reference-URL:
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Add missing prototypes for several function declarations.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/text.c Wed Oct 27 11:03:59 2021
|
||||
--- text.c Thu Nov 16 16:24:58 2023
|
||||
***************
|
||||
*** 1765,1770 ****
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
static int
|
||||
! _rl_char_search_callback (data)
|
||||
! _rl_callback_generic_arg *data;
|
||||
{
|
||||
_rl_callback_func = 0;
|
||||
--- 1765,1769 ----
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
static int
|
||||
! _rl_char_search_callback (_rl_callback_generic_arg *data)
|
||||
{
|
||||
_rl_callback_func = 0;
|
||||
*** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022
|
||||
--- bind.c Thu Nov 16 16:25:17 2023
|
||||
***************
|
||||
*** 1168,1174 ****
|
||||
|
||||
static int
|
||||
! parse_comparison_op (s, indp)
|
||||
! const char *s;
|
||||
! int *indp;
|
||||
{
|
||||
int i, peekc, op;
|
||||
--- 1168,1172 ----
|
||||
|
||||
static int
|
||||
! parse_comparison_op (const char *s, int *indp)
|
||||
{
|
||||
int i, peekc, op;
|
||||
*** ../readline-8.2-patched/rltty.c Fri Feb 18 11:14:22 2022
|
||||
--- rltty.c Thu Nov 16 16:25:36 2023
|
||||
***************
|
||||
*** 81,86 ****
|
||||
to get the tty settings. */
|
||||
static void
|
||||
! set_winsize (tty)
|
||||
! int tty;
|
||||
{
|
||||
#if defined (TIOCGWINSZ)
|
||||
--- 81,85 ----
|
||||
to get the tty settings. */
|
||||
static void
|
||||
! set_winsize (int tty)
|
||||
{
|
||||
#if defined (TIOCGWINSZ)
|
||||
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 7
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 8
|
||||
@@ -1,73 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-009
|
||||
|
||||
Bug-Reported-by: Stefan H. Holek <stefan@epy.co.at>
|
||||
Bug-Reference-ID: <50F8DA45-B7F3-4DE1-AB94-19AE42649CDC@epy.co.at>
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00021.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Fix issue where the directory name portion of the word to be completed (the
|
||||
part that is passed to opendir()) requires both tilde expansion and dequoting.
|
||||
Readline only performed tilde expansion in this case, so filename completion
|
||||
would fail.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/complete.c 2022-04-05 10:47:06.000000000 -0400
|
||||
--- complete.c 2022-10-26 15:08:51.000000000 -0400
|
||||
***************
|
||||
*** 2527,2531 ****
|
||||
xfree (dirname);
|
||||
dirname = temp;
|
||||
! tilde_dirname = 1;
|
||||
}
|
||||
|
||||
--- 2527,2532 ----
|
||||
xfree (dirname);
|
||||
dirname = temp;
|
||||
! if (*dirname != '~')
|
||||
! tilde_dirname = 1; /* indicate successful tilde expansion */
|
||||
}
|
||||
|
||||
***************
|
||||
*** 2546,2554 ****
|
||||
users_dirname = savestring (dirname);
|
||||
}
|
||||
! else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function)
|
||||
{
|
||||
! /* delete single and double quotes */
|
||||
xfree (dirname);
|
||||
! dirname = savestring (users_dirname);
|
||||
}
|
||||
directory = opendir (dirname);
|
||||
--- 2547,2560 ----
|
||||
users_dirname = savestring (dirname);
|
||||
}
|
||||
! else if (rl_completion_found_quote && rl_filename_dequoting_function)
|
||||
{
|
||||
! /* We already ran users_dirname through the dequoting function.
|
||||
! If tilde_dirname == 1, we successfully performed tilde expansion
|
||||
! on dirname. Now we need to reconcile those results. We either
|
||||
! just copy the already-dequoted users_dirname or tilde expand it
|
||||
! if we tilde-expanded dirname. */
|
||||
! temp = tilde_dirname ? tilde_expand (users_dirname) : savestring (users_dirname);
|
||||
xfree (dirname);
|
||||
! dirname = temp;
|
||||
}
|
||||
directory = opendir (dirname);
|
||||
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 8
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 9
|
||||
@@ -1,67 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-010
|
||||
|
||||
Bug-Reported-by: Martin Castillo <castilma@uni-bremen.de>
|
||||
Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de>
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Fix the case where text to be completed from the line buffer (quoted) is
|
||||
compared to the common prefix of the possible matches (unquoted) and the
|
||||
quoting makes the former appear to be longer than the latter. Readline
|
||||
assumes the match doesn't add any characters to the word and doesn't display
|
||||
multiple matches.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/complete.c Tue Apr 5 10:47:06 2022
|
||||
--- complete.c Sat Jan 7 14:19:45 2023
|
||||
***************
|
||||
*** 2032,2038 ****
|
||||
text = rl_copy_text (start, end);
|
||||
matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
|
||||
/* nontrivial_lcd is set if the common prefix adds something to the word
|
||||
being completed. */
|
||||
! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0;
|
||||
if (what_to_do == '!' || what_to_do == '@')
|
||||
tlen = strlen (text);
|
||||
--- 2038,2060 ----
|
||||
text = rl_copy_text (start, end);
|
||||
matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
|
||||
+ /* If TEXT contains quote characters, it will be dequoted as part of
|
||||
+ generating the matches, and the matches will not contain any quote
|
||||
+ characters. We need to dequote TEXT before performing the comparison.
|
||||
+ Since compare_match performs the dequoting, and we only want to do it
|
||||
+ once, we don't call compare_matches after dequoting TEXT; we call
|
||||
+ strcmp directly. */
|
||||
/* nontrivial_lcd is set if the common prefix adds something to the word
|
||||
being completed. */
|
||||
! if (rl_filename_completion_desired && rl_filename_quoting_desired &&
|
||||
! rl_completion_found_quote && rl_filename_dequoting_function)
|
||||
! {
|
||||
! char *t;
|
||||
! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character);
|
||||
! xfree (text);
|
||||
! text = t;
|
||||
! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
|
||||
! }
|
||||
! else
|
||||
! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
|
||||
if (what_to_do == '!' || what_to_do == '@')
|
||||
tlen = strlen (text);
|
||||
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 9
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 10
|
||||
@@ -1,75 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-011
|
||||
|
||||
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
|
||||
Bug-Reference-ID: <CAMu=BrqWa_iNkiEwchpFmtrUhFrAanOO8pjy7VCKqRKUvqdsbw@mail.gmail.com>
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-02/msg00075.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
Some systems (e.g., macOS) send signals early on in interactive initialization,
|
||||
so readline should retry a failed open of the init file.
|
||||
|
||||
*** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022
|
||||
--- bind.c Tue Apr 23 15:07:13 2024
|
||||
***************
|
||||
*** 979,987 ****
|
||||
int i, file;
|
||||
|
||||
! file = -1;
|
||||
! if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0))
|
||||
{
|
||||
if (file >= 0)
|
||||
close (file);
|
||||
return ((char *)NULL);
|
||||
}
|
||||
--- 969,986 ----
|
||||
int i, file;
|
||||
|
||||
! file = open (filename, O_RDONLY, 0666);
|
||||
! /* If the open is interrupted, retry once */
|
||||
! if (file < 0 && errno == EINTR)
|
||||
{
|
||||
+ RL_CHECK_SIGNALS ();
|
||||
+ file = open (filename, O_RDONLY, 0666);
|
||||
+ }
|
||||
+
|
||||
+ if ((file < 0) || (fstat (file, &finfo) < 0))
|
||||
+ {
|
||||
+ i = errno;
|
||||
if (file >= 0)
|
||||
close (file);
|
||||
+ errno = i;
|
||||
return ((char *)NULL);
|
||||
}
|
||||
***************
|
||||
*** 992,999 ****
|
||||
--- 991,1001 ----
|
||||
if (file_size != finfo.st_size || file_size + 1 < file_size)
|
||||
{
|
||||
+ i = errno;
|
||||
if (file >= 0)
|
||||
close (file);
|
||||
#if defined (EFBIG)
|
||||
errno = EFBIG;
|
||||
+ #else
|
||||
+ errno = i;
|
||||
#endif
|
||||
return ((char *)NULL);
|
||||
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 10
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 11
|
||||
@@ -1,93 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-012
|
||||
|
||||
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
|
||||
Bug-Reference-ID: <CAMu=BroaH+41uumYt89FPqt8Fsatj-d6mZzmPV2HZYjtcbvbvw@mail.gmail.com>
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-11/msg00019.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
If a user happens to bind do-lowercase-version to something that isn't a
|
||||
capital letter, so _rl_to_lower doesn't change anything and the result is
|
||||
still bound to do-lowercase-version, readline can recurse infinitely.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/readline.c Thu Aug 11 18:35:37 2022
|
||||
--- readline.c Fri Feb 2 12:05:36 2024
|
||||
***************
|
||||
*** 900,905 ****
|
||||
/* Special case rl_do_lowercase_version (). */
|
||||
if (func == rl_do_lowercase_version)
|
||||
! /* Should we do anything special if key == ANYOTHERKEY? */
|
||||
! return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map));
|
||||
|
||||
rl_executing_keymap = map;
|
||||
--- 912,926 ----
|
||||
/* Special case rl_do_lowercase_version (). */
|
||||
if (func == rl_do_lowercase_version)
|
||||
! {
|
||||
! /* Should we do anything special if key == ANYOTHERKEY? */
|
||||
! newkey = _rl_to_lower ((unsigned char)key);
|
||||
! if (newkey != key)
|
||||
! return (_rl_dispatch (newkey, map));
|
||||
! else
|
||||
! {
|
||||
! rl_ding (); /* gentle failure */
|
||||
! return 0;
|
||||
! }
|
||||
! }
|
||||
|
||||
rl_executing_keymap = map;
|
||||
***************
|
||||
*** 1110,1114 ****
|
||||
func = m[ANYOTHERKEY].function;
|
||||
if (type == ISFUNC && func == rl_do_lowercase_version)
|
||||
! r = _rl_dispatch (_rl_to_lower ((unsigned char)key), map);
|
||||
else if (type == ISFUNC)
|
||||
{
|
||||
--- 1131,1139 ----
|
||||
func = m[ANYOTHERKEY].function;
|
||||
if (type == ISFUNC && func == rl_do_lowercase_version)
|
||||
! {
|
||||
! int newkey = _rl_to_lower ((unsigned char)key);
|
||||
! /* check that there is actually a lowercase version to avoid infinite recursion */
|
||||
! r = (newkey != key) ? _rl_dispatch (newkey, map) : 1;
|
||||
! }
|
||||
else if (type == ISFUNC)
|
||||
{
|
||||
|
||||
*** ../readline-8.2-patched/isearch.c Thu Aug 11 18:35:37 2022
|
||||
--- isearch.c Fri Feb 2 12:05:36 2024
|
||||
***************
|
||||
*** 429,433 ****
|
||||
f = cxt->keymap[c].function;
|
||||
if (f == rl_do_lowercase_version)
|
||||
! f = cxt->keymap[_rl_to_lower (c)].function;
|
||||
}
|
||||
|
||||
--- 431,439 ----
|
||||
f = cxt->keymap[c].function;
|
||||
if (f == rl_do_lowercase_version)
|
||||
! {
|
||||
! f = cxt->keymap[_rl_to_lower (c)].function;
|
||||
! if (f == rl_do_lowercase_version)
|
||||
! f = rl_insert;
|
||||
! }
|
||||
}
|
||||
|
||||
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 11
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 12
|
||||
@@ -1,234 +0,0 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.2
|
||||
Patch-ID: readline82-013
|
||||
|
||||
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
|
||||
Bug-Reference-ID: <CAMu=Brrv5qKY6LPfw8PxqNXNO8rNsZo0Fb=BcFb-uHObWPqnrw@mail.gmail.
|
||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-04/msg00082.html
|
||||
|
||||
Bug-Description:
|
||||
|
||||
When readline is accumulating bytes until it reads a complete multibyte
|
||||
character, reading a byte that makes the multibyte character invalid can
|
||||
result in discarding the bytes in the partial character.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.2-patched/text.c Mon May 1 09:37:52 2023
|
||||
--- text.c Mon May 29 12:22:29 2023
|
||||
***************
|
||||
*** 86,90 ****
|
||||
rl_insert_text (const char *string)
|
||||
{
|
||||
! register int i, l;
|
||||
|
||||
l = (string && *string) ? strlen (string) : 0;
|
||||
--- 86,91 ----
|
||||
rl_insert_text (const char *string)
|
||||
{
|
||||
! register int i;
|
||||
! size_t l;
|
||||
|
||||
l = (string && *string) ? strlen (string) : 0;
|
||||
***************
|
||||
*** 705,709 ****
|
||||
/* Insert the character C at the current location, moving point forward.
|
||||
If C introduces a multibyte sequence, we read the whole sequence and
|
||||
! then insert the multibyte char into the line buffer. */
|
||||
int
|
||||
_rl_insert_char (int count, int c)
|
||||
--- 706,714 ----
|
||||
/* Insert the character C at the current location, moving point forward.
|
||||
If C introduces a multibyte sequence, we read the whole sequence and
|
||||
! then insert the multibyte char into the line buffer.
|
||||
! If C == 0, we immediately insert any pending partial multibyte character,
|
||||
! assuming that we have read a character that doesn't map to self-insert.
|
||||
! This doesn't completely handle characters that are part of a multibyte
|
||||
! character but map to editing functions. */
|
||||
int
|
||||
_rl_insert_char (int count, int c)
|
||||
***************
|
||||
*** 719,727 ****
|
||||
#endif
|
||||
|
||||
if (count <= 0)
|
||||
return 0;
|
||||
|
||||
! #if defined (HANDLE_MULTIBYTE)
|
||||
! if (MB_CUR_MAX == 1 || rl_byte_oriented)
|
||||
{
|
||||
incoming[0] = c;
|
||||
--- 724,749 ----
|
||||
#endif
|
||||
|
||||
+ #if !defined (HANDLE_MULTIBYTE)
|
||||
if (count <= 0)
|
||||
return 0;
|
||||
+ #else
|
||||
+ if (count < 0)
|
||||
+ return 0;
|
||||
+ if (count == 0)
|
||||
+ {
|
||||
+ if (pending_bytes_length == 0)
|
||||
+ return 0;
|
||||
+ if (stored_count <= 0)
|
||||
+ stored_count = count;
|
||||
+ else
|
||||
+ count = stored_count;
|
||||
|
||||
! memcpy (incoming, pending_bytes, pending_bytes_length);
|
||||
! incoming[pending_bytes_length] = '\0';
|
||||
! incoming_length = pending_bytes_length;
|
||||
! pending_bytes_length = 0;
|
||||
! memset (&ps, 0, sizeof (mbstate_t));
|
||||
! }
|
||||
! else if (MB_CUR_MAX == 1 || rl_byte_oriented)
|
||||
{
|
||||
incoming[0] = c;
|
||||
***************
|
||||
*** 731,734 ****
|
||||
--- 753,759 ----
|
||||
else if (_rl_utf8locale && (c & 0x80) == 0)
|
||||
{
|
||||
+ if (pending_bytes_length)
|
||||
+ _rl_insert_char (0, 0);
|
||||
+
|
||||
incoming[0] = c;
|
||||
incoming[1] = '\0';
|
||||
***************
|
||||
*** 765,769 ****
|
||||
incoming_length = 1;
|
||||
pending_bytes_length--;
|
||||
! memmove (pending_bytes, pending_bytes + 1, pending_bytes_length);
|
||||
/* Clear the state of the byte sequence, because in this case the
|
||||
effect of mbstate is undefined. */
|
||||
--- 790,795 ----
|
||||
incoming_length = 1;
|
||||
pending_bytes_length--;
|
||||
! if (pending_bytes_length)
|
||||
! memmove (pending_bytes, pending_bytes + 1, pending_bytes_length);
|
||||
/* Clear the state of the byte sequence, because in this case the
|
||||
effect of mbstate is undefined. */
|
||||
***************
|
||||
*** 828,832 ****
|
||||
--- 854,862 ----
|
||||
xfree (string);
|
||||
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ return (pending_bytes_length != 0);
|
||||
+ #else
|
||||
return 0;
|
||||
+ #endif
|
||||
}
|
||||
|
||||
***************
|
||||
*** 861,864 ****
|
||||
--- 891,896 ----
|
||||
incoming_length = 0;
|
||||
stored_count = 0;
|
||||
+
|
||||
+ return (pending_bytes_length != 0);
|
||||
#else /* !HANDLE_MULTIBYTE */
|
||||
char str[TEXT_COUNT_MAX+1];
|
||||
***************
|
||||
*** 874,880 ****
|
||||
count -= decreaser;
|
||||
}
|
||||
- #endif /* !HANDLE_MULTIBYTE */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- 906,912 ----
|
||||
count -= decreaser;
|
||||
}
|
||||
|
||||
return 0;
|
||||
+ #endif /* !HANDLE_MULTIBYTE */
|
||||
}
|
||||
|
||||
***************
|
||||
*** 904,910 ****
|
||||
stored_count = 0;
|
||||
}
|
||||
! #endif
|
||||
!
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- 936,944 ----
|
||||
stored_count = 0;
|
||||
}
|
||||
!
|
||||
! return (pending_bytes_length != 0);
|
||||
! #else
|
||||
return 0;
|
||||
+ #endif
|
||||
}
|
||||
|
||||
***************
|
||||
*** 984,987 ****
|
||||
--- 1018,1026 ----
|
||||
}
|
||||
|
||||
+ /* If we didn't insert n and there are pending bytes, we need to insert
|
||||
+ them if _rl_insert_char didn't do that on its own. */
|
||||
+ if (r == 1 && rl_insert_mode == RL_IM_INSERT)
|
||||
+ r = _rl_insert_char (0, 0); /* flush partial multibyte char */
|
||||
+
|
||||
if (n != (unsigned short)-2) /* -2 = sentinel value for having inserted N */
|
||||
{
|
||||
***************
|
||||
*** 1055,1058 ****
|
||||
--- 1094,1099 ----
|
||||
rl_quoted_insert (int count, int key)
|
||||
{
|
||||
+ int r;
|
||||
+
|
||||
/* Let's see...should the callback interface futz with signal handling? */
|
||||
#if defined (HANDLE_SIGNALS)
|
||||
***************
|
||||
*** 1073,1085 ****
|
||||
if (count < 0)
|
||||
{
|
||||
- int r;
|
||||
-
|
||||
do
|
||||
r = _rl_insert_next (1);
|
||||
while (r == 0 && ++count < 0);
|
||||
- return r;
|
||||
}
|
||||
|
||||
! return _rl_insert_next (count);
|
||||
}
|
||||
|
||||
--- 1114,1128 ----
|
||||
if (count < 0)
|
||||
{
|
||||
do
|
||||
r = _rl_insert_next (1);
|
||||
while (r == 0 && ++count < 0);
|
||||
}
|
||||
+ else
|
||||
+ r = _rl_insert_next (count);
|
||||
|
||||
! if (r == 1)
|
||||
! _rl_insert_char (0, 0); /* insert partial multibyte character */
|
||||
!
|
||||
! return r;
|
||||
}
|
||||
|
||||
|
||||
*** ../readline-8.2/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
|
||||
|
||||
! 12
|
||||
--- 1,3 ----
|
||||
# Do not edit -- exists only for use by patch
|
||||
|
||||
! 13
|
||||
@@ -0,0 +1,64 @@
|
||||
READLINE PATCH REPORT
|
||||
=====================
|
||||
|
||||
Readline-Release: 8.3
|
||||
Patch-ID: readline83-001
|
||||
|
||||
Bug-Reported-by: Dmitri A. Sergatskov <dasergatskov@gmail.com>
|
||||
Bug-Reference-ID: <CAO+XyQ+ipUzFiXvRrDbTstfm1heZrerjvZGVaC60y=txMgyP+g@mail.gmail.com>
|
||||
Bug-Reference-URL:
|
||||
|
||||
Bug-Description:
|
||||
|
||||
If an application uses readline's event hook, it is called while waiting for
|
||||
input. There is a bug in the function that waits for available input that
|
||||
causes it not to read that input under certain circumstances, resulting in
|
||||
a loop where the event hook continues to be called, but there is no input
|
||||
to stop it.
|
||||
|
||||
Patch (apply with `patch -p0'):
|
||||
|
||||
*** ../readline-8.3/input.c Fri May 2 09:29:05 2025
|
||||
--- input.c Tue Jul 8 15:37:13 2025
|
||||
***************
|
||||
*** 262,266 ****
|
||||
tty = fileno (rl_instream);
|
||||
|
||||
! /* Move this up here to give it first shot, but it can't set chars_avail */
|
||||
/* XXX - need rl_chars_available_hook? */
|
||||
if (rl_input_available_hook)
|
||||
--- 262,267 ----
|
||||
tty = fileno (rl_instream);
|
||||
|
||||
! /* Move this up here to give it first shot, but it can't set chars_avail,
|
||||
! so we assume a single character is available. */
|
||||
/* XXX - need rl_chars_available_hook? */
|
||||
if (rl_input_available_hook)
|
||||
***************
|
||||
*** 269,272 ****
|
||||
--- 270,275 ----
|
||||
if (result == 0)
|
||||
result = -1;
|
||||
+ else
|
||||
+ chars_avail = 1;
|
||||
}
|
||||
|
||||
***************
|
||||
*** 286,289 ****
|
||||
--- 289,293 ----
|
||||
if (result <= 0)
|
||||
return 0; /* Nothing to read. */
|
||||
+ result = -1; /* there is something, so check how many chars below */
|
||||
}
|
||||
#endif
|
||||
*** ../readline-8.3/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
|
||||
@@ -12,24 +12,12 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>Another cute console display library</Summary>
|
||||
<Description>The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.</Description>
|
||||
<Archive sha1sum="97ad98be243a857b639c0f3da2fe7d81c6d1d36e" type="targz">mirrors://gnu/readline/readline-8.2.tar.gz</Archive>
|
||||
<Archive sha1sum="2c05ae9350b695f69d70b47f17f092611de2081f" type="targz">mirrors://gnu/readline/readline-8.3.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>ncurses-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>readline82-001.patch</Patch>
|
||||
<Patch>readline82-002.patch</Patch>
|
||||
<Patch>readline82-003.patch</Patch>
|
||||
<Patch>readline82-004.patch</Patch>
|
||||
<Patch>readline82-005.patch</Patch>
|
||||
<Patch>readline82-006.patch</Patch>
|
||||
<Patch>readline82-007.patch</Patch>
|
||||
<Patch>readline82-008.patch</Patch>
|
||||
<Patch>readline82-009.patch</Patch>
|
||||
<Patch>readline82-010.patch</Patch>
|
||||
<Patch>readline82-011.patch</Patch>
|
||||
<Patch>readline82-012.patch</Patch>
|
||||
<Patch>readline82-013.patch</Patch>
|
||||
<Patch>readline83-001.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -80,6 +68,13 @@
|
||||
</Files>
|
||||
</Package>
|
||||
<History>
|
||||
<Update release="14">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>8.3.1</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="13">
|
||||
<Date>2024-08-03</Date>
|
||||
<Version>8.2.13</Version>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<Dependency>acl-devel</Dependency>
|
||||
<Dependency>audit-devel</Dependency>
|
||||
<Dependency>attr-devel</Dependency>
|
||||
<!-- <Dependency>libbsd-devel</Dependency> -->
|
||||
<Dependency>libxcrypt-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch level="1">uk3.patch</Patch> -->
|
||||
@@ -47,8 +47,8 @@
|
||||
<Dependency>attr</Dependency>
|
||||
<Dependency>pam</Dependency>
|
||||
<Dependency>audit</Dependency>
|
||||
<!-- <Dependency>libbsd</Dependency> -->
|
||||
<Dependency>cracklib</Dependency>
|
||||
<Dependency versionFrom="4.4.38">libxcrypt</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/bin</Path>
|
||||
@@ -88,6 +88,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="31">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>4.18.0</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="30">
|
||||
<Date>2025-09-23</Date>
|
||||
<Version>4.18.0</Version>
|
||||
|
||||
@@ -68,6 +68,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="52">
|
||||
<Date>2025-10-30</Date>
|
||||
<Version>1.86.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="51">
|
||||
<Date>2025-10-22</Date>
|
||||
<Version>1.86.0</Version>
|
||||
|
||||
@@ -10,6 +10,7 @@ from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
pisitools.flags.add(" -std=gnu17")
|
||||
autotools.autoreconf("-vif")
|
||||
autotools.configure("--disable-error-on-warning \
|
||||
--disable-static \
|
||||
|
||||
@@ -0,0 +1,394 @@
|
||||
https://bugs.gentoo.org/940650#c12
|
||||
https://issues.guix.gnu.org/72913
|
||||
https://git.savannah.gnu.org/cgit/guile.git/commit/?id=aff9ac968840e9c86719fb613bd2ed3c39b9905c
|
||||
|
||||
From 605440d8021061a4ef8c18370783ef39f62c59b2 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Wingo <wingo@pobox.com>
|
||||
Date: Wed, 25 Sep 2024 17:23:06 +0200
|
||||
Subject: [PATCH 1/4] Fix fixpoint needed-bits computation in
|
||||
specialize-numbers
|
||||
|
||||
* module/language/cps/specialize-numbers.scm (next-power-of-two): Use
|
||||
integer-length. No change.
|
||||
(compute-significant-bits): Fix the fixpoint computation, which was
|
||||
failing to complete in some cases with loops.
|
||||
---
|
||||
module/language/cps/specialize-numbers.scm | 27 ++++++++--------------
|
||||
1 file changed, 10 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
|
||||
index 4ec88871c..12963cd71 100644
|
||||
--- a/module/language/cps/specialize-numbers.scm
|
||||
+++ b/module/language/cps/specialize-numbers.scm
|
||||
@@ -265,10 +265,7 @@
|
||||
(sigbits-intersect a (sigbits-intersect b c)))
|
||||
|
||||
(define (next-power-of-two n)
|
||||
- (let lp ((out 1))
|
||||
- (if (< n out)
|
||||
- out
|
||||
- (lp (ash out 1)))))
|
||||
+ (ash 1 (integer-length n)))
|
||||
|
||||
(define (range->sigbits min max)
|
||||
(cond
|
||||
@@ -310,18 +307,16 @@
|
||||
BITS indicating the significant bits needed for a variable. BITS may be
|
||||
#f to indicate all bits, or a non-negative integer indicating a bitmask."
|
||||
(let ((preds (invert-graph (compute-successors cps kfun))))
|
||||
- (let lp ((worklist (intmap-keys preds)) (visited empty-intset)
|
||||
- (out empty-intmap))
|
||||
+ (let lp ((worklist (intmap-keys preds)) (out empty-intmap))
|
||||
(match (intset-prev worklist)
|
||||
(#f out)
|
||||
(label
|
||||
- (let ((worklist (intset-remove worklist label))
|
||||
- (visited* (intset-add visited label)))
|
||||
+ (let ((worklist (intset-remove worklist label)))
|
||||
(define (continue out*)
|
||||
- (if (and (eq? out out*) (eq? visited visited*))
|
||||
- (lp worklist visited out)
|
||||
+ (if (eq? out out*)
|
||||
+ (lp worklist out)
|
||||
(lp (intset-union worklist (intmap-ref preds label))
|
||||
- visited* out*)))
|
||||
+ out*)))
|
||||
(define (add-def out var)
|
||||
(intmap-add out var 0 sigbits-union))
|
||||
(define (add-defs out vars)
|
||||
@@ -352,12 +347,10 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
(($ $values args)
|
||||
(match (intmap-ref cps k)
|
||||
(($ $kargs _ vars)
|
||||
- (if (intset-ref visited k)
|
||||
- (fold (lambda (arg var out)
|
||||
- (intmap-add out arg (intmap-ref out var)
|
||||
- sigbits-union))
|
||||
- out args vars)
|
||||
- out))
|
||||
+ (fold (lambda (arg var out)
|
||||
+ (intmap-add out arg (intmap-ref out var (lambda (_) 0))
|
||||
+ sigbits-union))
|
||||
+ out args vars))
|
||||
(($ $ktail)
|
||||
(add-unknown-uses out args))))
|
||||
(($ $call proc args)
|
||||
--
|
||||
2.47.0
|
||||
|
||||
|
||||
From 6953fcb8d9b7d9d36bf36e83e80e24153d37e2a4 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Wingo <wingo@pobox.com>
|
||||
Date: Wed, 25 Sep 2024 17:24:51 +0200
|
||||
Subject: [PATCH 2/4] Fix boxing of non-fixnum negative u64 values
|
||||
|
||||
* module/language/cps/specialize-numbers.scm (u64->fixnum/truncate): New
|
||||
helper.
|
||||
(specialize-operations): Fix specialized boxing of u64 values to
|
||||
truncate possibly-negative values, to avoid confusing CSE. Fixes
|
||||
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71891.
|
||||
---
|
||||
module/language/cps/specialize-numbers.scm | 21 ++++++++++++++++++++-
|
||||
1 file changed, 20 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
|
||||
index 12963cd71..e9761f0cb 100644
|
||||
--- a/module/language/cps/specialize-numbers.scm
|
||||
+++ b/module/language/cps/specialize-numbers.scm
|
||||
@@ -115,6 +115,13 @@
|
||||
(letk ks64 ($kargs ('s64) (s64) ,tag-body))
|
||||
(build-term
|
||||
($continue ks64 src ($primcall 'u64->s64 #f (u64))))))
|
||||
+(define (u64->fixnum/truncate cps k src u64 bits)
|
||||
+ (with-cps cps
|
||||
+ (letv truncated)
|
||||
+ (let$ tag-body (u64->fixnum k src truncated))
|
||||
+ (letk ku64 ($kargs ('truncated) (truncated) ,tag-body))
|
||||
+ (build-term
|
||||
+ ($continue ku64 src ($primcall 'ulogand/immediate bits (u64))))))
|
||||
(define-simple-primcall scm->u64)
|
||||
(define-simple-primcall scm->u64/truncate)
|
||||
(define-simple-primcall u64->scm)
|
||||
@@ -473,7 +480,19 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
(define (box-s64 result)
|
||||
(if (fixnum-result? result) tag-fixnum s64->scm))
|
||||
(define (box-u64 result)
|
||||
- (if (fixnum-result? result) u64->fixnum u64->scm))
|
||||
+ (call-with-values
|
||||
+ (lambda ()
|
||||
+ (lookup-post-type types label result 0))
|
||||
+ (lambda (type min max)
|
||||
+ (cond
|
||||
+ ((and (type<=? type &exact-integer)
|
||||
+ (<= 0 min max (target-most-positive-fixnum)))
|
||||
+ u64->fixnum)
|
||||
+ ((only-fixnum-bits-used? result)
|
||||
+ (lambda (cps k src u64)
|
||||
+ (u64->fixnum/truncate cps k src u64 (intmap-ref sigbits result))))
|
||||
+ (else
|
||||
+ u64->scm)))))
|
||||
(define (box-f64 result)
|
||||
f64->scm)
|
||||
|
||||
--
|
||||
2.47.0
|
||||
|
||||
|
||||
From b0559dbe88eb54e2bba4a82dd1f7e7c5b6de2f55 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Wingo <wingo@pobox.com>
|
||||
Date: Mon, 23 Sep 2024 15:57:23 +0200
|
||||
Subject: [PATCH 3/4] Narrow parameter of logand/immediate if no bits used
|
||||
|
||||
* module/language/cps/specialize-numbers.scm (specialize-operations):
|
||||
Narrow ulogand/immediate param according to used bits.
|
||||
---
|
||||
module/language/cps/specialize-numbers.scm | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
|
||||
index e9761f0cb..262dee484 100644
|
||||
--- a/module/language/cps/specialize-numbers.scm
|
||||
+++ b/module/language/cps/specialize-numbers.scm
|
||||
@@ -1,6 +1,6 @@
|
||||
;;; Continuation-passing style (CPS) intermediate language (IL)
|
||||
|
||||
-;; Copyright (C) 2015-2021, 2023 Free Software Foundation, Inc.
|
||||
+;; Copyright (C) 2015-2021,2023-2024 Free Software Foundation, Inc.
|
||||
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
@@ -573,9 +573,11 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
(specialize-unop cps k src op param a
|
||||
(unbox-u64 a) (box-u64 result))))
|
||||
|
||||
- (('logand/immediate (? u64-result? ) param (? u64-operand? a))
|
||||
+ (('logand/immediate (? u64-result?) param (? u64-operand? a))
|
||||
(specialize-unop cps k src 'ulogand/immediate
|
||||
- (logand param (1- (ash 1 64)))
|
||||
+ (logand param
|
||||
+ (or (intmap-ref sigbits result) -1)
|
||||
+ (1- (ash 1 64)))
|
||||
a
|
||||
(unbox-u64 a) (box-u64 result)))
|
||||
|
||||
--
|
||||
2.47.0
|
||||
|
||||
|
||||
From 51db308ec2107f9fb32a06004e7a0a3da6418ff6 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Wingo <wingo@pobox.com>
|
||||
Date: Thu, 26 Sep 2024 11:14:52 +0200
|
||||
Subject: [PATCH 4/4] Run sigbits fixpoint based on use/def graph, not cfg
|
||||
|
||||
* module/language/cps/specialize-numbers.scm (sigbits-ref): New helper.
|
||||
(invert-graph*): New helper.
|
||||
(compute-significant-bits): When visiting a term changes computed
|
||||
needed-bits for one of its definitions, we need to revisit the variables
|
||||
that contributed to its result (the uses), because they might need more
|
||||
bits as well. Previously we were doing this by enqueueing predecessors
|
||||
to the term, which worked if the uses were defined in predecessors, or
|
||||
if all defining terms were already in the worklist, which is the case
|
||||
without loops. But with loops, when revisiting a term, you could see
|
||||
that it causes sigbits to change, enqueue its predecessors, but then the
|
||||
predecessors don't change anything and the fixpoint stops before
|
||||
reaching the definitions of the variables we need. So instead we
|
||||
compute the use-def graph and enqueue defs directly.
|
||||
---
|
||||
module/language/cps/specialize-numbers.scm | 120 ++++++++++-----------
|
||||
1 file changed, 54 insertions(+), 66 deletions(-)
|
||||
|
||||
diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm
|
||||
index 262dee484..ac63c8194 100644
|
||||
--- a/module/language/cps/specialize-numbers.scm
|
||||
+++ b/module/language/cps/specialize-numbers.scm
|
||||
@@ -286,6 +286,9 @@
|
||||
(and (type<=? type (logior &exact-integer &u64 &s64))
|
||||
(range->sigbits min max)))))
|
||||
|
||||
+(define (sigbits-ref sigbits var)
|
||||
+ (intmap-ref sigbits var (lambda (_) 0)))
|
||||
+
|
||||
(define significant-bits-handlers (make-hash-table))
|
||||
(define-syntax-rule (define-significant-bits-handler
|
||||
((primop label types out def ...) param arg ...)
|
||||
@@ -297,24 +300,42 @@
|
||||
(define-significant-bits-handler ((logand label types out res) param a b)
|
||||
(let ((sigbits (sigbits-intersect3 (inferred-sigbits types label a)
|
||||
(inferred-sigbits types label b)
|
||||
- (intmap-ref out res (lambda (_) 0)))))
|
||||
+ (sigbits-ref out res))))
|
||||
(intmap-add (intmap-add out a sigbits sigbits-union)
|
||||
b sigbits sigbits-union)))
|
||||
(define-significant-bits-handler ((logand/immediate label types out res) param a)
|
||||
(let ((sigbits (sigbits-intersect3 (inferred-sigbits types label a)
|
||||
param
|
||||
- (intmap-ref out res (lambda (_) 0)))))
|
||||
+ (sigbits-ref out res))))
|
||||
(intmap-add out a sigbits sigbits-union)))
|
||||
|
||||
(define (significant-bits-handler primop)
|
||||
(hashq-ref significant-bits-handlers primop))
|
||||
|
||||
+(define (invert-graph* defs)
|
||||
+ "Given a graph LABEL->VAR..., return a graph VAR->LABEL.... Like the one
|
||||
+in (language cps graphs), but different because it doesn't assume that
|
||||
+the domain will be the same before and after."
|
||||
+ (persistent-intmap
|
||||
+ (intmap-fold (lambda (label vars out)
|
||||
+ (intset-fold
|
||||
+ (lambda (var out)
|
||||
+ (intmap-add! out var (intset label) intset-union))
|
||||
+ vars
|
||||
+ out))
|
||||
+ defs
|
||||
+ empty-intmap)))
|
||||
+
|
||||
(define (compute-significant-bits cps types kfun)
|
||||
"Given the locally inferred types @var{types}, compute a map of VAR ->
|
||||
BITS indicating the significant bits needed for a variable. BITS may be
|
||||
#f to indicate all bits, or a non-negative integer indicating a bitmask."
|
||||
- (let ((preds (invert-graph (compute-successors cps kfun))))
|
||||
- (let lp ((worklist (intmap-keys preds)) (out empty-intmap))
|
||||
+ (let ((cps (intmap-select cps (compute-function-body cps kfun))))
|
||||
+ ;; Label -> Var...
|
||||
+ (define-values (defs uses) (compute-defs-and-uses cps))
|
||||
+ ;; Var -> Label...
|
||||
+ (define defs-by-var (invert-graph* defs))
|
||||
+ (let lp ((worklist (intmap-keys cps)) (out empty-intmap))
|
||||
(match (intset-prev worklist)
|
||||
(#f out)
|
||||
(label
|
||||
@@ -322,69 +343,36 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
(define (continue out*)
|
||||
(if (eq? out out*)
|
||||
(lp worklist out)
|
||||
- (lp (intset-union worklist (intmap-ref preds label))
|
||||
+ (lp (intset-fold
|
||||
+ (lambda (use worklist)
|
||||
+ (intset-union worklist (intmap-ref defs-by-var use)))
|
||||
+ (intmap-ref uses label)
|
||||
+ worklist)
|
||||
out*)))
|
||||
- (define (add-def out var)
|
||||
- (intmap-add out var 0 sigbits-union))
|
||||
- (define (add-defs out vars)
|
||||
- (match vars
|
||||
- (() out)
|
||||
- ((var . vars) (add-defs (add-def out var) vars))))
|
||||
- (define (add-unknown-use out var)
|
||||
+ (define (add-unknown-use var out)
|
||||
(intmap-add out var (inferred-sigbits types label var)
|
||||
sigbits-union))
|
||||
- (define (add-unknown-uses out vars)
|
||||
- (match vars
|
||||
- (() out)
|
||||
- ((var . vars)
|
||||
- (add-unknown-uses (add-unknown-use out var) vars))))
|
||||
+ (define (default)
|
||||
+ (intset-fold add-unknown-use (intmap-ref uses label) out))
|
||||
(continue
|
||||
(match (intmap-ref cps label)
|
||||
- (($ $kfun src meta self)
|
||||
- (if self (add-def out self) out))
|
||||
- (($ $kargs names vars term)
|
||||
- (let ((out (add-defs out vars)))
|
||||
- (match term
|
||||
- (($ $continue k src exp)
|
||||
- (match exp
|
||||
- ((or ($ $const) ($ $prim) ($ $fun) ($ $const-fun)
|
||||
- ($ $code) ($ $rec))
|
||||
- ;; No uses, so no info added to sigbits.
|
||||
- out)
|
||||
- (($ $values args)
|
||||
- (match (intmap-ref cps k)
|
||||
- (($ $kargs _ vars)
|
||||
- (fold (lambda (arg var out)
|
||||
- (intmap-add out arg (intmap-ref out var (lambda (_) 0))
|
||||
- sigbits-union))
|
||||
- out args vars))
|
||||
- (($ $ktail)
|
||||
- (add-unknown-uses out args))))
|
||||
- (($ $call proc args)
|
||||
- (add-unknown-use (add-unknown-uses out args) proc))
|
||||
- (($ $callk label proc args)
|
||||
- (let ((out (add-unknown-uses out args)))
|
||||
- (if proc
|
||||
- (add-unknown-use out proc)
|
||||
- out)))
|
||||
- (($ $calli args callee)
|
||||
- (add-unknown-uses (add-unknown-use out callee) args))
|
||||
- (($ $primcall name param args)
|
||||
- (let ((h (significant-bits-handler name)))
|
||||
- (if h
|
||||
- (match (intmap-ref cps k)
|
||||
- (($ $kargs _ defs)
|
||||
- (h label types out param args defs)))
|
||||
- (add-unknown-uses out args))))))
|
||||
- (($ $branch kf kt src op param args)
|
||||
- (add-unknown-uses out args))
|
||||
- (($ $switch kf kt src arg)
|
||||
- (add-unknown-use out arg))
|
||||
- (($ $prompt k kh src escape? tag)
|
||||
- (add-unknown-use out tag))
|
||||
- (($ $throw src op param args)
|
||||
- (add-unknown-uses out args)))))
|
||||
- (_ out)))))))))
|
||||
+ (($ $kargs _ _ ($ $continue k _ ($ $primcall op param args)))
|
||||
+ (match (significant-bits-handler op)
|
||||
+ (#f (default))
|
||||
+ (h
|
||||
+ (match (intmap-ref cps k)
|
||||
+ (($ $kargs _ defs)
|
||||
+ (h label types out param args defs))))))
|
||||
+ (($ $kargs _ _ ($ $continue k _ ($ $values args)))
|
||||
+ (match (intmap-ref cps k)
|
||||
+ (($ $kargs _ vars)
|
||||
+ (fold (lambda (arg var out)
|
||||
+ (intmap-add out arg (sigbits-ref out var)
|
||||
+ sigbits-union))
|
||||
+ out args vars))
|
||||
+ (($ $ktail)
|
||||
+ (default))))
|
||||
+ (_ (default))))))))))
|
||||
|
||||
(define (specialize-operations cps)
|
||||
(define (u6-parameter? param)
|
||||
@@ -416,7 +404,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
(define (all-u64-bits-set? var)
|
||||
(operand-in-range? var &exact-integer (1- (ash 1 64)) (1- (ash 1 64))))
|
||||
(define (only-fixnum-bits-used? var)
|
||||
- (let ((bits (intmap-ref sigbits var)))
|
||||
+ (let ((bits (sigbits-ref sigbits var)))
|
||||
(and bits (= bits (logand bits (target-most-positive-fixnum))))))
|
||||
(define (fixnum-result? result)
|
||||
(or (only-fixnum-bits-used? result)
|
||||
@@ -429,7 +417,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
min max
|
||||
(target-most-positive-fixnum)))))))
|
||||
(define (only-u64-bits-used? var)
|
||||
- (let ((bits (intmap-ref sigbits var)))
|
||||
+ (let ((bits (sigbits-ref sigbits var)))
|
||||
(and bits (= bits (logand bits (1- (ash 1 64)))))))
|
||||
(define (u64-result? result)
|
||||
(or (only-u64-bits-used? result)
|
||||
@@ -490,7 +478,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
u64->fixnum)
|
||||
((only-fixnum-bits-used? result)
|
||||
(lambda (cps k src u64)
|
||||
- (u64->fixnum/truncate cps k src u64 (intmap-ref sigbits result))))
|
||||
+ (u64->fixnum/truncate cps k src u64 (sigbits-ref sigbits result))))
|
||||
(else
|
||||
u64->scm)))))
|
||||
(define (box-f64 result)
|
||||
@@ -576,7 +564,7 @@ BITS indicating the significant bits needed for a variable. BITS may be
|
||||
(('logand/immediate (? u64-result?) param (? u64-operand? a))
|
||||
(specialize-unop cps k src 'ulogand/immediate
|
||||
(logand param
|
||||
- (or (intmap-ref sigbits result) -1)
|
||||
+ (or (sigbits-ref sigbits a) -1)
|
||||
(1- (ash 1 64)))
|
||||
a
|
||||
(unbox-u64 a) (box-u64 result)))
|
||||
--
|
||||
2.47.0
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
https://bugs.gentoo.org/943712
|
||||
https://git.savannah.gnu.org/cgit/guile.git/commit/?id=c2e7d834c26dca39e0a2dc6784fc47814969817a
|
||||
|
||||
From c2e7d834c26dca39e0a2dc6784fc47814969817a Mon Sep 17 00:00:00 2001
|
||||
From: Andy Wingo <wingo@pobox.com>
|
||||
Date: Tue, 25 Jun 2024 09:30:21 +0200
|
||||
Subject: Fix compilation with C23
|
||||
|
||||
* libguile/jit.c (is_unreachable): Rename from "unreachable", which is
|
||||
apparently a new reserved word in C23.
|
||||
--- a/libguile/jit.c
|
||||
+++ b/libguile/jit.c
|
||||
@@ -370,7 +370,7 @@ set_register_state (scm_jit_state *j, uint32_t state)
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
-unreachable (scm_jit_state *j)
|
||||
+is_unreachable (scm_jit_state *j)
|
||||
{
|
||||
return j->register_state & UNREACHABLE;
|
||||
}
|
||||
@@ -382,7 +382,7 @@ has_register_state (scm_jit_state *j, uint32_t state)
|
||||
}
|
||||
|
||||
#define ASSERT_HAS_REGISTER_STATE(state) \
|
||||
- ASSERT (unreachable (j) || has_register_state (j, state));
|
||||
+ ASSERT (is_unreachable (j) || has_register_state (j, state));
|
||||
|
||||
static void
|
||||
record_gpr_clobber (scm_jit_state *j, jit_gpr_t r)
|
||||
--
|
||||
cgit v1.2.3-70-g09d2
|
||||
@@ -17,13 +17,16 @@
|
||||
<Archive sha1sum="e95e37f681dae692de52242929cbc7092eef3eb4" type="tarxz">mirrors://gnu/guile/guile-3.0.10.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>gc-devel</Dependency>
|
||||
<Dependency>gettext-devel</Dependency>
|
||||
<Dependency>gmp-devel</Dependency>
|
||||
<Dependency>libunistring-devel</Dependency>
|
||||
<Dependency>libffi-devel</Dependency>
|
||||
<Dependency>gettext-devel</Dependency>
|
||||
<Dependency>readline-devel</Dependency>
|
||||
<Dependency>libxcrypt-devel</Dependency>
|
||||
<Dependency>libunistring-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">guile-3.0.10-backport-issue72913.patch</Patch>
|
||||
<Patch level="1">guile-3.0.10-c23.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -33,9 +36,10 @@
|
||||
<Dependency>gc</Dependency>
|
||||
<Dependency>gmp</Dependency>
|
||||
<Dependency>libffi</Dependency>
|
||||
<Dependency>readline</Dependency>
|
||||
<Dependency versionFrom="4.4.38">libxcrypt</Dependency>
|
||||
<Dependency>libtool-ltdl</Dependency>
|
||||
<Dependency>libunistring</Dependency>
|
||||
<Dependency>readline</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
@@ -69,6 +73,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="9">
|
||||
<Date>2024-10-30</Date>
|
||||
<Version>3.0.10</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="8">
|
||||
<Date>2024-10-05</Date>
|
||||
<Version>3.0.10</Version>
|
||||
|
||||
Reference in New Issue
Block a user