summaryrefslogtreecommitdiff
path: root/m4/pty.m4
Commit message (Collapse)AuthorAgeFilesLines
* forkpty, openpty, login_tty: Fix link errors of the tests.Bruno Haible2023-04-051-11/+18
| | | | * m4/pty.m4 (gl_PTY_LIB): On Haiku, set PTY_LIB to '-lbsd'.
* login_tty: Ensure declaration in <utmp.h>.Bruno Haible2023-01-211-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/test-utmp-c++.cc: New file. * modules/utmp-c++-tests: New file. * tests/test-utmp.c: New file. * modules/utmp-tests: New file. * lib/login_tty.c: Include <utmp.h>. * m4/login_tty.m4: New file. (gl_FUNC_LOGIN_TTY): Moved here from m4/pty.m4. Set HAVE_LOGIN_TTY. * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Moved to m4/login_tty.m4. * modules/login_tty (Files): Add m4/login_tty.m4. (Depends-on): Add utmp. Remove pty. Update condition. (configure.ac): Update condition. Invoke gl_UTMP_MODULE_INDICATOR instead of gl_PTY_MODULE_INDICATOR. (Include): List <utmp.h>. * doc/glibc-functions/login_tty.texi: Mark the include file diversity as fixed. * tests/test-login_tty.c: Include <utmp.h>. Don't declare login_tty here. * lib/utmp.in.h: New file. * m4/utmp_h.m4: New file. * modules/utmp: New file. * doc/glibc-headers/utmp.texi: New file. * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
* login_tty: Fix detection of declaration (regression 2023-01-19).Bruno Haible2023-01-211-2/+13
| | | | | * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Check for the three possible header files.
* Fix warnings for functions introduced in Android API level 23.Bruno Haible2023-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test for __flbf, __fbufsize using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): Test for mempcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/fpurge.m4 (gl_FUNC_FPURGE): Test for __fpurge using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/freadable.m4 (gl_FUNC_FREADABLE): Test for __freadable using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Test for __fwritable using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Test for __fsetlocking using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Test for mempcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mkfifoat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Test for mkostemp using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Test for mkostemps using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Test for login_tty using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Test for sethostname using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Test for strerror_r using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Test for wmempcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* Fix warnings for functions introduced in Android API level 21.Bruno Haible2023-01-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/_Exit.m4 (gl_FUNC__EXIT): Test for _Exit using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/c-strtod.m4 (gl_C_STRTOLD): Test for strtold_l using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb like gl_CHECK_FUNCS_ANDROID does. * m4/dprintf.m4 (gl_FUNC_DPRINTF): Test for dprintf using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise. * m4/dup3.m4 (gl_FUNC_DUP3): Test for dup3 using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for duplocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/execvpe.m4 (gl_FUNC_EXECVPE): Test for execvpe using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/fts.m4 (gl_FUNC_FTS_CORE): Test for fts_open using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC. * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Test for getprogname using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Test for uselocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Test for iswblank using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Test for tcdrain using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/linkat.m4 (gl_FUNC_LINKAT): Test for linkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/localename.m4 (gl_LOCALENAME): Test for newlocale, duplocale, freelocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): Test for mbrtoc32 like gl_CHECK_FUNCS_ANDROID does. * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Test for mbsnrtowcs using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test for mbtowc using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mountlist.m4 (gl_MOUNTLIST): Test for setmntent, endmntent using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Test for posix_openpt using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/pty.m4 (gl_FUNC_OPENPTY): Test for posix_openpt using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/random.m4 (gl_FUNC_RANDOM): Test for initstate, setstate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/stpcpy.m4 (gl_FUNC_STPCPY): Test for stpcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Test for stpncpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Test for symlinkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test for truncate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for twalk using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/vdprintf.m4 (gl_FUNC_VDPRINTF): Test for vdprintf using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise. * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Test for wcsnrtombs using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Test for readlinkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Likewise. * modules/careadlinkat (configure.ac): Likewise. * modules/ftoastr (configure.ac): Test for strtof using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/duplocale-tests (configure.ac): Test for duplocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/hard-locale-tests (configure.ac): Likewise. * modules/locale-tests (configure.ac): Test for newlocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/localename-tests (configure.ac): Likewise. * modules/tsearch-tests (configure.ac): Test for initstate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/unistr/u8-stpcpy (configure.ac): Test for stpcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/tcgetattr.m4: New file, extracted from m4/getpass.m4. * m4/getpass.m4 (gl_PREREQ_GETPASS): Remove code that tests for tcgetattr. Invoke gl_HAVE_TCGETATTR instead. * modules/getpass (Files): Add tcgetattr.m4. * modules/getpass-gnu (Files): Add tcgetattr.m4. * modules/term-style-control (Files): Add tcgetattr.m4. (configure.ac): Remove code that tests for tcgetattr. Invoke gl_HAVE_TCGETATTR instead.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* openpty, forkpty: Fix build error on Solaris 11.4.Bruno Haible2019-11-281-1/+13
| | | | | | | | | * m4/pty_h.m4 (gl_PTY_H): Test for termios.h. Look for the declarations also in <termios.h>. * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Look for the declaration of the function also in <termios.h>. * doc/glibc-functions/openpty.texi: Mention the Solaris 11.4 problems. * doc/glibc-functions/forkpty.texi: Likewise.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* pty: Activate the signature wrapper of forkpty.Mats Erik Andersson2013-11-271-1/+3
| | | | | | | | | The intended preprocessor macro HAVE_FORKPTY is never defined, yet `lib/forkpty.c' depends on it. * m4/pty.m4 (gl_FUNC_FORKPTY): At completed analysis, apply AC_DEFINE_UNQUOTED to HAVE_FORKPTY with value $HAVE_FORKPTY for access to wrapper in `lib/forkpty.c'.
* openpty: fix bug where HAVE_OPENPTY is mistakenly 1Paul Eggert2013-02-081-10/+8
| | | | | | | | | Problem reported by Mats Erik Andersson in <http://lists.gnu.org/archive/html/bug-gnulib/2013-02/msg00051.html>. * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the openpty function exists, not merely when we intend to replace it. This corrects the 2013-01-31 patch, which mistakenly defined HAVE_OPENPTY even on hosts that lacked it.
* openpty: fix bug where HAVE_OPENPTY wasn't definedReuben Thomas2013-01-311-8/+10
| | | | | | | See the thread starting at: http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00185.html * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the openpty function exists, not merely when we intend to replace it.
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* login_tty: Move AC_LIBOBJ invocations to module description.Bruno Haible2011-06-161-4/+1
| | | | | * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Move AC_LIBOBJ invocation from here... * modules/login_tty (configure.ac): ... to here.
* openpty: Move AC_LIBOBJ invocations to module description.Bruno Haible2011-06-161-3/+2
| | | | | * m4/pty.m4 (gl_FUNC_OPENPTY): Move AC_LIBOBJ invocations from here... * modules/openpty (configure.ac): ... to here.
* forkpty: Move AC_LIBOBJ invocations to module description.Bruno Haible2011-06-161-3/+1
| | | | | * m4/pty.m4 (gl_FUNC_FORKPTY): Move AC_LIBOBJ invocations from here... * modules/forkpty (configure.ac): ... to here.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* login_tty: Fix detection of function on FreeBSD, OpenBSD, NetBSD.Bruno Haible2010-09-171-2/+5
| | | | | | * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Augment LIBS while checking whether login_tty exists. Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
* pty, readutmp: Fix for FreeBSD 8.0 and OpenBSD 4.6.Bruno Haible2010-09-101-1/+9
| | | | | | | | | | | | * doc/glibc-functions/login_tty.texi: Mention the include file problem on FreeBSD 8.0 and OpenBSD 4.6. * lib/pty.in.h: Include <sys/types.h> before <libutil.h>. * m4/pty_h.m4 (gl_PTY_H): Likewise. * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Likewise. * m4/readutmp.m4 (gl_READUTMP): Include <sys/types.h> before <utmp.h>. Invoke AC_INCLUDES_DEFAULT instead of using the undocumented variable ac_includes_default. Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
* openpty: Fix mistake from 2010-03-21.Bruno Haible2010-04-161-1/+3
|
* Rename gl_FORKPTY and gl_OPENPTY.Bruno Haible2010-03-271-3/+3
|
* forkpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.Bruno Haible2010-03-221-17/+24
|
* New module 'login_tty'.Bruno Haible2010-03-221-1/+11
|
* pty: Consistent macro naming.Bruno Haible2010-03-221-3/+3
|
* openpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.Bruno Haible2010-03-221-16/+27
|
* forkpty, openpty: prefer glibc's const-safe prototypeEric Blake2010-03-191-1/+81
| | | | | | | | | | | | | | | | | | | | | | 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>
* forkpty, openpty: split functions into new modulesEric Blake2010-03-191-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pty: improve replacement headerEric Blake2010-03-191-43/+0
| | | | | | | | | | | | | | | Build pty.h in the same way as all other replacement headers. * lib/pty.in.h: New file. * modules/pty (Files): Ship it. (Makefile.am): Always build replacement. * m4/pty.m4: Rename... * m4/pty_h.m4: ...to this. (gl_PTY): Modernize setting of witness macros; update check of forkpty to take proper advantage of cache. (gl_PTY_MODULE_INDICATOR, gl_PTY_H_DEFAULTS): New macros. Signed-off-by: Eric Blake <eblake@redhat.com>
* pty: Make forkpty check work.Simon Josefsson2010-03-171-0/+1
|
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-1/+1
|
* Add pty module for forkpty and openpty.Simon Josefsson2009-12-101-0/+42