fix negated error codes from ptsname_r
fix negated error codes from ptsname_r

the incorrect error codes also made their way into errno when
__ptsname_r was called by plain ptsname, which reports errors via
errno rather than a return value.

chardi/musl,chardi/musl,chardi/musl