gnu_get_libc_version

Section: C Library Functions (3)
Updated: 2025-09-06
Index JM Home Page roff page
 

名前

gnu_get_libc_version, gnu_get_libc_release - glibc のバージョンと リリース状態を取得する  

ライブラリ

標準 C ライブラリ (libc,~-lc)  

書式

#include <gnu/libc-version.h>

const char *gnu_get_libc_version(void);
const char *gnu_get_libc_release(void);
 

説明

gnu_get_libc_version() 関数は、システムで利用可能な glibc のバージョンを特定する文字列を返す。

The function gnu_get_libc_release() returns a string indicating the release status of the glibc version available on the system. This will be a string such as stable.  

属性

この節で使用されている用語の説明については、 attributes(7) を参照。
インターフェース属性値
gnu_get_libc_version(), gnu_get_libc_release() Thread safetyMT-Safe
 

標準規格

GNU.  

歴史

glibc 2.1.  

例

下記のプログラムを実行すると、次のような出力が得られる。

$ ./a.out
GNU libc version: 2.8
GNU libc release: stable
 

プログラムのソース

#include <stdio.h>
#include <stdlib.h>

#include <gnu/libc-version.h>

int
main(void)
{
    printf("GNU libc version: %s\n", gnu_get_libc_version());
    printf("GNU libc release: %s\n", gnu_get_libc_release());
    exit(EXIT_SUCCESS);
}
 

関連項目

confstr(3)


 

Index

名前
ライブラリ
書式
説明
属性
標準規格
歴史
例
プログラムのソース
関連項目

This document was created by man2html, using the manual pages.