summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-03-18 13:49:25 -0600
committerEric Blake <eblake@redhat.com>2010-03-19 09:34:35 -0600
commit9d84afa467b0a9abcd6e0d90fc7d1608f07bf2f1 (patch)
treea96f29ad77e1b9fc162620ac6102bb2c9eb58a47 /modules
parent953fd38889e35a0ddbf8e9ada17f4fd001662003 (diff)
downloadgnulib-9d84afa467b0a9abcd6e0d90fc7d1608f07bf2f1.tar.gz
forkpty, openpty: split functions into new modules
The pty module was doing too much - replacing the header and checking for functions. In the future, when we provide a working forkpty for Solaris and HP-UX, and a stub for mingw, then the separation will be even more useful. * modules/pty (Makefile.am): Substitute new witnesses. (Libraries): Move library detection... * modules/forkpty: ...into new module. * modules/openpty: Another new module. * modules/pty-tests: Rename and split... * modules/forkpty-tests: ...to this... * modules/openpty-tests: ...and this. * tests/test-pty.c: Rename and split... * tests/test-forkpty.c: ...to this... * tests/test-openpty.c: ...and this. * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses. (gl_PTY): Split library searching... * m4/pty.m4 (gl_PTY_LIB): ...into new file. (gl_FORKPTY, gl_OPENPTY): New macros. * lib/pty.in.h (forkpty, openpty): Honor new witnesses. * NEWS: Mention the split. * MODULES.html.sh (Misc): Document the modules. * doc/glibc-functions/forkpty.texi (forkpty): Likewise. * doc/glibc-functions/openpty.texi (openpty): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/forkpty26
-rw-r--r--modules/forkpty-tests8
-rw-r--r--modules/openpty26
-rw-r--r--modules/openpty-tests8
-rw-r--r--modules/pty2
-rw-r--r--modules/pty-tests8
6 files changed, 70 insertions, 8 deletions
diff --git a/modules/forkpty b/modules/forkpty
new file mode 100644
index 0000000000..5bfe0a5dea
--- /dev/null
+++ b/modules/forkpty
@@ -0,0 +1,26 @@
+Description:
+Provide the forkpty() function.
+
+Files:
+m4/pty.m4
+
+Depends-on:
+pty
+
+configure.ac:
+gl_FORKPTY
+gl_PTY_MODULE_INDICATOR([forkpty])
+
+Makefile.am:
+
+Include:
+<pty.h>
+
+Link:
+$(PTY_LIB)
+
+License:
+LGPL
+
+Maintainer:
+Simon Josefsson
diff --git a/modules/forkpty-tests b/modules/forkpty-tests
new file mode 100644
index 0000000000..744d684869
--- /dev/null
+++ b/modules/forkpty-tests
@@ -0,0 +1,8 @@
+Files:
+tests/signature.h
+tests/test-forkpty.c
+
+Makefile.am:
+TESTS += test-forkpty
+check_PROGRAMS += test-forkpty
+test_forkpty_LDADD = $(LDADD) $(PTY_LIB)
diff --git a/modules/openpty b/modules/openpty
new file mode 100644
index 0000000000..68e00db4a6
--- /dev/null
+++ b/modules/openpty
@@ -0,0 +1,26 @@
+Description:
+Provide the openpty() function.
+
+Files:
+m4/pty.m4
+
+Depends-on:
+pty
+
+configure.ac:
+gl_OPENPTY
+gl_PTY_MODULE_INDICATOR([openpty])
+
+Makefile.am:
+
+Include:
+<pty.h>
+
+Link:
+$(PTY_LIB)
+
+License:
+LGPL
+
+Maintainer:
+Simon Josefsson
diff --git a/modules/openpty-tests b/modules/openpty-tests
new file mode 100644
index 0000000000..8b730e68be
--- /dev/null
+++ b/modules/openpty-tests
@@ -0,0 +1,8 @@
+Files:
+tests/signature.h
+tests/test-openpty.c
+
+Makefile.am:
+TESTS += test-openpty
+check_PROGRAMS += test-openpty
+test_openpty_LDADD = $(LDADD) $(PTY_LIB)
diff --git a/modules/pty b/modules/pty
index ef064be8e3..8ea7ed3e32 100644
--- a/modules/pty
+++ b/modules/pty
@@ -25,6 +25,8 @@ pty.h: pty.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_PTY_H''@|$(NEXT_PTY_H)|g' \
+ -e 's|@''GNULIB_FORKPTY''@|$(GNULIB_FORKPTY)|g' \
+ -e 's|@''GNULIB_OPENPTY''@|$(GNULIB_OPENPTY)|g' \
-e 's|@''HAVE_UTIL_H''@|$(HAVE_UTIL_H)|g' \
-e 's|@''HAVE_LIBUTIL_H''@|$(HAVE_LIBUTIL_H)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
diff --git a/modules/pty-tests b/modules/pty-tests
deleted file mode 100644
index 870d5182f7..0000000000
--- a/modules/pty-tests
+++ /dev/null
@@ -1,8 +0,0 @@
-Files:
-tests/signature.h
-tests/test-pty.c
-
-Makefile.am:
-TESTS += test-pty
-check_PROGRAMS += test-pty
-test_pty_LDADD = $(LDADD) $(PTY_LIB)