summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-10-17 17:19:41 -0600
committerEric Blake <eblake@redhat.com>2011-10-18 15:15:44 -0600
commit94d63c4bfd95e7ff11c3dcbc1d60d276739f7f55 (patch)
tree28aa8c76eef4600791cc11075409784b29aa22b3 /modules
parent0a19a162755da4ef297bcacd62cf5243c76324ed (diff)
downloadgnulib-94d63c4bfd95e7ff11c3dcbc1d60d276739f7f55.tar.gz
posix_openpt: new module
* modules/posix_openpt: New module. * m4/posix_openpt.m4: New file. * lib/posix_openpt.c: Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl. (gl_STDLIB_H_DEFAULTS): Set defaults. * modules/stdlib (Makefile.am): Substitute macros. * lib/stdlib.in.h (posix_openpt): Declare. * MODULES.html.sh (systems lacking POSIX:2008): Document it. * doc/posix-functions/posix_openpt.texi (posix_openpt): Likewise. * modules/posix_openpt-tests: New test module. * tests/test-posix_openpt.c: New test.
Diffstat (limited to 'modules')
-rw-r--r--modules/posix_openpt28
-rw-r--r--modules/posix_openpt-tests15
-rw-r--r--modules/stdlib2
3 files changed, 45 insertions, 0 deletions
diff --git a/modules/posix_openpt b/modules/posix_openpt
new file mode 100644
index 0000000000..5bef9e27a7
--- /dev/null
+++ b/modules/posix_openpt
@@ -0,0 +1,28 @@
+Description:
+posix_openpt() function: Open the master side of a pseudo-terminal.
+
+Files:
+lib/posix_openpt.c
+m4/posix_openpt.m4
+
+Depends-on:
+extensions
+stdlib
+
+configure.ac:
+gl_FUNC_POSIX_OPENPT
+if test $HAVE_POSIX_OPENPT = 0; then
+ AC_LIBOBJ([posix_openpt])
+fi
+gl_STDLIB_MODULE_INDICATOR([posix_openpt])
+
+Makefile.am:
+
+Include:
+<stdlib.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Eric Blake
diff --git a/modules/posix_openpt-tests b/modules/posix_openpt-tests
new file mode 100644
index 0000000000..9ebf805267
--- /dev/null
+++ b/modules/posix_openpt-tests
@@ -0,0 +1,15 @@
+Files:
+tests/test-posix_openpt.c
+tests/signature.h
+tests/macros.h
+
+Depends-on:
+grantpt
+ptsname
+unlockpt
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-posix_openpt
+check_PROGRAMS += test-posix_openpt
diff --git a/modules/stdlib b/modules/stdlib
index 9ab19ee486..707d5e5d7d 100644
--- a/modules/stdlib
+++ b/modules/stdlib
@@ -45,6 +45,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
-e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
-e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
-e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
-e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
@@ -71,6 +72,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
-e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
-e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \