diff --git a/CHANGES b/CHANGES index bc41c5e7..9066378c 100644 --- a/CHANGES +++ b/CHANGES @@ -304,6 +304,10 @@ q. Readline now behaves better when operate-and-get-next is used when the r. Fixed a bug that could cause vi redo (`.') of a replace command not to work correctly in the C or POSIX locale. +s. Fixed a bug with vi-mode digit arguments that caused the last command to be + set incorrectly. This prevents yank-last-arg from working as intended, for + example. + 3. New Features in Bash a. `bind -x' now supports different bindings for different editing modes and diff --git a/CHANGES-5.1 b/CHANGES-5.1 index 6673ad48..509f1b38 100644 --- a/CHANGES-5.1 +++ b/CHANGES-5.1 @@ -304,6 +304,10 @@ q. Readline now behaves better when operate-and-get-next is used when the r. Fixed a bug that could cause vi redo (`.') of a replace command not to work correctly in the C or POSIX locale. +s. Fixed a bug with vi-mode digit arguments that caused the last command to be + set incorrectly. This prevents yank-last-arg from working as intended, for + example. + 3. New Features in Bash a. `bind -x' now supports different bindings for different editing modes and diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index b48d82f6..5a138b13 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -8538,7 +8538,7 @@ doc/{bash.1,bashref.texi} configure.ac - if CFLAGS is not supplied in the environment or on the command line, add the gcc options that suppress warnings about parens and print - formats in a slightly different way, that will avoid some collisions + formats in a slightly different way that will avoid some collisions lib/readline/readline.c - _rl_dispatch_subseq: don't set rl_last_func to rl_vi_arg_digit, just @@ -8552,3 +8552,17 @@ lib/readline/vi_mode.c it needs to use it later - rl_vi_redo: suppress attempts to redo `.' when the current keymap is vi_movement_keymap, since that will recursively call vi_redo + + 6/11 + ---- +redir.c + - limit HEREDOC_PIPESIZE to 4096 on FreeBSD; that is where it can + handle atomic writes without hanging. Tested on FreeBSD 13 + + 6/15 + ---- +subst.c + - do_assignment_internal: call stupidly_hack_special_variables on the + name returned from the variable assignment, in case there was a + nameref expansion, and on the original name only if the assignment + returned NULL. Fixes bug reported by James D. Lin diff --git a/lib/malloc/malloc.c b/lib/malloc/malloc.c index b3196366..94806972 100644 --- a/lib/malloc/malloc.c +++ b/lib/malloc/malloc.c @@ -226,12 +226,12 @@ typedef union _malloc_guard { /* Should we use mmap for large allocations? */ #if defined (HAVE_MMAP) -# if !defined (MAP_ANON) && defined (MAP_ANONYMOUS) -# define MAP_ANON MAP_ANONYMOUS +# if defined (MAP_ANON) && !defined (MAP_ANONYMOUS) +# define MAP_ANONYMOUS MAP_ANON # endif #endif -#if defined (HAVE_MMAP) && defined (MAP_ANON) +#if defined (HAVE_MMAP) && defined (MAP_ANONYMOUS) # define USE_MMAP #endif @@ -929,7 +929,7 @@ internal_malloc (n, file, line, flags) /* get a block */ z = (char *) (p + 1); /* Check alignment of returned pointer */ if ((unsigned long)z & MALIGN_MASK) - fprintf (stderr, "malloc: %s:%d: warning: request for %ld bytes not aligned on %d byte boundary\r\n", + fprintf (stderr, "malloc: %s:%d: warning: request for %d bytes not aligned on %d byte boundary\r\n", file ? file : _("unknown"), line, p->mh_nbytes, MALIGN_MASK+1); #endif diff --git a/lib/sh/mailstat.c b/lib/sh/mailstat.c index 79b431ae..bd5c25fb 100644 --- a/lib/sh/mailstat.c +++ b/lib/sh/mailstat.c @@ -60,7 +60,7 @@ mailstat(path, st) struct stat st_ret, st_tmp; DIR *dd; struct dirent *fn; - char dir[PATH_MAX * 2], file[PATH_MAX * 2]; + char dir[PATH_MAX * 2], file[PATH_MAX * 2 + 1]; int i, l; time_t atime, mtime; diff --git a/redir.c b/redir.c index 9e596d3a..fa92b4d4 100644 --- a/redir.c +++ b/redir.c @@ -60,6 +60,12 @@ extern int errno; #include "builtins/pipesize.h" +/* FreeBSD 13 can reliably handle atomic writes at this capacity without + hanging. */ +#if __FreeBSD__ && !defined (HEREDOC_PIPESIZE) +# define HEREDOC_PIPESIZE 4096 +#endif + /* Normally set by a build process command that computes pipe capacity */ #ifndef PIPESIZE # ifdef PIPE_BUF diff --git a/subst.c b/subst.c index 880d0ecd..4e3176d4 100644 --- a/subst.c +++ b/subst.c @@ -3300,7 +3300,10 @@ do_assignment_internal (word, expand) #endif /* ARRAY_VARS */ entry = bind_variable (name, value, aflags); - stupidly_hack_special_variables (name); + if (entry) + stupidly_hack_special_variables (entry->name); /* might be a nameref */ + else + stupidly_hack_special_variables (name); /* Return 1 if the assignment seems to have been performed correctly. */ if (entry == 0 || readonly_p (entry)) diff --git a/trap.c b/trap.c index c5687187..481dbccc 100644 --- a/trap.c +++ b/trap.c @@ -514,6 +514,7 @@ trap_handler (sig) int next_pending_trap (start) + int start; { register int i;