OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / man3 / realpath.3
index 2edacd3..907e6b1 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 1999 Andries Brouwer (aeb@cwi.nl)
 .\"
+.\" %%%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.
@@ -19,6 +20,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" Rewritten old page, 990824, aeb@cwi.nl
 .\" 2004-12-14, mtk, added discussion of resolved_path == NULL
@@ -28,7 +30,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH REALPATH 3 2011\-09\-10 "" "Linux Programmer's Manual"
+.TH REALPATH 3 2013\-03\-15 "" "Linux Programmer's Manual"
 .SH 名前
 realpath \- 正規化された絶対パス名を返す
 .SH 書式
@@ -68,8 +70,8 @@ _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTEND
 .SH 返り値
 エラーがなかった場合、 \fBrealpath\fP()  は \fIresolved_path\fP へのポインターを返す。
 
-それ以外の場合は、ヌル (NULL) ポインターが返り、配列 \fIresolved_path\fP の内容は不定となり、 \fIerrno\fP
-にエラーの内容を示す値がセットされる。
+Otherwise, it returns a NULL pointer, the contents of the array
+\fIresolved_path\fP are undefined, and \fIerrno\fP is set to indicate the error.
 .SH エラー
 .TP 
 \fBEACCES\fP
@@ -95,17 +97,17 @@ _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTEND
 \fBENOTDIR\fP
 パスのディレクトリ要素が、ディレクトリでない。
 .SH バージョン
-この関数が Linux に登場したのは libc 4.5.21 である。
+On Linux, this function appeared in libc 4.5.21.
 .SH 準拠
 4.4BSD, POSIX.1\-2001.
 
 POSIX.1\-2001 では \fIresolved_path\fP が NULL の場合の動作は実装に依存するとしている。 POSIX.1\-2008
 では、このマニュアルページに書かれている動作が規定されている。
 .SH 注意
-4.4BSD と Solaris では、パス名の長さの上限は (\fI<sys/param.h>\fP の中にある)
-\fBMAXPATHLEN\fP である。SUSv2 では \fBPATH_MAX\fP と \fBNAME_MAX\fP が規定されており、 これらは
-\fI<limits.h>\fP で定義されているか、 \fBpathconf\fP(3)
-関数から得られる。以下のようなソースコードになっていることが多い。
+In 4.4BSD and Solaris, the limit on the pathname length is \fBMAXPATHLEN\fP
+(found in \fI<sys/param.h>\fP).  SUSv2 prescribes \fBPATH_MAX\fP and
+\fBNAME_MAX\fP, as found in \fI<limits.h>\fP or provided by the
+\fBpathconf\fP(3)  function.  A typical source fragment would be
 .LP
 .in +4n
 .nf
@@ -121,9 +123,22 @@ POSIX.1\-2001 では \fIresolved_path\fP が NULL の場合の動作は実装に
 .LP
 (バグの章も参照のこと。)
 .LP
-4.4BSD、Linux、SUSv2 では、返り値は常に絶対パス名である。 Solaris では、 引き数 \fIpath\fP
-が相対パスの場合、返り値が相対パスになることがある。 \fBrealpath\fP()  のプロトタイプ宣言は、 libc4 と libc5 では
-\fI<unistd.h>\fP にあるが、 それ以外の環境ではいずれも \fI<stdlib.h>\fP にある。
+.\"     2012-05-05, According to Casper Dik, the statement about
+.\"     Solaris was not true at least as far back as 1997, and
+.\"     may never have been true.
+.\"
+.\" The 4.4BSD, Linux and SUSv2 versions always return an absolute
+.\" pathname.
+.\" Solaris may return a relative pathname when the
+.\" .I path
+.\" argument is relative.
+\fBrealpath\fP() のプロトタイプ宣言は、 libc4 と libc5 では
+\fI<unistd.h>\fP にあるが、それ以外の環境ではいずれも
+\fI<stdlib.h>\fP にある。
+.SS "GNU extensions"
+If the call fails with either \fBEACCES\fP or \fBENOENT\fP and \fIresolved_path\fP is
+not NULL, then the prefix of \fIpath\fP that is not readable or does not exist
+is returned in \fIresolved_path\fP.
 .SH バグ
 この関数の POSIX.1\-2001 版は、設計段階から問題がある。 出力バッファ \fIresolved_path\fP
 の適切なサイズを決定することができないからである。 POSIX.1\-2001 ではバッファ・サイズとして \fBPATH_MAX\fP
@@ -134,8 +149,13 @@ POSIX.1\-2001 では \fIresolved_path\fP が NULL の場合の動作は実装に
 \fIresolved_path\ ==\ NULL\fP の機能を使うと、この設計上の問題を回避することができる。 この機能は POSIX.1\-2001
 では標準化されていないが、 POSIX.1\-2008 では標準化されている。
 .LP
-libc4 と libc5 の実装はバッファ・オーバーフローの可能性を持っている (libc\-5.4.13 で修正されたが)。したがって、
-\fBmount\fP(8)  のような set\-user\-ID されるプログラムでは、 この関数相当の関数を自前で持つ必要がある。
+The libc4 and libc5 implementation contained a buffer overflow (fixed in
+libc\-5.4.13).  Thus, set\-user\-ID programs like \fBmount\fP(8)  needed a private
+version.
 .SH 関連項目
 \fBreadlink\fP(2), \fBcanonicalize_file_name\fP(3), \fBgetcwd\fP(3), \fBpathconf\fP(3),
 \fBsysconf\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。