Change the mmap(2)-based binary history file with lots of magic and a
tendency for corruption to a simpler plaintext version.
To convert your current ksh history to plaintext, issue
fc -ln 1 | sed 's/^ //' > ~/ksh_hist.txt
before upgrading and use ksh_hist.txt as HISTFILE after the upgrade.
Original patch by marco in 2011. Ported to current during g2k16 by me.
Testing, bugfixes and improvements in joint work with natano.
Additional testing by anton and mestre. Includes some tweaks by anton.
Committing now to shake out remaining bugs before 6.2 is cut.
ok deraadt, mestre, anton, sthen