gnu_get_libc_version, gnu_get_libc_release

Name

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

Synopsis

#include <gnu/libc-version.h>

const char * gnu_get_libc_version(void);

const char * gnu_get_libc_release(void);

Description

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.

Errors

No errors are defined.

Notes

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.