]> git.ipfire.org Git - thirdparty/gnulib.git/commit
readutmp: Add option to make use of wtmpdb. master
authorBruno Haible <bruno@clisp.org>
Tue, 4 Aug 2026 15:03:56 +0000 (17:03 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 4 Aug 2026 15:03:56 +0000 (17:03 +0200)
commite7714db1afe6888e0f6153a31bdbc388f6d78aff
tree25a57f4a9be16374c5936729b193fff6f4adea23
parentd7daeeb755a210982d0da08b7180aac983077b27
readutmp: Add option to make use of wtmpdb.

* m4/wtmpdb.m4: New file.
* m4/readutmp.m4 (gl_READUTMP): Invoke gl_WTMPDB_CHOICE. Define
READUTMP_USE_WTMPDB. Take it into account for READUTMP_LIB.
* lib/readutmp.h (WTMPDB_FILE): New macro.
* lib/readutmp.c: Include <wtmpdb.h>.
(wtmpdb_time_to_timespec): New function.
(struct wtmpdb_locals): New type.
(wtmpdb_callback, read_utmp_from_wtmpdb): New functions.
(read_utmp): For WTMP_FILE, conditionally use read_utmp_from_wtmpdb.
* modules/readutmp (Files): Add m4/wtmpdb.m4.
(Depends-on): Add str_endswith.
* DEPENDENCIES: Mention libwtmpdb.
ChangeLog
DEPENDENCIES
lib/readutmp.c
lib/readutmp.h
m4/readutmp.m4
m4/wtmpdb.m4 [new file with mode: 0644]
modules/readutmp