Mercurial > gnulib
diff 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 diff
--- a/doc/glibc-functions/ptsname_r.texi Sat Jan 26 11:56:31 2019 +0100 +++ b/doc/glibc-functions/ptsname_r.texi Sat Jan 26 15:23:19 2019 +0100 @@ -18,12 +18,17 @@ @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 -@item -When this functions fails, it provides the error code only as the -return value, without setting @code{errno}, on some platforms: -musl libc. @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.