diff options
author | Eric Blake <eblake@redhat.com> | 2011-11-07 15:26:08 -0700 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-11-09 15:53:07 -0700 |
commit | 78232883c8c01a22307bb38793928f2b9a5a6159 (patch) | |
tree | eb53e0effab97294bfc73767a34cc5270f5b99c0 /m4/stdlib_h.m4 | |
parent | c025e2c9516ad949e0b8c97aacc2dd811909d877 (diff) | |
download | gnulib-78232883c8c01a22307bb38793928f2b9a5a6159.tar.gz |
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>
Diffstat (limited to 'm4/stdlib_h.m4')
-rw-r--r-- | m4/stdlib_h.m4 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index fbdba980eb..ebf7fb52a9 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 37 +# stdlib_h.m4 serial 38 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,8 +21,8 @@ AC_DEFUN([gl_STDLIB_H], #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt - ptsname random_r realpath rpmatch setenv setstate_r srandom_r strtod - strtoll strtoull unlockpt unsetenv]) + ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srandom_r + strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -52,6 +52,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) + GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) @@ -79,6 +80,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) + HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) |