Hash :
78232883
Author :
Date :
2011-11-07T15:26:08
ptsname_r: new module For now, this replacement focuses solely on compilation compatibility, and assumes that isatty() and ttyname_r() work on a master side pty; if this assumption fails, or if thread-safety is also required, then a later patch can follow the lead of strerror_r.c in wrapping the system ptsname() with a lock. * modules/ptsname_r: New module. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): New file. * lib/ptsname.c (__ptsname_r): Split... * lib/ptsname_r.c: ...into new file. * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl. (gl_STDLIB_H_DEFAULTS): Set witness defaults. * modules/stdlib (Makefile.am): Substitute witnesses. * lib/stdlib.in.h (ptsname_r): Declare it. * doc/glibc-functions/ptsname_r.texi (ptsname_r): Document it. * MODULES.html.sh (Misc): Likewise. * modules/ptsname (Depends-on): Alter dependency. * doc/posix-functions/ptsname.texi (ptsname): Mention new module. Signed-off-by: Eric Blake <eblake@redhat.com>
@node ptsname
@section @code{ptsname}
@findex ptsname
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/ptsname.html}
Gnulib module: ptsname
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, mingw, MSVC 9, BeOS.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is not declared on some platforms:
IRIX 5.3.
@item
On Solaris 11 2010-11, this function fails on all BSD-style @file{/dev/pty*}
device files.
@item
This function is not thread-safe on some platforms:
Cygwin 1.7.9.
Likewise, the gnulib replacement is not thread-safe.
@end itemize
Note that the Gnulib module @code{ptsname_r} is a version of this
function that is more likely to be thread-safe.