view doc/glibc-functions/ptsname_r.texi @ 40140:81f075eaa990

ptsname_r: Work around bug on Android 4.3. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Define HAVE_ESSENTIALLY_WORKING_PTSNAME_R. Test whether the return value is correct. * lib/ptsname_r.c (__ptsname_r): If HAVE_ESSENTIALLY_WORKING_PTSNAME_R is defined, just fix the return value. * doc/glibc-functions/ptsname_r.texi: Mention the Android bug. Reword: The behaviour of musl libc is nothing to be "fixed", since it is compliant with the next POSIX standard.
author Bruno Haible <bruno@clisp.org>
date Sat, 26 Jan 2019 15:23:19 +0100
parents 73d60b1f9c96
children
line wrap: on
line source

@node ptsname_r
@subsection @code{ptsname_r}
@findex ptsname_r

Gnulib module: ptsname_r

Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8,
AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 1.7.9, mingw,
MSVC 14, BeOS.
@item
This function is not declared unless @code{_REENTRANT} is defined,
on some platforms:
OSF/1 5.1.
@item
This function has an incompatible declaration on some platforms:
OSF/1 5.1.
@item
When this functions fails, it returns -1 instead of the error code
on some platforms:
Android 4.3.
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@end itemize

Note: Portable programs should expect to find the error code as the
return value of this function, not as the value of @code{errno}.
This is needed for compatibility with musl libc and with the
forthcoming POSIX Issue 8.