I propose adding ptsname_r; I'll push this in 72 hours if I don't get any feedback. [Among other things, I would expect feedback to include whether ptsname_r should drag in locking, like our strerror_r module, or just assume that no one else uses ptsname, like our gmtime_r replacement in our time_r module.]
Patch 1 and 2 in isolation pass on Linux, Cygwin 1.7.9, and FreeBSD 8.2, but fail on Solaris 10. Patch 3 fixes Solaris 10, but regresses on FreeBSD. Patch 4 passes on all four platforms. Oh, and cygwin CVS (will become 1.7.10) just added ptsname_r today, although I'm still hoping that 1.7.10 will also add a patch to make ptsname() thread-safe without ptsname_r. Eric Blake (4): ptsname_r: new module ptsname_r-tests: new test module ptsname_r: port to Solaris ptsname_r: work around FreeBSD issue ChangeLog | 30 +++++ MODULES.html.sh | 1 + doc/glibc-functions/ptsname_r.texi | 9 +- doc/posix-functions/ptsname.texi | 10 ++ lib/ptsname.c | 69 +----------- lib/ptsname_r.c | 123 ++++++++++++++++++++ lib/stdlib.in.h | 17 +++ m4/ptsname.m4 | 4 +- m4/ptsname_r.m4 | 23 ++++ m4/stdlib_h.m4 | 8 +- modules/ptsname | 2 +- modules/ptsname_r | 30 +++++ modules/ptsname_r-tests | 14 +++ modules/stdlib | 2 + tests/test-ptsname_r.c | 225 ++++++++++++++++++++++++++++++++++++ 15 files changed, 489 insertions(+), 78 deletions(-) create mode 100644 lib/ptsname_r.c create mode 100644 m4/ptsname_r.m4 create mode 100644 modules/ptsname_r create mode 100644 modules/ptsname_r-tests create mode 100644 tests/test-ptsname_r.c -- 1.7.4.4