libc: rename (io-error) to throw-errno.
libc: reduce code duplication.