OSDN Git Service

160aaf39443273f575e27764b3a072b8fc1ced61
[linuxjm/LDP_man-pages.git] / release / man3 / gnu_get_libc_version.3
1 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
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.
7 .\"
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.
12 .\"
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
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
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
27 .\" 
28 .TH GNU_GET_LIBC_VERSION 3 2010-09-10 "Linux" "Linux Programmer's Manual"
29 .SH 名前
30 gnu_get_libc_version, gnu_get_libc_release \- glibc のバージョンと
31 リリース状態を取得する
32 .SH 書式
33 .nf
34 .BR "#define _GNU_SOURCE" "             /* feature_test_macros(7) 参照 */"
35 .B #include <gnu/libc-version.h>
36
37 .B const char *gnu_get_libc_version(void);
38 .B const char *gnu_get_libc_release(void);
39 .fi
40 .SH 説明
41 .BR gnu_get_libc_version ()
42 関数は、システムで利用可能な glibc のバージョンを特定する文字列を返す。
43
44 .BR gnu_get_libc_release ()
45 関数は、システムで利用可能な glibc バージョンのリリース状態を示す
46 文字列を返す。
47 .I "stable"
48 といった文字列が返される。
49 .SH バージョン
50 これらの関数は glibc バージョン 2.1 で初めて登場した。
51 .SH 準拠
52 これらの関数は glibc 固有である。
53 .SH 例
54 下記のプログラムを実行すると、次のような出力が得られる。
55 .in +4n
56 .nf
57
58 .RB "$" " ./a.out"
59 GNU libc version: 2.8
60 GNU libc release: stable
61 .fi
62 .in
63 .SS プログラムのソース
64 \&
65 .nf
66 #include <gnu/libc-version.h>
67 #include <stdlib.h>
68 #include <stdio.h>
69
70 int
71 main(int argc, char *argv[])
72 {
73     printf("GNU libc version: %s\\n", gnu_get_libc_version());
74     printf("GNU libc release: %s\\n", gnu_get_libc_release());
75     exit(EXIT_SUCCESS);
76 }
77 .fi
78 .SH 関連項目
79 .BR confstr (3)