gnu_get_libc_version, gnu_get_libc_release


gnu_get_libc_version, gnu_get_libc_release -- get glibc-specific version and release


#include <gnu/libc-version.h>

const char * gnu_get_libc_version(void);

const char * gnu_get_libc_release(void);


gnu_get_libc_version() returns a string that identifies the version of the C library running the program making the call.

gnu_get_libc_release() returns a string indicates the release status of the C library running the program making the call. This will be a string such as "stable".

Return Value

The functions return strings. The contents of these strings are unspecified.


No errors are defined.


These functions are specific to GNU libc (glibc). This specification does not require the implementation of libc to be glibc, although it requires these functions.

The string returned by gnu_get_libc_version() will be a dotted version string, which may have meaning to developers otherwise familiar with glibc. These functions have been requested to aid in portability of software which also runs in non-LSB contexts, but decisions based on the return value should be tempered by an understanding of what the behavioral requirements of this specification are. That is, it may or may not be useful to discover that a running system, for example, has version "2.10.1" if that implies different behavior than described by this specification.