summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man3/gnu_get_libc_version.3
blob: a1af9d1f9245df4d5aefe2ce83cdc5328f8ec831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
'\" t
.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
.\"     <mtk.manpages@gmail.com>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.TH gnu_get_libc_version 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gnu_get_libc_version, gnu_get_libc_release \- get glibc version and release
.SH LIBRARY
Standard C library
.RI ( libc ", " \-lc )
.SH SYNOPSIS
.nf
.B #include <gnu/libc\-version.h>
.PP
.B const char *gnu_get_libc_version(void);
.B const char *gnu_get_libc_release(void);
.fi
.SH DESCRIPTION
The function
.BR gnu_get_libc_version ()
returns a string that identifies the glibc version available on the system.
.PP
The function
.BR gnu_get_libc_release ()
returns a string indicates the release status of the glibc version
available on the system.
This will be a string such as
.IR "stable" .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.TS
allbox;
lbx lb lb
l l l.
Interface	Attribute	Value
T{
.na
.nh
.BR gnu_get_libc_version (),
.BR gnu_get_libc_release ()
T}	Thread safety	MT-Safe
.TE
.sp 1
.SH STANDARDS
GNU.
.SH HISTORY
glibc 2.1.
.SH EXAMPLES
When run, the program below will produce output such as the following:
.PP
.in +4n
.EX
.RB "$" " ./a.out"
GNU libc version: 2.8
GNU libc release: stable
.EE
.in
.SS Program source
\&
.\" SRC BEGIN (gnu_get_libc_version.c)
.EX
#include <stdio.h>
#include <stdlib.h>
\&
#include <gnu/libc\-version.h>
\&
int
main(void)
{
    printf("GNU libc version: %s\en", gnu_get_libc_version());
    printf("GNU libc release: %s\en", gnu_get_libc_release());
    exit(EXIT_SUCCESS);
}
.EE
.\" SRC END
.SH SEE ALSO
.BR confstr (3)