ptsname_r: Work around ptsname_r bug on Solaris 11 OmniOS. * lib/ptsname_r.c (ptsname_r): Ensure the resulting buffer is not clobbered if it is too small on Solaris 11 OmniOS. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): On Solaris 11 OmniOS, arrange to override ptsname_r. * doc/posix-functions/ptsname_r.texi: Document the bug.