tzfile.5, tzselect.8: sync from tzdb upstream
[man-pages.git] / man3 / getutmp.3
bloba8f422476d6a93fe8af3dbe662103c8aaf3d9201
1 '\" t
2 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH getutmp 3 (date) "Linux man-pages (unreleased)"
8 .SH NAME
9 getutmp, getutmpx \- copy utmp structure to utmpx, and vice versa
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ", " \-lc )
13 .SH SYNOPSIS
14 .nf
15 .BR "#define _GNU_SOURCE" "             /* See feature_test_macros(7) */"
16 .B #include <utmpx.h>
17 .PP
18 .BI "void getutmp(const struct utmpx *" ux ", struct utmp *" u );
19 .BI "void getutmpx(const struct utmp *" u ", struct utmpx *" ux );
20 .fi
21 .SH DESCRIPTION
22 The
23 .BR getutmp ()
24 function copies the fields of the
25 .I utmpx
26 structure pointed to by
27 .I ux
28 to the corresponding fields of the
29 .I utmp
30 structure pointed to by
31 .IR u .
32 The
33 .BR getutmpx ()
34 function performs the converse operation.
35 .SH RETURN VALUE
36 These functions do not return a value.
37 .SH VERSIONS
38 These functions were added in glibc 2.1.1.
39 .SH ATTRIBUTES
40 For an explanation of the terms used in this section, see
41 .BR attributes (7).
42 .ad l
43 .nh
44 .TS
45 allbox;
46 lbx lb lb
47 l l l.
48 Interface       Attribute       Value
50 .BR getutmp (),
51 .BR getutmpx ()
52 T}      Thread safety   MT-Safe
53 .TE
54 .hy
55 .ad
56 .sp 1
57 .SH STANDARDS
58 These functions are nonstandard, but appear on a few other systems,
59 such as Solaris and NetBSD.
60 .SH NOTES
61 These functions exist primarily for compatibility with other
62 systems where the
63 .I utmp
64 and
65 .I utmpx
66 structures contain different fields,
67 or the size of corresponding fields differs.
68 .\" e.g., on Solaris, the utmpx structure is rather larger than utmp.
69 On Linux, the two structures contain the same fields,
70 and the fields have the same sizes.
71 .SH SEE ALSO
72 .BR utmpdump (1),
73 .BR getutent (3),
74 .BR utmp (5)