diff options
author | Jim Meyering <jim@meyering.net> | 1997-07-13 03:55:38 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-07-13 03:55:38 +0000 |
commit | aba02b5978b5902fb8fdad11770cfc957e3c0fea (patch) | |
tree | 8735a74c50859d7c173d0a8d57b7839efadc12f7 | |
parent | 708d4a74de8bba5f87e83413a6e3078a3e5d8cb6 (diff) | |
download | coreutils-aba02b5978b5902fb8fdad11770cfc957e3c0fea.tar.xz |
(PARAMS): Update prototype.
(utmp_contents): Remove dcl.
-rw-r--r-- | lib/readutmp.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/readutmp.h b/lib/readutmp.h index 28afb780c..f96b9dc49 100644 --- a/lib/readutmp.h +++ b/lib/readutmp.h @@ -25,14 +25,16 @@ # ifdef HAVE_UTMPX_H # include <utmpx.h> -# define STRUCT_UTMP struct utmpx +# define UTMP_STRUCT_NAME utmpx # define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_tv.tv_sec) # else # include <utmp.h> -# define STRUCT_UTMP struct utmp +# define UTMP_STRUCT_NAME utmp # define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_time) # endif +typedef struct UTMP_STRUCT_NAME STRUCT_UTMP; + # include <time.h> # ifdef HAVE_SYS_PARAM_H # include <sys/param.h> @@ -69,8 +71,6 @@ extern int errno; # define WTMP_FILE "/etc/wtmp" # endif -extern STRUCT_UTMP * utmp_contents; - # undef PARAMS # if defined (__STDC__) && __STDC__ # define PARAMS(Args) Args @@ -78,7 +78,8 @@ extern STRUCT_UTMP * utmp_contents; # define PARAMS(Args) () # endif -extern char * extract_trimmed_name PARAMS((const STRUCT_UTMP *ut)); -extern int read_utmp PARAMS((const char *filename)); +extern char *extract_trimmed_name PARAMS ((const STRUCT_UTMP *ut)); +extern int read_utmp PARAMS ((const char *filename, + int *n_entries, STRUCT_UTMP **utmp_buf)); #endif /* __READUTMP_H__ */ |