Adding the perfunctory <ctype.h> tests showed that we'd accidentally dropped several symbols. This puts everything back in its proper place and switches us to upstream head at the same time. Change-Id: Ib527ad280c9baded81e667fa598698526d93e66f