comparison lib/readutmp.h @ 1829:ae596af5aea1

Add definitions to help read utmpx on systems with utmpname. (UTMP_NAME_FUNCTION): Define. (SET_UTMP_ENT): Likewise. (GET_UTMP_ENT): Likewise. (END_UTMP_ENT): Likewise.
author Jim Meyering <jim@meyering.net>
date Wed, 05 May 1999 13:34:02 +0000
parents 90523633ed59
children 1b6275c2d099
comparison
equal deleted inserted replaced
1828:b95eae14a459 1829:ae596af5aea1
32 32
33 # ifdef HAVE_UTMPX_H 33 # ifdef HAVE_UTMPX_H
34 # include <utmpx.h> 34 # include <utmpx.h>
35 # define UTMP_STRUCT_NAME utmpx 35 # define UTMP_STRUCT_NAME utmpx
36 # define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_tv.tv_sec) 36 # define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_tv.tv_sec)
37 # define SET_UTMP_ENT setutxent
38 # define GET_UTMP_ENT getutxent
39 # define END_UTMP_ENT endutxent
40 # define UTMP_NAME_FUNCTION utmpxname
37 # else 41 # else
38 # include <utmp.h> 42 # include <utmp.h>
39 # define UTMP_STRUCT_NAME utmp 43 # define UTMP_STRUCT_NAME utmp
40 # define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_time) 44 # define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_time)
45 # define SET_UTMP_ENT setutent
46 # define GET_UTMP_ENT getutent
47 # define END_UTMP_ENT endutent
48 # define UTMP_NAME_FUNCTION utmpname
41 # endif 49 # endif
42 50
43 typedef struct UTMP_STRUCT_NAME STRUCT_UTMP; 51 typedef struct UTMP_STRUCT_NAME STRUCT_UTMP;
44 52
45 # include <time.h> 53 # include <time.h>