projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s/argmatch_exit_failure/argmatch_die/
[gnulib.git]
/
lib
/
readutmp.h
diff --git
a/lib/readutmp.h
b/lib/readutmp.h
index
28afb78
..
069895f
100644
(file)
--- a/
lib/readutmp.h
+++ b/
lib/readutmp.h
@@
-1,5
+1,5
@@
/* Declarations for GNU's read utmp module.
/* Declarations for GNU's read utmp module.
- Copyright (C) 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 92, 93, 94, 95, 96, 1997
, 1998
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-20,19
+20,29
@@
#ifndef __READUTMP_H__
# define __READUTMP_H__
#ifndef __READUTMP_H__
# define __READUTMP_H__
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+# endif
+
# include <stdio.h>
# include <sys/types.h>
# ifdef HAVE_UTMPX_H
# include <utmpx.h>
# include <stdio.h>
# include <sys/types.h>
# 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 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
# 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>
# include <time.h>
# ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
@@
-69,8
+79,6
@@
extern int errno;
# define WTMP_FILE "/etc/wtmp"
# endif
# define WTMP_FILE "/etc/wtmp"
# endif
-extern STRUCT_UTMP * utmp_contents;
-
# undef PARAMS
# if defined (__STDC__) && __STDC__
# define PARAMS(Args) Args
# undef PARAMS
# if defined (__STDC__) && __STDC__
# define PARAMS(Args) Args
@@
-78,7
+86,8
@@
extern STRUCT_UTMP * utmp_contents;
# define PARAMS(Args) ()
# endif
# 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__ */
#endif /* __READUTMP_H__ */