(td_thr_tls_get_addr): Fix reference to dtv.
[glibc.git] / sysdeps / gnu / utmpx.h
blob1647bfe681a9b9444ec225f6b57ba5df5c2d7a3f
1 /* Copyright (C) 1997, 1998, 1999 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, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19 #ifndef _UTMPX_H
20 #define _UTMPX_H 1
22 #include <features.h>
23 #include <sys/time.h>
25 /* Required according to Unix98. */
26 #ifndef __pid_t_defined
27 typedef __pid_t pid_t;
28 # define __pid_t_defined
29 #endif
31 /* Get system dependent values and data structures. */
32 #include <bits/utmpx.h>
34 #ifdef __USE_GNU
35 /* Compatibility names for the strings of the canonical file names. */
36 # define UTMPX_FILE _PATH_UTMPX
37 # define UTMPX_FILENAME _PATH_UTMPX
38 # define WTMPX_FILE _PATH_WTMPX
39 # define WTMPX_FILENAME _PATH_WTMPX
40 #endif
42 /* For the getutmp{,x} functions we need the `struct utmp'. */
43 #ifdef __USE_GNU
44 struct utmp;
45 #endif
48 __BEGIN_DECLS
50 /* Open user accounting database. */
51 extern void setutxent (void) __THROW;
53 /* Close user accounting database. */
54 extern void endutxent (void) __THROW;
56 /* Get the next entry from the user accounting database. */
57 extern struct utmpx *getutxent (void) __THROW;
59 /* Get the user accounting database entry corresponding to ID. */
60 extern struct utmpx *getutxid (__const struct utmpx *__id) __THROW;
62 /* Get the user accounting database entry corresponding to LINE. */
63 extern struct utmpx *getutxline (__const struct utmpx *__line) __THROW;
65 /* Write the entry UTMPX into the user accounting database. */
66 extern struct utmpx *pututxline (__const struct utmpx *__utmpx) __THROW;
69 #ifdef __USE_GNU
70 /* Change name of the utmpx file to be examined. */
71 extern int utmpxname (__const char *__file) __THROW;
73 /* Append entry UTMP to the wtmpx-like file WTMPX_FILE. */
74 extern void updwtmpx (__const char *__wtmpx_file,
75 __const struct utmpx *__utmpx) __THROW;
78 /* Copy the information in UTMPX to UTMP. */
79 extern void getutmp (__const struct utmpx *__utmpx,
80 struct utmp *__utmp) __THROW;
82 /* Copy the information in UTMP to UTMPX. */
83 extern void getutmpx (__const struct utmp *__utmp,
84 struct utmpx *__utmpx) __THROW;
85 #endif
87 __END_DECLS
89 #endif /* utmpx.h */