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

sysvinit
Last change on this file since 5e264881 was b252915, checked in by William Harrington <kb0iic@…>, 8 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
  • readline-7.0

    Submitted By: William Harrington (kb0iic at cross-lfs dot org)
    Date: 05-04-2017
    Initial Package Version: 7.0
    Origin: Upstream
    Upstream Status: Applied
    Description: Contains all upstream patches up to 7.0-003
    
    diff -Naur readline-7.0.orig/history.c readline-7.0/history.c
    old new  
    5757/* How big to make the_history when we first allocate it. */
    5858#define DEFAULT_HISTORY_INITIAL_SIZE    502
    5959
     60#define MAX_HISTORY_INITIAL_SIZE        8192
     61
    6062/* The number of slots to increase the_history by. */
    6163#define DEFAULT_HISTORY_GROW_SIZE 50
    6264
     
    277279     const char *string;
    278280{
    279281  HIST_ENTRY *temp;
     282  int new_length;
    280283
    281284  if (history_stifled && (history_length == history_max_entries))
    282285    {
     
    293296
    294297      /* Copy the rest of the entries, moving down one slot.  Copy includes
    295298         trailing NULL.  */
    296 #if 0
    297       for (i = 0; i < history_length; i++)
    298         the_history[i] = the_history[i + 1];
    299 #else
    300299      memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
    301 #endif
    302300
     301      new_length = history_length;
    303302      history_base++;
    304303    }
    305304  else
     
    307306      if (history_size == 0)
    308307        {
    309308          if (history_stifled && history_max_entries > 0)
    310             history_size = history_max_entries + 2;
     309            history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
     310                                ? MAX_HISTORY_INITIAL_SIZE
     311                                : history_max_entries + 2;
    311312          else
    312313            history_size = DEFAULT_HISTORY_INITIAL_SIZE;
    313314          the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
    314           history_length = 1;
     315          new_length = 1;
    315316        }
    316317      else
    317318        {
     
    321322              the_history = (HIST_ENTRY **)
    322323                xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
    323324            }
    324           history_length++;
     325          new_length = history_length + 1;
    325326        }
    326327    }
    327328
    328329  temp = alloc_history_entry ((char *)string, hist_inittime ());
    329330
    330   the_history[history_length] = (HIST_ENTRY *)NULL;
    331   the_history[history_length - 1] = temp;
     331  the_history[new_length] = (HIST_ENTRY *)NULL;
     332  the_history[new_length - 1] = temp;
     333  history_length = new_length;
    332334}
    333335
    334336/* Change the time stamp of the most recent history entry to STRING. */
  • readline-7.0

    diff -Naur readline-7.0.orig/input.c readline-7.0/input.c
    old new  
    513513      result = 0;
    514514#if defined (HAVE_PSELECT)
    515515      sigemptyset (&empty_set);
     516      sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &empty_set);
    516517      FD_ZERO (&readfds);
    517518      FD_SET (fileno (stream), &readfds);
    518519      result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &empty_set);
  • readline-7.0

    diff -Naur readline-7.0.orig/patchlevel readline-7.0/patchlevel
    old new  
    11# Do not edit -- exists only for use by patch
    22
    3 0
     33
Note: See TracBrowser for help on using the repository browser.