component(developer/golang-123): Add Component
[oi-userland.git] / components / library / readline / patches / readline82-011.patch
blob3ad7a8ffd6a341e45c3fcf108140eb48a07117cf
1 READLINE PATCH REPORT
2 =====================
4 Readline-Release: 8.2
5 Patch-ID: readline82-011
7 Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
8 Bug-Reference-ID: <CAMu=BrqWa_iNkiEwchpFmtrUhFrAanOO8pjy7VCKqRKUvqdsbw@mail.gmail.com>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-02/msg00075.html
11 Bug-Description:
13 Patch (apply with `patch -p0'):
15 Some systems (e.g., macOS) send signals early on in interactive initialization,
16 so readline should retry a failed open of the init file.
18 *** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022
19 --- bind.c Tue Apr 23 15:07:13 2024
20 ***************
21 *** 979,987 ****
22 int i, file;
24 ! file = -1;
25 ! if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0))
27 if (file >= 0)
28 close (file);
29 return ((char *)NULL);
31 --- 969,986 ----
32 int i, file;
34 ! file = open (filename, O_RDONLY, 0666);
35 ! /* If the open is interrupted, retry once */
36 ! if (file < 0 && errno == EINTR)
38 + RL_CHECK_SIGNALS ();
39 + file = open (filename, O_RDONLY, 0666);
40 + }
42 + if ((file < 0) || (fstat (file, &finfo) < 0))
43 + {
44 + i = errno;
45 if (file >= 0)
46 close (file);
47 + errno = i;
48 return ((char *)NULL);
50 ***************
51 *** 992,999 ****
52 --- 991,1001 ----
53 if (file_size != finfo.st_size || file_size + 1 < file_size)
55 + i = errno;
56 if (file >= 0)
57 close (file);
58 #if defined (EFBIG)
59 errno = EFBIG;
60 + #else
61 + errno = i;
62 #endif
63 return ((char *)NULL);
65 *** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
66 --- patchlevel 2014-03-21 08:28:40.000000000 -0400
67 ***************
68 *** 1,3 ****
69 # Do not edit -- exists only for use by patch
71 ! 10
72 --- 1,3 ----
73 # Do not edit -- exists only for use by patch
75 ! 11