]> Savannah Git Hosting - gnulib.git/commit
boot-time: Simplify execution.
authorBruno Haible <bruno@clisp.org>
Fri, 11 Aug 2023 21:30:01 +0000 (23:30 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 11 Aug 2023 21:30:01 +0000 (23:30 +0200)
commitbea15dd14f8388a4b78b63ecfa0decad0414ec88
tree0afa6c01d5429ffe5cba7856484a36354c053e8c
parent1657e67fe3f4be3cd572430358991bc12c62b193
boot-time: Simplify execution.

* lib/boot-time.c: Include <stdio.h>, <string.h>, <sys/types.h>,
<sys/stat.h>, <sys/sysinfo.h>, <time.h>, stat-time.h, unlocked-io.h,
boot-time-aux.h.
(UT_USER): New macro, from lib/readutmp.c.
(getutent): New declaration.
(get_boot_time_uncached): New function, containing a simplified code
from lib/readutmp.c.
(get_boot_time): Don't invoke read_utmp. Instead, invoke
get_boot_time_uncached and cache the result.
* modules/boot-time (Files): Add lib/boot-time-aux.h, lib/readutmp.h,
m4/readutmp.m4.
(Depends-on): Remove readutmp. Add extensions, fopen-gnu, stat-time,
stdbool, time-h, timespec_get, unlocked-io-internal.
(configure.ac): Invoke gl_PREREQ_READUTMP_H.
(Link): Remove $(READUTMP_LIB). Add $(CLOCK_TIME_LIB).
* modules/boot-time-tests (Makefile.am): Link test-boot-time with
$(CLOCK_TIME_LIB), not with $(READUTMP_LIB).
ChangeLog
lib/boot-time.c
modules/boot-time
modules/boot-time-tests