1GNU_GET_LIBC_VERSION(3)    Linux Programmer's Manual   GNU_GET_LIBC_VERSION(3)
2
3
4

NAME

6       gnu_get_libc_version,  gnu_get_libc_release  -  get  glibc  version and
7       release
8

SYNOPSIS

10       #include <gnu/libc-version.h>
11
12       const char *gnu_get_libc_version(void);
13       const char *gnu_get_libc_release(void);
14

DESCRIPTION

16       The function gnu_get_libc_version() returns a  string  that  identifies
17       the glibc version available on the system.
18
19       The  function  gnu_get_libc_release()  returns  a  string indicates the
20       release status of the glibc version available on the system.  This will
21       be a string such as stable.
22

VERSIONS

24       These functions first appeared in glibc in version 2.1.
25

ATTRIBUTES

27       For   an   explanation   of   the  terms  used  in  this  section,  see
28       attributes(7).
29
30       ┌────────────────────────┬───────────────┬─────────┐
31Interface               Attribute     Value   
32       ├────────────────────────┼───────────────┼─────────┤
33gnu_get_libc_version(), │ Thread safety │ MT-Safe │
34gnu_get_libc_release()  │               │         │
35       └────────────────────────┴───────────────┴─────────┘

CONFORMING TO

37       These functions are glibc-specific.
38

EXAMPLE

40       When run, the program below will produce output such as the following:
41
42           $ ./a.out
43           GNU libc version: 2.8
44           GNU libc release: stable
45
46   Program source
47
48       #include <gnu/libc-version.h>
49       #include <stdlib.h>
50       #include <stdio.h>
51
52       int
53       main(int argc, char *argv[])
54       {
55           printf("GNU libc version: %s\n", gnu_get_libc_version());
56           printf("GNU libc release: %s\n", gnu_get_libc_release());
57           exit(EXIT_SUCCESS);
58       }
59

SEE ALSO

61       confstr(3)
62

COLOPHON

64       This  page  is  part of release 4.16 of the Linux man-pages project.  A
65       description of the project, information about reporting bugs,  and  the
66       latest     version     of     this    page,    can    be    found    at
67       https://www.kernel.org/doc/man-pages/.
68
69
70
71Linux                             2017-09-15           GNU_GET_LIBC_VERSION(3)
Impressum