たいていの目的では、ユーザーの特定には環境変数 \fBLOGNAME\fP を調べ るほうが便利である。LOGNAME 変数はユーザーが自由に設定できるので
より柔軟な対応が可能になる。
.SH 返り値
-\fBgetlogin\fP() returns a pointer to the username when successful, and NULL
-on failure, with \fIerrno\fP set to indicate the cause of the error.
-\fBgetlogin_r\fP() returns 0 when successful, and nonzero on failure.
+\fBgetlogin\fP() は成功した場合はユーザ名へのポインタを返す。 失敗した場合は NULL を返し、 \fIerrno\fP
+にエラーの原因を示す値を設定する。 \fBgetlogin_r\fP() は成功すると 0 を返し、失敗すると 0 以外を返す。
.SH エラー
POSIX では以下のエラーが規定されている:
.TP
呼び出し元プロセスには制御端末がない。
.TP
\fBERANGE\fP
-(getlogin_r) The length of the username, including the terminating null
-byte (\(aq\e0\(aq), is larger than \fIbufsize\fP.
+(getlogin_r) (終端の NULL バイト (\(aq\e0\(aq) も含めた) ユーザ名の長さが \fIbufsize\fP よりも長い。
.LP
Linux/glibc には以下のエラーもある。
.TP
.TP
\fI/var/run/utmp\fP
(伝統的には \fI/etc/utmp\fP が使われている; libc の中には \fI/var/adm/utmp\fP を使うものもある)
-.SH ATTRIBUTES
-.SS "Multithreading (see pthreads(7))"
-The \fBgetlogin\fP() function is not thread\-safe.
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+\fBgetlogin\fP() 関数はスレッドセーフではない。
.LP
-The \fBgetlogin_r\fP() function is thread\-safe.
+\fBgetlogin_r\fP() 関数はスレッドセーフである。
.LP
The \fBcuserid\fP() function is thread\-safe with exceptions. It is not
thread\-safe if called with a NULL parameter.