OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / tmpnam.3
index 80ec150..6166358 100644 (file)
@@ -1,5 +1,4 @@
 .\" Copyright (c) 1999 Andries Brouwer (aeb@cwi.nl)
-.\" Japanese Version Copyright 1997 Tenkou N. Hattori <tnh@alpsmap.co.jp>
 .\"
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\"
 .\" 2003-11-15, aeb, added tmpnam_r
 .\"
-.\" Japanese Version Copyright (c) 1997 Tenkou N. Hattori
-.\"       all rights reserved.
-.\" Translated 1997-01-18, Tenkou N. Hattori <tnh@alpsmap.co.jp>
-.\" Updated 2000-03-15, Kentaro Shirakata <argrath@yo.rim.or.jp>
-.\" Updated 2005-03-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2006-07-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
+.\"*******************************************************************
 .\"
-.TH TMPNAM 3  2010-09-10 "" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH TMPNAM 3 2010\-09\-10 "" "Linux Programmer's Manual"
 .SH 名前
-.\"O tmpnam, tmpnam_r \- create a name for a temporary file
 tmpnam, tmpnam_r \- 一時ファイルの名前を作成する
-.\"O .SH SYNOPSIS
 .SH 書式
 .nf
-.B #include <stdio.h>
+\fB#include <stdio.h>\fP
 .sp
-.BI "char *tmpnam(char *" s );
+\fBchar *tmpnam(char *\fP\fIs\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
 .SH 説明
-.\"O The
-.\"O .BR tmpnam ()
-.\"O function returns a pointer to a string that is a valid filename,
-.\"O and such that a file with this name did not exist at some point
-.\"O in time, so that naive programmers may think it
-.\"O a suitable name for a temporary file.
-.\"O If the argument
-.\"O .I s
-.\"O is NULL this name is generated in an internal static buffer
-.\"O and may be overwritten by the next call to
-.\"O .BR tmpnam ().
-.BR tmpnam ()
-関数は、ファイル名に使える文字列へのポインタを返す。
-ある時点では同じ名前を持つファイルが存在しないファイル名が返されるので、
-幼稚なプログラマはこの文字列が一時ファイルのファイル名として
-適していると考えるかもしれない。
-引き数
-.I s
-が NULL なら、この名前は内部の静的バッファに作成され、
-次に
-.BR tmpnam ()
-関数が呼び出された時に上書きされる。
-.\"O If
-.\"O .I s
-.\"O is not NULL, the name is copied to the character array (of length
-.\"O at least
-.\"O .IR L_tmpnam )
-.\"O pointed to by
-.\"O .I s
-.\"O and the value
-.\"O .I s
-.\"O is returned in case of success.
-.I s
-が NULL でなければ、ファイル名は
-.I s
-が指す (少なくとも
-.I L_tmpnam
-の長さを持つ) 文字配列にコピーされ、
-成功した場合は
-.I s
+\fBtmpnam\fP()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点では同じ名前を持つファイルが存在しないファイル名が返されるので、
+幼稚なプログラマはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれない。 引き数 \fIs\fP が NULL
+なら、この名前は内部の静的バッファに作成され、 次に \fBtmpnam\fP()  関数が呼び出された時に上書きされる。 \fIs\fP が NULL
+でなければ、ファイル名は \fIs\fP が指す (少なくとも \fIL_tmpnam\fP の長さを持つ) 文字配列にコピーされ、 成功した場合は \fIs\fP
 が返される。
 .LP
-.\"O The pathname that is created, has a directory prefix
-.\"O .IR P_tmpdir .
-作成されるパス名は、ディレクトリの部分に
-.I P_tmpdir
-が使われる。
-.\"O (Both
-.\"O .I L_tmpnam
-.\"O and
-.\"O .I P_tmpdir
-.\"O are defined in
-.\"O .IR <stdio.h> ,
-.\"O just like the
-.\"O .B TMP_MAX
-.\"O mentioned below.)
-.RI ( L_tmpnam
-と
-.I P_tmpdir
-は、以下で説明する
-.B TMP_MAX
-同様
-.I <stdio.h>
-で定義されている。)
-.\"O .SH "RETURN VALUE"
+作成されるパス名は、ディレクトリの部分に \fIP_tmpdir\fP が使われる。 (\fIL_tmpnam\fP と \fIP_tmpdir\fP は、以下で説明する
+\fBTMP_MAX\fP 同様 \fI<stdio.h>\fP で定義されている。)
 .SH 返り値
-.\"O The
-.\"O .BR tmpnam ()
-.\"O function returns a pointer to a unique temporary
-.\"O filename, or NULL if a unique name cannot be generated.
-.BR tmpnam ()
-関数は一意な一時ファイル名へのポインタを返す。
-一意なファイル名が作成できなかった場合は NULL を返す。
+\fBtmpnam\fP()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名が作成できなかった場合は NULL を返す。
 .SH エラー
-.\"O No errors are defined.
 エラーは定義されていない。
-.\"O .SH "CONFORMING TO"
 .SH 準拠
-SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
-.\"O POSIX.1-2008 marks
-.\"O .BR tmpnam ()
-.\"O as obsolete.
-POSIX.1-2008 は
-.BR tmpnam ()
+SVr4, 4.3BSD, C89, C99, POSIX.1\-2001.  POSIX.1\-2008 は \fBtmpnam\fP()
 を廃止予定としている。
-.\"O .SH NOTES
 .SH 注意
-.\"O The
-.\"O .BR tmpnam ()
-.\"O function generates a different string each time it is called,
-.\"O up to
-.\"O .B TMP_MAX
-.\"O times.
-.\"O If it is called more than
-.\"O .B TMP_MAX
-.\"O times,
-.\"O the behavior is implementation defined.
-.BR tmpnam ()
-関数は最大
-.B TMP_MAX
-回まで、呼び出される度に異なる文字列を作成する。
-.B TMP_MAX
+\fBtmpnam\fP()  関数は最大 \fBTMP_MAX\fP 回まで、呼び出される度に異なる文字列を作成する。 \fBTMP_MAX\fP
 回以上呼び出された場合、その動作は実装依存である。
 .LP
-.\"O Although
-.\"O .BR tmpnam ()
-.\"O generates names that are difficult to guess,
-.\"O it is nevertheless possible that between the time that
-.\"O .BR tmpnam ()
-.\"O returns a pathname, and the time that the program opens it,
-.\"O another program might create that pathname using
-.\"O .BR open (2),
-.\"O or create it as a symbolic link.
-.\"O This can lead to security holes.
-.\"O To avoid such possibilities, use the
-.\"O .BR open (2)
-.\"O .B O_EXCL
-.\"O flag to open the pathname.
-.\"O Or better yet, use
-.\"O .BR mkstemp (3)
-.\"O or
-.\"O .BR tmpfile (3).
-.BR tmpnam ()
-は推測が難しい名前を生成するが、それにもかかわらず、
-.BR tmpnam ()
-がパス名を返してから、プログラムがそのファイルをオープンする
-までの間に、別のプログラムが同じパス名で、ファイルを
-.BR open (2)
-で作成したり、シンボリックリンクを作成したりする可能性がある。
-これはセキュリティホールにつながる可能性がある。
-そのような可能性を回避するためには、
-.BR open (2)
-の
-.B O_EXCL
-フラグを使ってパス名をオープンすればよい。
-もっといいのは、
-.BR mkstemp (3)
-や
-.BR tmpfile (3)
-を使うことである。
+\fBtmpnam\fP()  は推測が難しい名前を生成するが、それにもかかわらず、 \fBtmpnam\fP()
+がパス名を返してから、プログラムがそのファイルをオープンする までの間に、別のプログラムが同じパス名で、ファイルを \fBopen\fP(2)
+で作成したり、シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能性がある。 そのような可能性を回避するためには、
+\fBopen\fP(2)  の \fBO_EXCL\fP フラグを使ってパス名をオープンすればよい。 もっといいのは、 \fBmkstemp\fP(3)  や
+\fBtmpfile\fP(3)  を使うことである。
 .LP
-.\"O Portable applications that use threads cannot call
-.\"O .BR tmpnam ()
-.\"O with a NULL parameter if either
-.\"O .B _POSIX_THREADS
-.\"O or
-.\"O .B _POSIX_THREAD_SAFE_FUNCTIONS
-.\"O is defined.
-移植性が必要な、スレッドを使ったアプリケーションでは、
-.B _POSIX_THREADS
-か
-.B _POSIX_THREAD_SAFE_FUNCTIONS
-が定義されている場合に、
-.BR tmpnam ()
-関数を NULL 引き数で呼び出してはならない。
+移植性が必要な、スレッドを使ったアプリケーションでは、 \fB_POSIX_THREADS\fP か
+\fB_POSIX_THREAD_SAFE_FUNCTIONS\fP が定義されている場合に、 \fBtmpnam\fP()  関数を NULL
+引き数で呼び出してはならない。
 .LP
-.\"O A POSIX draft proposed to use a function
-.\"O .BR tmpnam_r ()
-.\"O defined by
-.\"O .sp
-.\"O .nf
-.\"O .in +4n
-.\"O char *tmpnam_r(char *s) {
-.\"O     return s ? tmpnam(s) : NULL;
-.\"O }
-.\"O .in
-.\"O .fi
-.\"O .sp
-.\"O apparently as a warning not to use NULL.
-POSIX 草案では、関数
-.BR tmpnam_r ()
-を使うことを提案している。
-この関数は、以下のように定義されており、
-NULL を使わないようにという警告の意味で NULL を別扱いしている。
+POSIX 草案では、関数 \fBtmpnam_r\fP()  を使うことを提案している。 この関数は、以下のように定義されており、 NULL
+を使わないようにという警告の意味で NULL を別扱いしている。
 .sp
 .nf
 .in +4n
@@ -229,41 +79,9 @@ tmpnam_r(char *s)
 .in
 .fi
 .sp
-.\"O A few systems implement it.
-.\"O To get a glibc prototype for this function from
-.\"O .IR <stdio.h> ,
-.\"O define
-.\"O .B _SVID_SOURCE
-.\"O or
-.\"O .B _BSD_SOURCE
-.\"O (before including
-.\"O .I any
-.\"O header file).
-数は少ないが、この関数を実装しているシステムもある。
-この関数の glibc のプロトタイプを
-.I <stdio.h>
-から得るには、
-(「どの」ヘッダファイルをインクルードするよりも前に)
-.B _SVID_SOURCE
-か
-.B _BSD_SOURCE
-を定義しておく必要がある。
-.\"O .SH BUGS
+数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロトタイプを \fI<stdio.h>\fP から得るには、
+(「どの」ヘッダファイルをインクルードするよりも前に)  \fB_SVID_SOURCE\fP か \fB_BSD_SOURCE\fP を定義しておく必要がある。
 .SH バグ
-.\"O Never use this function.
-.\"O Use
-.\"O .BR mkstemp (3)
-.\"O or
-.\"O .BR tmpfile (3)
-.\"O instead.
-決してこの関数を使ってはならない。代わりに
-.BR mkstemp (3)
-か
-.BR tmpfile (3)
-を使うこと。
-.\"O .SH "SEE ALSO"
+決してこの関数を使ってはならない。代わりに \fBmkstemp\fP(3)  か \fBtmpfile\fP(3)  を使うこと。
 .SH 関連項目
-.BR mkstemp (3),
-.BR mktemp (3),
-.BR tempnam (3),
-.BR tmpfile (3)
+\fBmkstemp\fP(3), \fBmktemp\fP(3), \fBtempnam\fP(3), \fBtmpfile\fP(3)