.\"
.TH DIRFD 3 2010-09-26 "Linux" "Linux Programmer's Manual"
.\"O .SH NAME
-.SH ̾Á°
+.SH 名前
.\"O dirfd \- get directory stream file descriptor
-dirfd \- ¥Ç¥£¥ì¥¯¥È¥ê¡¦¥¹¥È¥ê¡¼¥à¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¼èÆÀ¤¹¤ë
+dirfd \- ディレクトリ・ストリームのファイル・ディスクリプタを取得する
.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.SH 書式
.B #include <sys/types.h>
.br
.B #include <dirent.h>
.in -4n
.\"O Feature Test Macro Requirements for glibc (see
.\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
+glibc 向けの機能検査マクロの要件
.RB ( feature_test_macros (7)
-»²¾È):
+参照):
.in
.sp
.BR dirfd ():
_BSD_SOURCE || _SVID_SOURCE
.br
.\"O || /* Since glibc 2.10: */
-|| /* glibc 2.10 °Ê¹ß: */
+|| /* glibc 2.10 以降: */
.RS 4
(_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700)
.RE
.RE
.ad
.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
.\"O The function
.\"O .BR dirfd ()
.\"O returns the file descriptor associated with the directory stream
.\"O .IR dirp .
-´Ø¿ô
+関数
.BR dirfd ()
-¤Ï¥Ç¥£¥ì¥¯¥È¥ê¡¦¥¹¥È¥ê¡¼¥à
+はディレクトリ・ストリーム
.I dirp
-¤Ë´ØÏ¢¤Å¤±¤é¤ì¤¿¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
+に関連づけられたファイル・ディスクリプタを返す。
.LP
.\"O This descriptor is the one used internally by the directory stream.
-¤³¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ï¥Ç¥£¥ì¥¯¥È¥ê¡¦¥¹¥È¥ê¡¼¥à¤¬ÆâÉô¤Ç»ÈÍѤ¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
+このディスクリプタはディレクトリ・ストリームが内部で使用するものである。
.\"O As a result, it is only useful for functions which do not depend on
.\"O or alter the file position, such as
.\"O .BR fstat (2)
.\"O and
.\"O .BR fchdir (2).
-¤è¤Ã¤Æ¡¢¥Õ¥¡¥¤¥ë¤Î°ÌÃ֤˰͸¤»¤º¡¢¤«¤Ä¤½¤Î°ÌÃÖ¤òÊѹ¹¤·¤Ê¤¤´Ø¿ô
+よって、ファイルの位置に依存せず、かつその位置を変更しない関数
.BR fstat (2)
-¤ä
+や
.BR fchdir (2)
-¤Ê¤É¤Ç¤·¤«Ìò¤ËΩ¤¿¤Ê¤¤¡£
+などでしか役に立たない。
.\"O It will be automatically closed when
.\"O .BR closedir (3)
.\"O is called.
-¤³¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ï
+このディスクリプタは
.BR closedir (3)
-¤¬¸Æ¤Ð¤ì¤¿¤È¤¤Ë¼«Æ°Åª¤Ë¥¯¥í¡¼¥º¤µ¤ì¤ë¡£
+が呼ばれたときに自動的にクローズされる。
.\"O .SH RETURN VALUE
-.SH ÊÖ¤êÃÍ
+.SH 返り値
.\"O On success, a nonnegative file descriptor is returned.
.\"O On error, \-1 is returned.
-À®¸ù¤¹¤ë¤È¡¢Éé¤Ç¤Ê¤¤ÃͤΥե¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬ÊÖ¤µ¤ì¤ë¡£
-¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¤ë¡£
+成功すると、負でない値のファイルディスクリプタが返される。
+エラーの場合は \-1 が返される。
.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
+.SH ã\82¨ã\83©ã\83¼
.\"O POSIX.1-2008 specifies two errors,
.\"O neither of which is returned by the current
.\"O .\" glibc 2.8
.\"O implementation.
-POSIX.1-2008 ¤Ç¤Ï 2 ¤Ä¤Î¥¨¥é¡¼¤¬µ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
-¸½ºß¤Î¼ÂÁõ¤Ç¤Ï¤É¤Á¤é¤Î¥¨¥é¡¼¤âÊÖ¤µ¤ì¤Ê¤¤¡£
+POSIX.1-2008 では 2 つのエラーが規定されている。
+現在の実装ではどちらのエラーも返されない。
.\" glibc 2.8
.TP
.B EINVAL
.\"O .I dirp
.\"O does not refer to a valid directory stream.
.I dirp
-¤¬Í¸ú¤Ê¥Ç¥£¥ì¥¯¥È¥ê¡¦¥¹¥È¥ê¡¼¥à¤ò»²¾È¤·¤Æ¤¤¤Ê¤¤¡£
+が有効なディレクトリ・ストリームを参照していない。
.TP
.B ENOTSUP
.\"O The implementation does not support the association of a file
.\"O descriptor with a directory.
-¤³¤Î¼ÂÁõ¤Ç¤Ï¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Î¥Ç¥£¥ì¥¯¥È¥ê¤È¤Î´ØÏ¢ÉÕ¤±¤¬
-¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+この実装では、ファイルディスクリプタのディレクトリとの関連付けが
+サポートされていない。
.\"O .SH "CONFORMING TO"
-.SH ½àµò
+.SH 準拠
POSIX.1-2008.
.\"O This function was a BSD extension, present in 4.3BSD-Reno, not in 4.2BSD.
.\"O .\" It is present in libc5 (since 5.1.2) and in glibc2.
-¤³¤Î´Ø¿ô¤Ï BSD ³ÈÄ¥¤Ç¤¢¤Ã¤¿¡£
-4.3BSD-Reno ¤Ë¤Ï¸ºß¤¹¤ë¤¬¡¢4.2BSD ¤Ë¤Ï¸ºß¤·¤Ê¤¤¡£
-.\" libc5 (5.1.2 °Ê¹ß) ¤È glibc2 ¤Ë¸ºß¤¹¤ë¡£
+この関数は BSD 拡張であった。
+4.3BSD-Reno には存在するが、4.2BSD には存在しない。
+.\" libc5 (5.1.2 以降) と glibc2 に存在する。
.\"O .SH NOTES
-.SH Ãí°Õ
+.SH 注意
.\"O The prototype for
.\"O .BR dirfd ()
.\"O is only available if
.\"O .B _SVID_SOURCE
.\"O is defined.
.BR dirfd ()
-¤Î¥×¥í¥È¥¿¥¤¥×¤¬»ÈÍѲÄǽ¤Ê¤Î¤Ï¡¢
+のプロトタイプが使用可能なのは、
.B _BSD_SOURCE
-¤Þ¤¿¤Ï
+または
.B _SVID_SOURCE
-¤¬ÄêµÁ¤µ¤ì¤¿¤È¤¤Î¤ß¤Ç¤¢¤ë¡£
+が定義されたときのみである。
.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
+.SH 関連項目
.BR open (2),
.BR closedir (3),
.BR opendir (3),