OSDN Git Service

Update releases for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man2 / stat.2
index 232e342..49376e3 100644 (file)
@@ -93,9 +93,9 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 .sp
 \fBlstat\fP():
 .RS 4
-/* glibc 2.19 and earlier */ _BSD_SOURCE ||
+/* glibc 2.19 以前 */ _BSD_SOURCE ||
 .br
-/* Since glibc 2.20 */_DEFAULT_SOURCE ||
+/* glibc 2.20 以降 */_DEFAULT_SOURCE ||
 .br
 _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
 .br
@@ -199,8 +199,7 @@ glibc とカーネルのソースを調べてほしい。
 
 \fIst_ctime\fP フィールドは書き込みや inode 情報 (所有者、グループ、リンク数、モードなど) の 設定によって変更される。
 .PP
-The following mask values are defined for the file type component of the
-\fIst_mode\fP field:
+以下のマスク値が \fIst_mode\fP フィールドのファイル種別の検査用に定義されている。
 .in +4n
 .TS
 lB l l.
@@ -216,7 +215,7 @@ S_IFIFO     0010000 FIFO
 .TE
 .in
 .PP
-Thus, to test for a regular file (for example), one could write:
+したがって、(例えば) 通常のファイルかどうかを検査するには、以下のようにすればよい。
 
 .nf
 .in +4n
@@ -227,9 +226,8 @@ if ((sb.st_mode & S_IFMT) == S_IFREG) {
 .in
 .fi
 .PP
-Because tests of the above form are common, additional macros are defined by
-POSIX to allow the test of the file type in \fIst_mode\fP to be written more
-concisely:
+上記の形の検査はよくあるので、 POSIX では以下のマクロが定義されており、 \fIst_mode\fP
+のファイル種別の検査をより簡単に書けるようになっている。
 .RS 4
 .TP  1.2i
 \fBS_ISREG\fP(m)
@@ -254,7 +252,7 @@ FIFO (名前付きパイプ) か?
 ソケットか? (POSIX.1\-1996 にはない)
 .RE
 .PP
-The preceding code snippet could thus be rewritten as:
+上で挙げたコードは以下のように書き換えることができる。
 
 .nf
 .in +4n
@@ -265,21 +263,17 @@ if (S_ISREG(sb.st_mode)) {
 .in
 .fi
 .PP
-The definitions of most of the above file type test macros are provided if
-any of the following feature test macros are defined: \fB_BSD_SOURCE\fP (in
-glibc 2.19 and earlier), \fB_SVID_SOURCE\fP (in glibc 2.19 and earlier), or
-\fB_DEFAULT_SOURCE\fP (in glibc 2.20 and later).  In addition, definitions of
-all of the above macros except \fBS_IFSOCK\fP and \fBS_ISSOCK\fP()  are provided
-if \fB_XOPEN_SOURCE\fP is defined.  The definition of \fBS_IFSOCK\fP can also be
-exposed by defining \fB_XOPEN_SOURCE\fP with a value of 500 or greater.
-
-The definition of \fBS_ISSOCK\fP()  is exposed if any of the following feature
-test macros is defined: \fB_BSD_SOURCE\fP (in glibc 2.19 and earlier),
-\fB_DEFAULT_SOURCE\fP (in glibc 2.20 and later), \fB_XOPEN_SOURCE\fP with a value
-of 500 or greater, or \fB_POSIX_C_SOURCE\fP with a value of 200112L or greater.
+上記のほとんどのファイル種別検査マクロの定義は、 機能検査マクロ \fB_BSD_SOURCE\fP (glibc 2.19 以前の場合)、
+\fB_SVID_SOURCE\fP (glibc 2.19 以前の場合)、 \fB_DEFAULT_SOURCE\fP (glibc 2.20 以降の場合)
+のいずれかが定義されている場合に公開される。 さらに、 \fBS_IFSOCK\fP と \fBS_ISSOCK\fP 以外の上記のすべてのマクロの定義は
+\fB_XOPEN_SOURCE\fP が定義されている場合にも公開される。 \fBS_IFSOCK\fP の定義は \fB_XOPEN_SOURCE\fP が値 500
+以上で定義された場合にも公開される。
+
+\fBS_ISSOCK\fP() の定義が公開されるのは以下の機能検査マクロが定義されている場合である: \fB_BSD_SOURCE\fP (glibc 2.19
+以前の場合)、 \fB_DEFAULT_SOURCE\fP (glibc 2.20 以降の場合)、 値 500 以上の \fB_XOPEN_SOURCE\fP、
+値が 200112L 以上の \fB_POSIX_C_SOURCE\fP。
 .PP
-The following mask values are defined for the file permissions component of
-the \fIst_mode\fP field:
+以下のマスク値が \fIst_mode\fP フィールドのファイルのアクセス許可の検査用に定義されている。
 .in +4n
 .TS
 lB l l.
@@ -287,32 +281,30 @@ S_ISUID   0004000 set\-user\-ID bit
 S_ISGID        0002000 set\-group\-ID bit (下記参照)
 S_ISVTX        0001000 スティッキー・ビット (下記参照)
 
-S_IRWXU          00700 mask for file owner permissions
-S_IRUSR          00400 owner has read permission
-S_IWUSR          00200 owner has write permission
-S_IXUSR          00100 owner has execute permission
+S_IRWXU          00700 ファイル所有者のアクセス許可用のビットマスク
+S_IRUSR          00400 所有者の読み込み許可
+S_IWUSR          00200 所有者の書き込み許可
+S_IXUSR          00100 所有者の実行許可
 
-S_IRWXG          00070 mask for group permissions
-S_IRGRP          00040 group has read permission
-S_IWGRP          00020 group has write permission
-S_IXGRP          00010 group has execute permission
+S_IRWXG          00070 グループのアクセス許可用のビットマスク
+S_IRGRP          00040 グループの読み込み許可
+S_IWGRP          00020 グループの書き込み許可
+S_IXGRP          00010 グループの実行許可
 
 S_IRWXO          00007 T{
 他人 (others) のアクセス許可用のビットマスク
 T}
-S_IROTH          00004 others have read permission
-S_IWOTH          00002 others have write permission
-S_IXOTH          00001 others have execute permission
+S_IROTH          00004 他人の読み込み許可
+S_IWOTH          00002 他人の書き込み許可
+S_IXOTH          00001 他人の実行許可
 .TE
 .in
 .P
-The set\-group\-ID bit (\fBS_ISGID\fP)  has several special uses.  For a
-directory, it indicates that BSD semantics is to be used for that directory:
-files created there inherit their group ID from the directory, not from the
-effective group ID of the creating process, and directories created there
-will also get the \fBS_ISGID\fP bit set.  For a file that does not have the
-group execution bit (\fBS_IXGRP\fP)  set, the set\-group\-ID bit indicates
-mandatory file/record locking.
+set\-group\-ID bit (\fBS_ISGID\fP)  にはいくつかの特殊な使用法がある: ディレクトリに設定した場合には、そのディレクトリが
+BSD 方式で使用される ことを示す。つまり、そのディレクトリに作成されたファイルのグループID は 作成したプロセスの実効 (effective)
+グループID ではなく、ディレクトリの グループID を継承する。また、そのディレクトリに作成されたディレクトリにも \fBS_ISGID\fP
+ビットが設定される。グループ実行ビット (\fBS_IXGRP\fP)  が設定されていないファイルに設定された場合は、 set\-group\-ID
+ビットはファイル/レコードの 強制的な (mandatory) ロックを表す。
 .P
 .\"
 .\"