attached there is a patch to fix few issues in Hurd's ptsname_r(),
mostly checking for more error conditions and making sure to set as
errno and return the proper values on error conditions.
[hurd_ptsname.diff] hurd: compliance fixes for ptsname_r
ptsname_r on failure returns the value that is also set as errno; furthermore,
add more checks to it.
* set errno to EINVAL and return it if `buf' is NULL
* set errno and return it on __term_get_peername failure
* set errno to ERANGE other than returning it
In ptsname do not set errno manually, since ptsname_r has set it already.
* sysdeps/mach/hurd/ptsname.c (ptsname): Do not manually set errno.
(__ptsname_r): Fail with EINVAL if `buf' is NULL. Set errno and return
it on __term_get_peername failure. Set errno when `buf' is too short.
@@ -33,8 +33,6 @@ ptsname (int fd)