移植性が必要なアプリケーションでは、 XSI 準拠の \fBstrerror_r\fP() を使う方がよい。 この関数は、ユーザーから提供される長さ
\fIbuflen\fP のバッファ \fIbuf\fP にエラー文字列を返す。
-The GNU\-specific \fBstrerror_r\fP() returns a pointer to a string containing
-the error message. This may be either a pointer to a string that the
-function stores in \fIbuf\fP, or a pointer to some (immutable) static string
-(in which case \fIbuf\fP is unused). If the function stores a string in
-\fIbuf\fP, then at most \fIbuflen\fP bytes are stored (the string may be truncated
-if \fIbuflen\fP is too small and \fIerrnum\fP is unknown). The string always
-includes a terminating null byte (\(aq\e0\(aq).
+GNU 仕様の \fBstrerror_r\fP() は、 エラーメッセージを格納した文字列へのポインタを返す。 返り値は、 この関数が \fIbuf\fP
+に格納した文字列へのポインタか、 何らかの (不変な) 静的な文字列へのポインタ、 のいずれかとなる (後者の場合は \fIbuf\fP は使用されない)。
+\fIbuf\fP に文字列が格納される場合は、 最大で \fIbuflen\fP バイトが格納される (\fIbuflen\fP
+が小さ過ぎたときには文字列は切り詰められ、 \fIerrnum\fP は不定である)。 文字列には必ず終端ヌル文字 (\(aq\e0\(aq) が含まれる。
.SH 返り値
\fBstrerror\fP() と \fBstrerror_r\fP() はエラー内容を説明する 文字列を返す。エラー番号が未知の場合は "Unknown
error nnn" という メッセージを返す。
.TP
\fBERANGE\fP
エラーコードを説明する文字列のために、充分な領域が確保できなかった。
-.SH ATTRIBUTES
-.SS "Multithreading (see pthreads(7))"
-The \fBstrerror\fP() function is not thread\-safe.
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+\fBstrerror\fP() 関数はスレッドセーフではない。
.LP
-The \fBstrerror_r\fP() function is thread\-safe.
+\fBstrerror_r\fP() 関数はスレッドセーフである。
.SH 準拠
\fBstrerror\fP() は POSIX.1\-2001, C89, C99 で規定されている。 \fBstrerror_r\fP() は
POSIX.1\-2001 で規定されている。