From 9041103ed4a5bd4406d05cf12e46330b3dabb33c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 21 Jan 2023 21:13:20 +0100 Subject: login_tty: Ensure declaration in . * 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 . * 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 . * doc/glibc-functions/login_tty.texi: Mark the include file diversity as fixed. * tests/test-login_tty.c: Include . 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. --- doc/glibc-functions/login_tty.texi | 14 +++++++------- doc/glibc-headers/utmp.texi | 34 ++++++++++++++++++++++++++++++++++ doc/gnulib.texi | 2 ++ 3 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 doc/glibc-headers/utmp.texi (limited to 'doc') diff --git a/doc/glibc-functions/login_tty.texi b/doc/glibc-functions/login_tty.texi index b1adf8cd0b..3e743b1527 100644 --- a/doc/glibc-functions/login_tty.texi +++ b/doc/glibc-functions/login_tty.texi @@ -23,6 +23,13 @@ Portability problems fixed by Gnulib: This function is missing on some platforms: Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.3, Android 5.1. @item +This function is declared in @code{} on glibc, Cygwin, Android, +in @code{} on macOS 11.1, NetBSD 5.0, OpenBSD 3.8, +and in @code{} on FreeBSD 13.0, Haiku. +@c Also note that @code{} is +@c a prerequisite of @code{} on FreeBSD 8.0, OpenBSD 4.6 and +@c of @code{} on FreeBSD 8.0. +@item This function requires linking with @code{-lutil} on some platforms: glibc 2.3.6, FreeBSD 13.0, NetBSD 5.0, OpenBSD 3.8. It is available without link options on other platforms: @@ -34,11 +41,4 @@ Portability problems not fixed by Gnulib: @item This function is missing on some platforms: mingw, MSVC 14. -@item -This function is declared in @code{} on glibc, Cygwin, -in @code{} on macOS 11.1, NetBSD 5.0, OpenBSD 3.8, -and in @code{} on FreeBSD 13.0, Haiku. -Also note that @code{} is -a prerequisite of @code{} on FreeBSD 8.0, OpenBSD 4.6 and -of @code{} on FreeBSD 8.0. @end itemize diff --git a/doc/glibc-headers/utmp.texi b/doc/glibc-headers/utmp.texi new file mode 100644 index 0000000000..d7d1091e14 --- /dev/null +++ b/doc/glibc-headers/utmp.texi @@ -0,0 +1,34 @@ +@node utmp.h +@section @file{utmp.h} + +Defines functions for login and logout (to a tty session) and for examining the +history of logins and logouts. + +Documentation: +@itemize +@item +@ifinfo +@ref{Manipulating the Database,,Manipulating the User Accounting Database,libc}, +@end ifinfo +@ifnotinfo +@url{https://www.gnu.org/software/libc/manual/html_node/Manipulating-the-Database.html}, +@end ifnotinfo +@item +@uref{https://www.kernel.org/doc/man-pages/online/pages/man5/utmp.5.html,,man utmp}. +@end itemize + +Gnulib module: utmp + +Portability problems fixed by Gnulib: +@itemize +@item +This header file is missing on some platforms: +FreeBSD 13.0, mingw, MSVC 14. +@item +@code{} is a prerequisite of @code{} on some platforms: +FreeBSD 8.0, OpenBSD 7.2. +@end itemize + +Portability problems not fixed by Gnulib: +@itemize +@end itemize diff --git a/doc/gnulib.texi b/doc/gnulib.texi index 7388fb0b45..e9a4ace67f 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -3845,6 +3845,7 @@ not worked around by Gnulib. * sys/random.h:: * sysexits.h:: * ttyent.h:: +* utmp.h:: @end menu @include glibc-headers/a.out.texi @@ -3883,6 +3884,7 @@ not worked around by Gnulib. @include glibc-headers/sys_random.texi @include glibc-headers/sysexits.texi @include glibc-headers/ttyent.texi +@include glibc-headers/utmp.texi @node Glibc Function Substitutes @chapter Glibc Function Substitutes -- cgit v1.2.1