OSDN Git Service

(split) LDP: Complete the following pages in intro
[linuxjm/LDP_man-pages.git] / release / man7 / feature_test_macros.7
index 77cb31c..e6d4e1a 100644 (file)
@@ -210,13 +210,11 @@ Specification として規定された代替 API (alternative API) に関する
 \fI_FILE_OFFSET_BITS=64\fP を利用すること。
 .TP 
 \fB_LARGEFILE_SOURCE\fP
-This macro was historically used to expose certain functions (specifically
-\fBfseeko\fP(3)  and \fBftello\fP(3))  that address limitations of earlier APIs
-(\fBfeek\fP(3)  and \fBftell\fP(3))  that use \fIlong int\fP for file offsets.  This
-macro is implicitly defined if \fB_XOPEN_SOURCE\fP is defined with a value
-greater than or equal to 500.  New programs should not employ this macro;
-defining \fB_XOPEN_SOURCE\fP as just described or defining \fB_FILE_OFFSET_BITS\fP
-with the value 64 is the preferred mechanism to achieve the same result.
+このマクロは、歴史的には、ファイルオフセットで \fIlong int\fP を使う以前の API (\fBfseek\fP(3) や \fBftell\fP(3))
+の制限を解決する関数 (特に \fBfseeko\fP(3) と \fBftello\fP(3)) を公開するのに使われていた。 このマクロは
+\fB_XOPEN_SOURCE\fP が 500 以上の値で定義されている場合に暗黙のうちに定義される。
+新しいプログラムでぇあこのマクロは使用すべきではない。 \fB_XOPEN_SOURCE\fP をただ定義するか、 \fB_FILE_OFFSET_BITS\fP
+を値 64 で定義するのが、同じ結果を得るための推奨される方法である。
 .TP 
 \fB_FILE_OFFSET_BITS\fP
 このマクロを値 64 で定義すると、ファイル I/O とファイルシステム操作に 関連する 32 ビット版の関数とデータタイプは自動的に 64 ビット版に
@@ -238,32 +236,26 @@ with the value 64 is the preferred mechanism to achieve the same result.
 .\" commit 498afc54dfee41d33ba519f496e96480badace8e
 .\" commit acd7f096d79c181866d56d4aaf3b043e741f1e2c
 .\" commit ade40b10ff5fa59a318cf55b9d8414b758e8df78
-Since glibc 2.20, this macro is deprecated.  It now has the same effect as
-defining \fB_DEFAULT_SOURCE\fP, but generates a compile\-time warning (unless
-\fB_DEFAULT_SOURCE\fP is also defined).  Use \fB_DEFAULT_SOURCE\fP instead.  To
-allow code that requires \fB_BSD_SOURCE\fP in glibc 2.19 and earlier and
-\fB_DEFAULT_SOURCE\fP in glibc 2.20 and later to compile without warnings,
-define \fIboth\fP \fB_BSD_SOURCE\fP and \fB_DEFAULT_SOURCE\fP.
+glibc 2.20 以降では、このマクロは非推奨である。 このマクロは現在は \fB_DEFAULT_SOURCE\fP を定義するのと同じ効果を持つが、
+(\fB_DEFAULT_SOURCE\fP が合わせて定義されていない場合には) コンパイル時の警告が出る。 代わりに \fB_DEFAULT_SOURCE\fP
+を使用すること。 glibc 2.19 以前で \fB_BSD_SOURCE\fP が必要で glibc 2.20 以降で
+\fB_DEFAULT_SOURCE\fP を必要とするプログラムを警告を出さずにコンパイルするには、 \fB_BSD_SOURCE\fP と
+\fB_DEFAULT_SOURCE\fP の\fI両方\fPを定義すること。
 .TP 
 \fB_SVID_SOURCE\fP (glibc 2.20 以降では非推奨)
 このマクロを定義すると (値に関わらず) ヘッダファイルで System V 由来の定義が公開される (SVID == System V
 Interface Definition; \fBstandards\fP(7)  参照)。
 
-Since glibc 2.20, this macro is deprecated in the same fashion as
-\fB_BSD_SOURCE\fP.
+glibc 2.20 以降、 \fB_BSD_SOURCE\fP と同様にこのマクロは非推奨となっている。
 .TP 
 \fB_DEFAULT_SOURCE\fP (glibc 2.19 以降)
-This macro can be defined to ensure that the "default" definitions are
-provided even when the defaults would otherwise be disabled, as happens when
-individual macros are explicitly defined, or the compiler is invoked in one
-of its "standard" modes (e.g., \fIcc\ \-std=c99\fP).  Defining
-\fB_DEFAULT_SOURCE\fP without defining other individual macros or invoking the
-compiler in one of its "standard" modes has no effect.
-
-The "default" definitions comprise those required by POSIX.1\-2008 as well as
-various definitions derived from BSD and System V.  On glibc 2.19 and
-earlier, these defaults were approximately equivalent to explicitly defining
-the following:
+このマクロを使うと、「デフォルト」が無効になるような場合でも「デフォルト」の定義が提供されるようにすることができる。「デフォルト」が無効になるような状況は、個別のマクロが明示的に定義された場合や、コンパイラが「標準」モードのいずれか
+(例えば \fIcc\ \-std=c99\fP)
+で起動された場合などである。他の個々のマクロが定義されず、コンパイラも「標準」モードのいずれかを指定して起動されていない場合は、
+\fB_DEFAULT_SOURCE\fP を定義しても何の効果もない。
+
+「デフォルト」定義は、 POSIX.1\-2008 で必須となっている定義と、 BSD と System V 由来の種々の定義を公開する。 glibc
+2.19 以前では、これらのデフォルトは以下を明示的に定義するのとほぼ等価である。
 
     cc \-D_BSD_SOURCE \-D_SVID_SOURCE \-D_POSIX_C_SOURCE=200809