rework langinfo code for ABI compat and for use by time code
[musl] / unistd / ttyname_r.c