Commit c0a858b24839d69858a5418f30971fd355b42fc4

Paul Eggert 2023-08-03T16:01:50

readutmp: switch new struct to struct timespec * lib/readutmp.c (get_boot_time_uncached, get_boot_time) (add_utmp, read_utmp): Use struct timespec, not struct timeval. * lib/readutmp.h: Always include <time.h>, for struct timespec. Simplify when utmp.h and utmpx.h are included. (struct gl_utmp): Use the same struct for both the systemd and the dummy version. Reorder members, and use proper pid_t type for ut_session. Rename ut_tv to ut_ts and make it a struct timespec. All uses changed. (HAVE_GL_UTMP): New macro. Use it where appropriate, instead of READUTMP_USE_SYSTEMD. (UT_USER, HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID) (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_HOST): Simplify. * modules/readutmp (Depends-on): Add time-h, timespec_get. Remove sys_type. Sort.