fix #1445 These changes optimize for Linux at the possible expense of non-conforming platforms like HP-UX.