1gnu_get_libc_version(3)    Library Functions Manual    gnu_get_libc_version(3)
2
3
4

NAME

6       gnu_get_libc_version,  gnu_get_libc_release - get glibc version and re‐
7       lease
8

LIBRARY

10       Standard C library (libc, -lc)
11

SYNOPSIS

13       #include <gnu/libc-version.h>
14
15       const char *gnu_get_libc_version(void);
16       const char *gnu_get_libc_release(void);
17

DESCRIPTION

19       The function gnu_get_libc_version() returns a  string  that  identifies
20       the glibc version available on the system.
21
22       The  function gnu_get_libc_release() returns a string indicates the re‐
23       lease status of the glibc version available on the system.   This  will
24       be a string such as stable.
25

ATTRIBUTES

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

STANDARDS

38       GNU.
39

HISTORY

41       glibc 2.1.
42

EXAMPLES

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

SEE ALSO

66       confstr(3)
67
68
69
70Linux man-pages 6.05              2023-07-20           gnu_get_libc_version(3)
Impressum