1 /* Copyright (C) 1997-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
24 /* Required according to Unix98. */
25 #ifndef __pid_t_defined
26 typedef __pid_t pid_t
;
27 # define __pid_t_defined
30 /* Get system dependent values and data structures. */
31 #include <bits/utmpx.h>
34 /* Compatibility names for the strings of the canonical file names. */
35 # define UTMPX_FILE _PATH_UTMPX
36 # define UTMPX_FILENAME _PATH_UTMPX
37 # define WTMPX_FILE _PATH_WTMPX
38 # define WTMPX_FILENAME _PATH_WTMPX
41 /* For the getutmp{,x} functions we need the `struct utmp'. */
49 /* Open user accounting database.
51 This function is a possible cancellation point and therefore not
52 marked with __THROW. */
53 extern void setutxent (void);
55 /* Close user accounting database.
57 This function is a possible cancellation point and therefore not
58 marked with __THROW. */
59 extern void endutxent (void);
61 /* Get the next entry from the user accounting database.
63 This function is a possible cancellation point and therefore not
64 marked with __THROW. */
65 extern struct utmpx
*getutxent (void);
67 /* Get the user accounting database entry corresponding to ID.
69 This function is a possible cancellation point and therefore not
70 marked with __THROW. */
71 extern struct utmpx
*getutxid (const struct utmpx
*__id
);
73 /* Get the user accounting database entry corresponding to LINE.
75 This function is a possible cancellation point and therefore not
76 marked with __THROW. */
77 extern struct utmpx
*getutxline (const struct utmpx
*__line
);
79 /* Write the entry UTMPX into the user accounting database.
81 This function is a possible cancellation point and therefore not
82 marked with __THROW. */
83 extern struct utmpx
*pututxline (const struct utmpx
*__utmpx
);
87 /* Change name of the utmpx file to be examined.
89 This function is not part of POSIX and therefore no official
90 cancellation point. But due to similarity with an POSIX interface
91 or due to the implementation it is a cancellation point and
92 therefore not marked with __THROW. */
93 extern int utmpxname (const char *__file
);
95 /* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
97 This function is not part of POSIX and therefore no official
98 cancellation point. But due to similarity with an POSIX interface
99 or due to the implementation it is a cancellation point and
100 therefore not marked with __THROW. */
101 extern void updwtmpx (const char *__wtmpx_file
,
102 const struct utmpx
*__utmpx
);
105 /* Copy the information in UTMPX to UTMP.
107 This function is not part of POSIX and therefore no official
108 cancellation point. But due to similarity with an POSIX interface
109 or due to the implementation it is a cancellation point and
110 therefore not marked with __THROW. */
111 extern void getutmp (const struct utmpx
*__utmpx
,
112 struct utmp
*__utmp
);
114 /* Copy the information in UTMP to UTMPX.
116 This function is not part of POSIX and therefore no official
117 cancellation point. But due to similarity with an POSIX interface
118 or due to the implementation it is a cancellation point and
119 therefore not marked with __THROW. */
120 extern void getutmpx (const struct utmp
*__utmp
, struct utmpx
*__utmpx
);