same function in the readline library.
Submitted-by: Andrew L. Neporada <andrew@chg.ru> (ports/18158)