.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" References consulted:
.\" Linux libc source code
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH GETGRNAM 3 2010\-10\-21 "" "Linux Programmer's Manual"
+.TH GETGRNAM 3 2012\-04\-23 "" "Linux Programmer's Manual"
.SH 名前
getgrnam, getgrnam_r, getgrgid, getgrgid_r \- グループファイルエントリの取り出し
.SH 書式
\fI*gbufp\fP には結果へのポインタが格納される。エントリが見つからなかった
場合やエラーが発生した場合には \fI*result\fP には NULL が入る。
.PP
-\fIbuf\fP に最大必要なサイズは、 \fBsysconf\fP(3) に引き数 \fB_SC_GETGR_R_SIZE_MAX\fP
-を指定して実行することで分かる。
+呼び出し
+
+ sysconf(_SC_GETGR_R_SIZE_MAX)
+
+は、 \fIerrno\fP を変更せずに \-1 を返すか、 \fIbuf\fP の初期サイズの推奨値を
+返す。(このサイズが小さすぎる場合、呼び出しは \fBERANGE\fP で失敗し、この
+場合には呼び出し側はバッファを大きくしてから再度呼び出すことができる。)
.SH 返り値
\fBgetgrnam\fP() と \fBgetgrgid\fP() 関数は、 \fIgroup\fP 構造体へのポインタを返す。
マッチするエントリが見つからなかった場合や、 エラーが発生した場合は NULL を返す。 エラーが起こった場合、 \fIerrno\fP が適切に設定される。
.SH 関連項目
\fBendgrent\fP(3), \fBfgetgrent\fP(3), \fBgetgrent\fP(3), \fBgetpwnam\fP(3),
\fBsetgrent\fP(3), \fBgroup\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。