diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-21 21:13:20 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-21 21:13:20 +0100 |
commit | 9041103ed4a5bd4406d05cf12e46330b3dabb33c (patch) | |
tree | 262250837ca28be59f8f7893867997c4f105fe6b /doc | |
parent | 6470d1e832f629e9366a168382be66328968a706 (diff) | |
download | gnulib-9041103ed4a5bd4406d05cf12e46330b3dabb33c.tar.gz |
login_tty: Ensure declaration in <utmp.h>.
* 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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/glibc-functions/login_tty.texi | 14 | ||||
-rw-r--r-- | doc/glibc-headers/utmp.texi | 34 | ||||
-rw-r--r-- | doc/gnulib.texi | 2 |
3 files changed, 43 insertions, 7 deletions
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{<utmp.h>} on glibc, Cygwin, Android, +in @code{<util.h>} on macOS 11.1, NetBSD 5.0, OpenBSD 3.8, +and in @code{<libutil.h>} on FreeBSD 13.0, Haiku. +@c Also note that @code{<sys/types.h>} is +@c a prerequisite of @code{<utmp.h>} on FreeBSD 8.0, OpenBSD 4.6 and +@c of @code{<libutil.h>} 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{<utmp.h>} on glibc, Cygwin, -in @code{<util.h>} on macOS 11.1, NetBSD 5.0, OpenBSD 3.8, -and in @code{<libutil.h>} on FreeBSD 13.0, Haiku. -Also note that @code{<sys/types.h>} is -a prerequisite of @code{<utmp.h>} on FreeBSD 8.0, OpenBSD 4.6 and -of @code{<libutil.h>} 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{<sys/types.h>} is a prerequisite of @code{<utmp.h>} 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 |