]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Make readutmp more consistent among its client code.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 30 Nov 2004 21:41:31 +0000 (21:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 30 Nov 2004 21:41:31 +0000 (21:41 +0000)
ChangeLog
lib/ChangeLog

index 7adaedc0e4f81e8edfdb4d9e93620676a28ca3ec..c107ca957ab384183d25b762c21d518c26409b9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,24 @@
-2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
+2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Version 5.3.0.
 
+       * src/pinky.c (gethostname): Remove decl.
+       (scan_entries): Use IS_USER_PROCESS instead of by-hand code.
+       * src/uptime.c (print_uptime): Use IS_USER_PROCESS and
+       UT_TYPE_BOOT_TIME instead of by-hand code.
+       * src/users.c (list_entries_users): Use IS_USER_PROCESS
+       instead of by-hand code.
+       * src/who.c (USER_PROCESS, RUN_LVL, INIT_PROCESS, LOGIN_PROCESS,
+       DEAD_PROCESS, BOOT_TIME, NEW_TIME, UT_TYPE_UNDEF, UT_TYPE): Remove.
+       (IS_USER_PROCESS): Move to ../lib/readutmp.h.
+       (UT_TYPE_RUN_LVL, UT_TYPE_INIT_PROCESS, UT_TYPE_LOGIN_PROCESS,
+       UT_TYPE_DEAD_PROCESS, UT_TYPE_NEW_TIME): New macros.
+       (gethostname): Remove decl.
+       (list_entries_who, scan_entries): Use the new macros defined above,
+       for consistency with pinky, uptime, and users.
+
+2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
+
        Fix problem reported by Scott S. Tinsley for HP-UX 11.11 using
        HP's ANSI C compiler.  Declaring int functions causes warnings on
        some modern systems and shouldn't be needed to compile on ancient
index 8760efafd9b5d23414a579447b0ce0b6bd493a75..abefd19cf3c471bf7d78c56d633aa02636ff6596 100644 (file)
@@ -1,3 +1,15 @@
+2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * readutmp.c: Include readutmp.h first.
+       Include <errno.h>, since readutmp.h no longer does that.
+       * readutmp.h: Don't include <sys/types.h>, <errno.h>,
+       <sys/param.h>, <time.h>; not needed to establish interface.
+       Include <stddef.h> instead.
+       (errno): Remove decl.
+       (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
+       (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
+       UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
+
 2004-11-30  Jim Meyering  <jim@meyering.net>
 
        Change the name of the robust chdir function from chdir to chdir_long.