From 1d8dc4293f772369e2da018ba5f1bf6e67967f3a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 23 Jan 1996 10:00:23 +0000 Subject: Mon Jan 22 10:40:40 1996 Roland McGrath * sysdeps/posix/getcwd.c [__GNU_LIBRARY__]: Include unistd.h. * io/fts.h (FTSENT): Define fts_compar member with prototype. * hurd/hurd.h: Use prototype in getcttyid decl. * stdlib/l64a.c: Fix typo in last change. * stdlib/drand48-iter.c: Test limits.h macros instead of sizeof for determining size of types. * stdlib/srand48_r.c: Likewise. * misc/utmp.h: Declare login, logout, logwtmp. * misc/logout.c: Declare argument as pointer to const. * misc/login.c: Likewise. * misc/logwtmp.c: Likewise. Include time.h, string.h. * misc/efgcvt_r.c: Include stdlib.h. * io/mknod.c: Include sys/types.h. * gmon/sys/gmon.h: Declare monstartup, _mcleanup. * csu/gmon-start.c (_start, etext): Declare with prototypes. * stdio-common/vfscanf.c (%[): Fix range handling. --- misc/utmp.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'misc/utmp.h') diff --git a/misc/utmp.h b/misc/utmp.h index 15c4e4fd3d..cfd9438f5f 100644 --- a/misc/utmp.h +++ b/misc/utmp.h @@ -41,6 +41,8 @@ #ifndef _UTMP_H_ #define _UTMP_H_ +#include + #define _PATH_UTMP "/var/run/utmp" #define _PATH_WTMP "/var/log/wtmp" #define _PATH_LASTLOG "/var/log/lastlog" @@ -49,6 +51,8 @@ #define UT_LINESIZE 8 #define UT_HOSTSIZE 16 +__BEGIN_DECLS + struct lastlog { time_t ll_time; char ll_line[UT_LINESIZE]; @@ -62,4 +66,17 @@ struct utmp { long ut_time; }; + +/* Write the given entry into utmp and wtmp. */ +extern void login __P ((const struct utmp *)); + +/* Write the utmp entry to say the user on UT_LINE has logged out. */ +extern int logout __P ((const char *ut_line)); + +/* Append to wtmp an entry for the current time and the given info. */ +extern void logwtmp __P ((const char *ut_line, const char *ut_name, + const char *ut_host)); + +__END_DECLS + #endif /* !_UTMP_H_ */ -- cgit v1.2.3