forkpty, openpty: prefer glibc's const-safe prototype
authorEric Blake <eblake@redhat.com>
Thu, 18 Mar 2010 22:34:11 +0000 (16:34 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 19 Mar 2010 15:35:18 +0000 (09:35 -0600)
commit8e7bc4d9d435c2d18be77134896aa823733816a0
tree8a66254c4937bfa6ecd735e36ee27d398fc00539
parent9d84afa467b0a9abcd6e0d90fc7d1608f07bf2f1
forkpty, openpty: prefer glibc's const-safe prototype

This silences a compiler warning for test-forkpty.c.

* lib/forkpty.c (rpl_forkpty): New file.
* lib/openpty.c (rpl_openpty): Likewise.
* modules/forkpty (Files): Distribute it.
* modules/openpty (Files): Likewise.
* m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses.  Move decl
check...
* m4/pty.m4 (gl_FORKPTY, gl_OPENPTY): ...here.  Request
replacement for for non-const BSD signature.
* modules/pty (Makefile.am): Substitute witnesses.
* lib/pty.in.h (forkpty, openpty): Declare replacements.
* tests/test-forkpty.c: Update signature check.
* tests/test-openpty.c: Likewise.
* doc/glibc-functions/forkpty.texi (forkpty): Document the fix.
* doc/glibc-functions/openpty.texi (openpty): Likewise.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 files changed:
ChangeLog
doc/glibc-functions/forkpty.texi
doc/glibc-functions/openpty.texi
lib/forkpty.c [new file with mode: 0644]
lib/openpty.c [new file with mode: 0644]
lib/pty.in.h
m4/pty.m4
m4/pty_h.m4
modules/forkpty
modules/openpty
modules/pty
tests/test-openpty.c