Commit graph

124 commits

Author SHA1 Message Date
Elliott Hughes
883ac9e337 Merge "Upgrade to mksh R53a." am: c19d20531c am: 8b302a0123 am: c8ed698e56
am: 0ff4e75810

Change-Id: I6dfd2d1ae1cde2c5d9d556ba9d18904bf9794dc0
2016-08-13 18:37:04 +00:00
Elliott Hughes
0ff4e75810 Merge "Upgrade to mksh R53a." am: c19d20531c am: 8b302a0123
am: c8ed698e56

Change-Id: Iabb58f30fb722bf021f8f164780a8422403299de
2016-08-13 18:32:27 +00:00
Elliott Hughes
c8ed698e56 Merge "Upgrade to mksh R53a." am: c19d20531c
am: 8b302a0123

Change-Id: I7316be74d3aeb694790612601aef692d3663545e
2016-08-13 18:28:26 +00:00
Elliott Hughes
8b302a0123 Merge "Upgrade to mksh R53a."
am: c19d20531c

Change-Id: I999ef9dd8ef426549886c70ea8757ff3b89c28c5
2016-08-13 18:25:00 +00:00
Elliott Hughes
c19d20531c Merge "Upgrade to mksh R53a." 2016-08-13 18:19:55 +00:00
Elliott Hughes
77740fcd3d Upgrade to mksh R53a.
Note that we skipped R52c because it wouldn't build with clang (thanks to
the "Shave 200 bytes off .text by revisiting string pooling" change).

From the release notes:

R53a is a snapshot/feature release:

[lintian] Fix spelling
[tg] Unbreak multi-line command history broken by history flush
[tg] Fix redefining POSIX functions that were Korn functions before
[tg, TNF] Fix bounds checks in Vi editing mode
[tg] Handle combining characters at end of string or output correctly
[tg] Fix ${!#} ${!?} ${!-} (POSIX, prompted by izabera)
[tg] Fix shf.c-internal buffer overread on printing digits
[J�rg] Fix a typo in the testsuite
[arekm] Increase default edit line size (unless MKSH_SMALL)
[tg] Improve description of Emacs mode keybindings, especially ^U
[tg, arekm, jilles] Abort read builtin in case of read(2) errors
[tg, izabera, carstenh] Fix most of the ambiguous corner cases related to ${[pfx]var[op[word]]} (${@:-1} still unsupported)
[carstenh] Contribute some more testsuite coverage
[tg] WDS_TPUTS now emits QCHAR newline reentrant-safe
[tg] Fix var=<< implementation (LP#1380389)
[tg, FreeBSD] Make XSI test(1) extensions behave as if they were POSIX
[tg, izabera] Add $(<<<x) and $(<<EOF…) implementation
[tg] Lower minimum screen size accepted as “sane” from the OS to 4×2
[tg, Torsten Sillke] Simplify tilde-expanded parameters
[tg, Torsten Sillke] Fix default PS1 for substring matches
[tg] Apply defer-builtin-with-arguments logic to realpath builtin
[tg] Rework string pooling (own vs. compiler’s) (LP#1580348)
[tg] Feature: print -A, prints arguments as characters
[tg, izabera] Replace <<< and >>> as ROL and ROR operators with their new ^< and ^> spelling as per this proposal
[tg, slagtc] Clear-to-EOL under tmux to work around its anti-feature
[tg, p120ph37] Remove support for using file descriptors with more than a single digit, in preparation for named file descriptors
[tg] Correct, but simplify (at the potential cost of more tty I/O than strictly necessary, though never redundant and (probably) not more than before when it was miscalculated), line clearing and redrawing
[slagtc, tg] Implement new evaluate-region editing command Esc+Ctrl-E
[tg] Prefer external rename utility over the recovery builtin
[tg] Remove redundant full-line redraws
[tg, Natureshadow] Fix errorlevel of ‘.’ (“dot” special builtin) when the sourced script does not run any commands, for POSIX compliance
[tg] Refactor op tokens and edchars to shave off some more bytes
[tg] Fix some bugs in the manpage and some occasional/minor code bugs
[tg, Brian Callahan] Mark tests requiring new perl as !need-pass
[tg, slagtc] Add $KSH_MATCH and, to make it usable, ${foo@/bar/baz}
[tg, Score_Under] Fix bogus patch from OpenBSD: only NULL the global source in unwind when actually reclaiming its Area
[izabera] Mention in the manpage that integer bases go up to 36
[Natureshadow] Fix /= operator broken during refactoring

R52c is a bugfix-only release:

[tg] Shave 200 bytes off .text by revisiting string pooling
[tg, J�rg] Fix manpage for ditroff on Schillix
[tg, wbx] Use sed 1q instead of unportable head(1)
[tg] Implement underrun debugging tool for area-based memory allocator
[tg] Fix history underrun when first interactive command is entered
[tg, bef0rd] Do not misinterpret “${0/}” as “${0//”, fixes segfault
[tg, Stéphane Chazelas] Fix display problems with special parameters
[tg, Stéphane Chazelas] Catch attempt to trim $* and $@ with ?, fixes segfault (Todd Miller did this in 2004 for ${x[*]} already, so just sync)
[Martijn Dekker] Fix “command -p” with -Vv to behave as POSIX requires
[tg, jilles, Oleg Bulatov] Fix recusive parser with active heredocs
[tg] Flush even syntax-failing or interrupted commands to history
[tg, fmunozs] Fix invalid memory access for “'\0'” in arithmetics
[tg] Explicitly reserve SIGEXIT and SIGERR for ksh
[tg, izabera] Catch missing here documents at EOF even under “set -n”
[kre, tg] Document Austin#1015 handling (not considered a violation)
[tg, fmunozs] Fix buffer overread for empty nameref targets
[tg] Fix warnings pointed out by latest Debian gcc-snapshot
[tg, Martijn Dekker] Document upcoming set +o changes
[Martijn Dekker] Expand testsuite for command/whence

Change-Id: Ife475b25acae5a85277757cfe9f14c6575eac0cd
2016-08-12 15:06:53 -07:00
Elliott Hughes
b394f11bc4 Merge "Upgrade to mksh R52b." 2016-02-03 01:14:56 +00:00
Elliott Hughes
fc0307d88e Upgrade to mksh R52b.
From the release notes:

R52b is a strongly recommended bugfix-only release:

[tg] Recognise ksh93 compiled scripts and LZIP compressed files as binary (i.e. to not run as mksh plaintext script)
[tg] Document that we will implement locale tracking later
[tg] Add EEXIST to failback strerror(3)
[jilles] Make set -C; :>foo race-free
[tg] Don’t use unset in portable build script
[tg] Plug warning on GNU/kFreeBSD, GNU/Hurd
[tg] Document read -a resets the integer base
[J�rg] Fix manpage: time is not a builtin but a reserved word
[J�rg, tg] Make exit (and return) eat -1
[tg] parse “$( (( … ) … ) … )” correctly (LP#1532621), Jan Palus
[tg] reduce memory footprint by free(3)ing more aggressively
[tg] fix buffer overrun (LP#1533394), bugreport by izabera
[tg] correctly handle nested ADELIM parsing (LP#1453827), Teckids
[tg] permit “read -A/-a arr[idx]” as long as only one element is read; fix corruption of array indicēs with this construct (LP#1533396), izabera
[tg] Sanitise OS-provided signal number in even more places
[tg] As requested by J�rg, be clear manpage advice is for mksh
[tg] Revert (as it was a regression) POSIX bugfix from R52/2005 related to accent gravis-style command substitution until POSIX decides either way
[tg] Handle export et al. after command (Austin#351)
[tg] Catch EPIPE in built-in cat and return as SIGPIPE (LP#1532621)
[tg] Fix errno in print/echo builtin; optimise that and unbksl
[tg] Update documentation, point out POSIX violation (Austin#1015)

R52 is a strongly recommended bugfix release:

[_0bitcount] Move moving external link from mksh(1) to the #ksh channel homepage linked therein
[tg] Make setenv “set -u”-safe and fix when invoked with no args
[tg] Make “typeset -f” output reentrant if name is a reserved word
[oksh] Zero-pad seconds in “time” output to align columns
[tg] Check signals and errorlevels from OS to be within bounds
[komh, tg] Quote and document ‘;’ as PATH separator in some places
[oksh, tg] Simplify code to call afree() even if arg is NULL
[tg] Fix tree-printing and reentrancy of multiple here documents
[tg] Work around LP#1030581 by permitting exactly one space after
[tg, oksh] Code quality work, cleanups
[tg] New code for here documents/strings with several bugfixes
[tg] Stop using issetugid(2) for ±p checks, wrong tool for the job
[tg] Reintroduce some -o posix changes lost in 2005, plus fixes
[tg] Make “source” into a built-in command
[tg] Drop “stop” alias, lksh(1) functionality to auto-unalias
[tg] Fix \u0000 ignored in $'…' and print
[tg] Improve portability of Build.sh
[Jilles Tjoelker] Improve portability of testsuite
[tg] Fix tilde expansion for some substitutions (izabera, Chet, Geoff)
[tg] Improve reparsing of ((…) |…) as ( (…) |…)
[Martijn Dekker] Fix test(1) not returning evaluation errors
[tg] Fix ${*:+x} constructs (carstenh)
[tg] Make (( … )) into a compound command (ormaaj)
[tg] Repair a few parameter substitution expansion mistakes

Change-Id: I3d875b5c648c60cc6203c964f11d8cbd42648d9c
2016-02-02 15:26:47 -08:00
Elliott Hughes
f688e8a1ab Merge "adbd sets $TERM now." 2015-11-16 23:42:01 +00:00
Elliott Hughes
4ad1394a3c adbd sets $TERM now.
Bug: http://b/25601436
Change-Id: I532233a1cf349ac0117bdfb898ef050c42357178
2015-11-16 11:09:40 -08:00
Elliott Hughes
f254c87fb7 Merge "adbd sets HOME/LOGNAME/SHELL/USER now." 2015-11-02 22:45:42 +00:00
Elliott Hughes
d45dd20c43 adbd sets HOME/LOGNAME/SHELL/USER now.
We also don't need to export variables we inherited --- they're
automatically exported.

Bug: http://b/19635681
Change-Id: Ie8e8480e7487ddc0fb9e984235b8b5ea0c587686
2015-11-02 14:40:16 -08:00
Elliott Hughes
19107cc387 Merge "Remove hd." 2015-09-25 15:15:02 +00:00
Elliott Hughes
dfe721ad49 Merge "Remove setenv." 2015-09-25 15:14:36 +00:00
Elliott Hughes
7c84572312 Merge "Remove auto addition of ~/bin subdirectories to the path." 2015-09-25 15:14:14 +00:00
Elliott Hughes
a888b29057 Remove hd.
hd was only usable from interactive shells. xxd is more functional and usable
from interactive and non-interactive shells.

Change-Id: I294acea221e20ca46b6bc7e8e34906bd5d1b6dad
2015-09-25 08:12:29 -07:00
Elliott Hughes
7cad83fe64 Remove setenv.
No one is expecting the C shell any more.

Change-Id: Iff9422d254a51c988f2a6157379660b4ddaa617f
2015-09-25 08:11:32 -07:00
Elliott Hughes
91528bac84 Remove auto addition of ~/bin subdirectories to the path.
Change-Id: Icde133fb21fa93ba3909b40da62da81654be1bab
2015-09-25 08:11:32 -07:00
Elliott Hughes
e006687723 Merge "Upgrade to mksh 51." 2015-07-17 20:07:15 +00:00
Elliott Hughes
96b43632c2 Upgrade to mksh 51.
Bug: http://b/22413333
Change-Id: Id86d5bf463af540b84d03a7b8fe092d23702f414
2015-07-17 11:44:21 -07:00
Elliott Hughes
c87de5d027 Merge "Upgrade to mksh 50f." 2015-04-22 19:51:33 +00:00
Elliott Hughes
b27ce95e41 Upgrade to mksh 50f.
Bug: http://b/20101805
Change-Id: Ic311851b31217517f6c201b5ec68a0668577eddf
2015-04-21 13:39:18 -07:00
Elliott Hughes
d978a9edb7 Merge "Apparently not all our toolchains have -fstack-protector-strong yet." 2015-03-11 17:29:33 +00:00
Elliott Hughes
a64e43f4eb Apparently not all our toolchains have -fstack-protector-strong yet.
Change-Id: Ieaf13c9d402a6f1bc13c393de9aa965a4e7a845d
2015-03-11 10:27:23 -07:00
Elliott Hughes
74cae37f5f Merge "Upgrade to mksh 50e." 2015-03-11 16:58:18 +00:00
Elliott Hughes
50012061ca Upgrade to mksh 50e.
Change-Id: I341673d83c67f83761aa02c8372da6bbc419286f
2015-03-10 22:22:24 -07:00
Elliott Hughes
2638cbd9a1 am 948ca12d: Merge "Set to /data/local/tmp, and use id -un to get the user\'s name."
* commit '948ca12d46512a832fe53ee24fd580e7addaf28d':
  Set $TMPDIR to /data/local/tmp, and use `id -un` to get the user's name.
2015-02-10 16:52:45 +00:00
Elliott Hughes
948ca12d46 Merge "Set $TMPDIR to /data/local/tmp, and use id -un to get the user's name." 2015-02-09 22:02:37 +00:00
Elliott Hughes
417ccf4906 Set $TMPDIR to /data/local/tmp, and use id -un to get the user's name.
Needed to make various command-line tools work out of the box, since we
don't have /tmp, which is what they'd naturally fall back to.

Change-Id: I3091d5ec9235f977de4a698a34f1f147a69e8a33
2015-02-09 12:25:41 -08:00
Elliott Hughes
17de28817a am 508b5747: Merge "Default to xterm, remove some cruft."
* commit '508b57470e9910e8c3be448ec4428ea02182c473':
  Default to xterm, remove some cruft.
2014-12-12 01:51:27 +00:00
Elliott Hughes
508b57470e Merge "Default to xterm, remove some cruft." 2014-12-12 01:22:00 +00:00
Elliott Hughes
11ed7f9d7c Default to xterm, remove some cruft.
gtest won't color its output unless TERM is an xterm, and that seems as
reasonable a default as vt100. More reasonable, in fact. This only fixes
things for login shells, so we still need to fix adb to pass $TERM
through to make yabinc happy...

We can get a better more(1) from toybox, and the aliases seem inappropriate.

Change-Id: Id73035d69ab421b179b9beb575d4e1607fbcce62
2014-12-11 17:13:19 -08:00
Elliott Hughes
1e1ca3f978 am a1c1f910: am 319a679f: Merge "Upgrade to mksh 50d."
* commit 'a1c1f910f501fd658f7b2bea133bd47cb8d2395d':
2014-10-26 22:48:07 +00:00
Elliott Hughes
e3d656aa22 am fd0e00a2: am 1f487419: Merge "Upgrade to mksh 50c."
* commit 'fd0e00a245aa73ac85e5af7ba5191a999ff7bda3':
2014-10-26 22:48:07 +00:00
Elliott Hughes
94d772d0c4 am a0a78c0a: am 049d9caa: Merge "Make mksh\'s mkmf.sh target-agnostic."
* commit 'a0a78c0a155ec954a8a67e155348e7424dd63237':
2014-10-26 22:48:07 +00:00
Elliott Hughes
fe61dd142a am 319a679f: Merge "Upgrade to mksh 50d."
* commit '319a679f02fd6ac5f7cbde03c3e64935b2c9af82':
  Upgrade to mksh 50d.
2014-10-07 23:23:18 +00:00
Elliott Hughes
a1c1f910f5 am 319a679f: Merge "Upgrade to mksh 50d."
* commit '319a679f02fd6ac5f7cbde03c3e64935b2c9af82':
  Upgrade to mksh 50d.
2014-10-07 23:20:53 +00:00
Elliott Hughes
1fd4b55b58 am ae046317: Upgrade to mksh 50d.
* commit 'ae04631768fefc45c2d18865ec88872853421a52':
  Upgrade to mksh 50d.
2014-10-07 22:41:30 +00:00
Elliott Hughes
ae04631768 Upgrade to mksh 50d.
Bug: 17814343

(cherry picked from commit f7f795644b)

Change-Id: Ie8e4251d173b6e5aa7b0c4ef88a29bcccc23715a
2014-10-07 15:10:21 -07:00
Elliott Hughes
319a679f02 Merge "Upgrade to mksh 50d." 2014-10-07 22:09:08 +00:00
Elliott Hughes
f7f795644b Upgrade to mksh 50d.
Bug: 17814343
Change-Id: Ie56f48e041850aaf05f44d3640667848ec92f0b1
2014-10-07 15:04:14 -07:00
Elliott Hughes
ad562a498c Merge remote-tracking branch 'goog/lmp-mr1-ub-dev' into cp 2014-10-06 16:58:53 -07:00
Elliott Hughes
fd0e00a245 am 1f487419: Merge "Upgrade to mksh 50c."
* commit '1f487419252b1b501e57d8944e854b1c349f92f7':
  Upgrade to mksh 50c.
2014-10-06 22:42:04 +00:00
Elliott Hughes
f215cbb9af am 1f487419: Merge "Upgrade to mksh 50c."
* commit '1f487419252b1b501e57d8944e854b1c349f92f7':
  Upgrade to mksh 50c.
2014-10-06 22:40:59 +00:00
Elliott Hughes
b4542e99ca Upgrade to mksh 50c.
Bug: 17814343

(cherry picked from commit 56b517d46c)

Change-Id: Ib116fa73e720b9a918afa9538ff22b69345ba3bf
2014-10-06 14:01:54 -07:00
Elliott Hughes
1bd2f37e63 Make mksh's mkmf.sh target-agnostic.
This isn't much, but it's a step in the right direction. Really we should
probably generate a trivial Android.mk for building the .c files used by
the mksh equivalent of a configure script.

Bug: 17814343

(cherry picked from commit 0e7ec74818)

Change-Id: Ibce6616acfe560c4dfec1e27c51d45b9dce8456e
2014-10-06 13:55:38 -07:00
Elliott Hughes
427d76ccc4 Upgrade to mksh 50.
Bug: 16569301
Bug: 17814343

(cherry picked from commit 737fdce098)

Change-Id: I7e8a142bec5f553f9e1a2568245582fe8fa14314
2014-10-06 13:44:21 -07:00
Elliott Hughes
1f48741925 Merge "Upgrade to mksh 50c." 2014-10-06 20:41:49 +00:00
Elliott Hughes
56b517d46c Upgrade to mksh 50c.
Bug: 17814343
Change-Id: I06cbd6e9ef127c6a654d201ebfb6005cbb2ed3b0
2014-10-06 11:30:44 -07:00
Elliott Hughes
a0a78c0a15 am 049d9caa: Merge "Make mksh\'s mkmf.sh target-agnostic."
* commit '049d9caadea06e990fa2f890b4e611adfdf01055':
  Make mksh's mkmf.sh target-agnostic.
2014-09-22 17:31:57 +00:00