1GNU_GET_LIBC_VERSION(3) Linux Programmer's Manual GNU_GET_LIBC_VERSION(3)
2
3
4
6 gnu_get_libc_version, gnu_get_libc_release - get glibc version and
7 release
8
10 #include <gnu/libc-version.h>
11
12 const char *gnu_get_libc_version(void);
13 const char *gnu_get_libc_release(void);
14
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
24 These functions first appeared in glibc in version 2.1.
25
27 These functions are glibc-specific.
28
30 When run, the program below will produce output such as the following:
31
32 $ ./a.out
33 GNU libc version: 2.8
34 GNU libc release: stable
35
36 Program source
37
38 #include <gnu/libc-version.h>
39 #include <stdlib.h>
40 #include <stdio.h>
41
42 int
43 main(int argc, char *argv[])
44 {
45 printf("GNU libc version: %s\n", gnu_get_libc_version());
46 printf("GNU libc release: %s\n", gnu_get_libc_release());
47 exit(EXIT_SUCCESS);
48 }
49
51 confstr(3)
52
54 This page is part of release 3.53 of the Linux man-pages project. A
55 description of the project, and information about reporting bugs, can
56 be found at http://www.kernel.org/doc/man-pages/.
57
58
59
60Linux 2012-08-26 GNU_GET_LIBC_VERSION(3)