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       #define _GNU_SOURCE
11       #include <gnu/libc-version.h>
12
13       const char *gnu_get_libc_version(void);
14       const char *gnu_get_libc_release(void);
15

DESCRIPTION

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

VERSIONS

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

CONFORMING TO

28       These functions are glibc-specific.
29

EXAMPLE

31       When run, the program below will produce output such as the following:
32
33           $ ./a.out
34           GNU libc version: 2.8
35           GNU libc release: stable
36
37   Program source
38
39       #include <gnu/libc-version.h>
40       #include <stdlib.h>
41       #include <stdio.h>
42
43       int
44       main(int argc, char *argv[])
45       {
46           printf("GNU libc version: %s\n", gnu_get_libc_version());
47           printf("GNU libc release: %s\n", gnu_get_libc_release());
48           exit(EXIT_SUCCESS);
49       }
50

SEE ALSO

52       confstr(3)
53

COLOPHON

55       This  page  is  part of release 3.25 of the Linux man-pages project.  A
56       description of the project, and information about reporting  bugs,  can
57       be found at http://www.kernel.org/doc/man-pages/.
58
59
60
61Linux                             2008-07-02           GNU_GET_LIBC_VERSION(3)
Impressum