a1bffdbd3139a6fd8cc3e5201fbce0ee1a200e4c
[libc-test] / src / api / utmpx.c
1 #include <utmpx.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
5 static void f()
6 {
7 T(pid_t)
8 T(struct timeval)
9 {
10 struct utmpx x;
11 F(char,ut_user[0])
12 F(char,ut_id[0])
13 F(char,ut_line[0])
14 F(pid_t, ut_pid)
15 F(short, ut_type)
16 F(struct timeval,ut_tv)
17 }
18 C(EMPTY)
19 C(BOOT_TIME)
20 C(OLD_TIME)
21 C(NEW_TIME)
22 C(USER_PROCESS)
23 C(INIT_PROCESS)
24 C(LOGIN_PROCESS)
25 C(DEAD_PROCESS)
26 void(*p_endutxent)(void) = endutxent;
27 struct utmpx*(*p_getutxent)(void) = getutxent;
28 struct utmpx*(*p_getutxid)(const struct utmpx*) = getutxid;
29 struct utmpx*(*p_getutxline)(const struct utmpx*) = getutxline;
30 struct utmpx*(*p_pututxline)(const struct utmpx*) = pututxline;
31 void(*p_setutxent)(void) = setutxent;
32 }