source: patches/readline-7.0-branch_update-1.patch @ b252915

sysvinit
Last change on this file since b252915 was b252915, checked in by William Harrington <kb0iic@…>, 7 years ago

Update Readline to 7.0 and add the two seds for a possible linking bug with ldconfig when reinstalling.

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[b252915]1Submitted By: William Harrington (kb0iic at cross-lfs dot org)
2Date: 05-04-2017
3Initial Package Version: 7.0
4Origin: Upstream
5Upstream Status: Applied
6Description: Contains all upstream patches up to 7.0-003
7
8diff -Naur readline-7.0.orig/history.c readline-7.0/history.c
9--- readline-7.0.orig/history.c 2015-12-28 18:50:31.000000000 +0000
10+++ readline-7.0/history.c      2017-05-04 22:19:51.586694240 +0000
11@@ -57,6 +57,8 @@
12 /* How big to make the_history when we first allocate it. */
13 #define DEFAULT_HISTORY_INITIAL_SIZE   502
14 
15+#define MAX_HISTORY_INITIAL_SIZE       8192
16+
17 /* The number of slots to increase the_history by. */
18 #define DEFAULT_HISTORY_GROW_SIZE 50
19 
20@@ -277,6 +279,7 @@
21      const char *string;
22 {
23   HIST_ENTRY *temp;
24+  int new_length;
25 
26   if (history_stifled && (history_length == history_max_entries))
27     {
28@@ -293,13 +296,9 @@
29 
30       /* Copy the rest of the entries, moving down one slot.  Copy includes
31         trailing NULL.  */
32-#if 0
33-      for (i = 0; i < history_length; i++)
34-       the_history[i] = the_history[i + 1];
35-#else
36       memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
37-#endif
38 
39+      new_length = history_length;
40       history_base++;
41     }
42   else
43@@ -307,11 +306,13 @@
44       if (history_size == 0)
45        {
46          if (history_stifled && history_max_entries > 0)
47-           history_size = history_max_entries + 2;
48+           history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
49+                               ? MAX_HISTORY_INITIAL_SIZE
50+                               : history_max_entries + 2;
51          else
52            history_size = DEFAULT_HISTORY_INITIAL_SIZE;
53          the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
54-         history_length = 1;
55+         new_length = 1;
56        }
57       else
58        {
59@@ -321,14 +322,15 @@
60              the_history = (HIST_ENTRY **)
61                xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
62            }
63-         history_length++;
64+         new_length = history_length + 1;
65        }
66     }
67 
68   temp = alloc_history_entry ((char *)string, hist_inittime ());
69 
70-  the_history[history_length] = (HIST_ENTRY *)NULL;
71-  the_history[history_length - 1] = temp;
72+  the_history[new_length] = (HIST_ENTRY *)NULL;
73+  the_history[new_length - 1] = temp;
74+  history_length = new_length;
75 }
76 
77 /* Change the time stamp of the most recent history entry to STRING. */
78diff -Naur readline-7.0.orig/input.c readline-7.0/input.c
79--- readline-7.0.orig/input.c   2016-08-30 14:21:47.000000000 +0000
80+++ readline-7.0/input.c        2017-05-04 22:19:51.587694257 +0000
81@@ -513,6 +513,7 @@
82       result = 0;
83 #if defined (HAVE_PSELECT)
84       sigemptyset (&empty_set);
85+      sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &empty_set);
86       FD_ZERO (&readfds);
87       FD_SET (fileno (stream), &readfds);
88       result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &empty_set);
89diff -Naur readline-7.0.orig/patchlevel readline-7.0/patchlevel
90--- readline-7.0.orig/patchlevel        2015-10-02 11:25:03.000000000 +0000
91+++ readline-7.0/patchlevel     2017-05-04 22:19:51.587694257 +0000
92@@ -1,3 +1,3 @@
93 # Do not edit -- exists only for use by patch
94 
95-0
96+3
Note: See TracBrowser for help on using the repository browser.