1 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI
25 .\" all rights reserved.
26 .\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
28 .TH GNU_GET_LIBC_VERSION 3 2010-09-10 "Linux" "Linux Programmer's Manual"
30 gnu_get_libc_version, gnu_get_libc_release \- glibc のバージョンと
34 .BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */"
35 .B #include <gnu/libc-version.h>
37 .B const char *gnu_get_libc_version(void);
38 .B const char *gnu_get_libc_release(void);
41 .BR gnu_get_libc_version ()
42 関数は、システムで利用可能な glibc のバージョンを特定する文字列を返す。
44 .BR gnu_get_libc_release ()
45 関数は、システムで利用可能な glibc バージョンのリリース状態を示す
50 これらの関数は glibc バージョン 2.1 で初めて登場した。
54 下記のプログラムを実行すると、次のような出力が得られる。
60 GNU libc release: stable
66 #include <gnu/libc-version.h>
71 main(int argc, char *argv[])
73 printf("GNU libc version: %s\\n", gnu_get_libc_version());
74 printf("GNU libc release: %s\\n", gnu_get_libc_release());