make [U]INTn_C() macros have the right type...
[musl] / include / utmpx.h
1 #ifndef _UTMPX_H
2 #define _UTMPX_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define __NEED_pid_t
9 #define __NEED_time_t
10 #define __NEED_struct_timeval
11
12 #include <bits/alltypes.h>
13
14 #define UT_LINESIZE 32
15
16 struct utmpx
17 {
18         short ut_type;
19         pid_t ut_pid;
20         char ut_line[UT_LINESIZE];
21         char ut_id[4];
22         char ut_user[32];
23         char ut_host[256];
24         struct {
25                 short e_termination;
26                 short e_exit;
27         } ut_exit;
28         long ut_session;
29         struct timeval ut_tv;
30         unsigned ut_addr_v6[4];
31         char __unused[20];
32 };
33
34 void          endutxent(void);
35 struct utmpx *getutxent(void);
36 struct utmpx *getutxid(const struct utmpx *);
37 struct utmpx *getutxline(const struct utmpx *);
38 struct utmpx *pututxline(const struct utmpx *);
39 void          setutxent(void);
40
41 void updwtmpx(const char *, const struct utmpx *);
42
43 #define EMPTY           0
44 #define RUN_LVL         1
45 #define BOOT_TIME       2
46 #define NEW_TIME        3
47 #define OLD_TIME        4
48 #define INIT_PROCESS    5
49 #define LOGIN_PROCESS   6
50 #define USER_PROCESS    7
51 #define DEAD_PROCESS    8
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif