ptsname_r: new module
authorEric Blake <eblake@redhat.com>
Mon, 7 Nov 2011 22:26:08 +0000 (15:26 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 9 Nov 2011 22:53:07 +0000 (15:53 -0700)
commit78232883c8c01a22307bb38793928f2b9a5a6159
treeeb53e0effab97294bfc73767a34cc5270f5b99c0
parentc025e2c9516ad949e0b8c97aacc2dd811909d877
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>
12 files changed:
ChangeLog
MODULES.html.sh
doc/glibc-functions/ptsname_r.texi
doc/posix-functions/ptsname.texi
lib/ptsname.c
lib/ptsname_r.c [new file with mode: 0644]
lib/stdlib.in.h
m4/ptsname_r.m4 [new file with mode: 0644]
m4/stdlib_h.m4
modules/ptsname
modules/ptsname_r [new file with mode: 0644]
modules/stdlib