OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / putenv.3
index a3a7159..e0d85da 100644 (file)
 .\"
 .TH PUTENV 3  2007-07-26 "GNU" "Linux Programmer's Manual"
 .\"O .SH NAME
-.SH Ì¾Á°
+.SH 名前
 .\"O putenv \- change or add an environment variable
-putenv \- ´Ä¶­ÊÑ¿ô¤ÎÊѹ¹¤Þ¤¿¤ÏÄɲÃ
+putenv \- 環境変数の変更または追加
 .\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.SH 書式
 .nf
 .B #include <stdlib.h>
 .sp
@@ -55,69 +55,69 @@ putenv \- 
 .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 putenv ():
 _SVID_SOURCE || _XOPEN_SOURCE
 \"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
 .\"O The
 .\"O .BR putenv ()
 .\"O function adds or changes the value of environment
 .\"O variables.
 .\"O The argument \fIstring\fP is of the form \fIname\fP=\fIvalue\fP.
 .BR putenv ()
-´Ø¿ô¤Ï¡¢´Ä¶­ÊÑ¿ô¤ÎÄɲäޤ¿¤ÏÃͤÎÊѹ¹¤ò¹Ô¤¦¡£
-°ú¿ô \fIstring\fP ¤Ï \fIname\fP=\fIvalue\fP ¤È¤¤¤¦·Á¼°¤ò¼è¤ë¡£
+関数は、環境変数の追加または値の変更を行う。
+引数 \fIstring\fP は \fIname\fP=\fIvalue\fP という形式を取る。
 .\"O If \fIname\fP does not already exist in the environment, then
 .\"O \fIstring\fP is added to the environment.
 .\"O If \fIname\fP does exist,
 .\"O then the value of \fIname\fP in the environment is changed to
 .\"O \fIvalue\fP.
-\fIname\fP ¤¬´Ä¶­¤Ë¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï \fIstring\fP ¤¬´Ä¶­¤ËÄɲ䵤ì¤ë¡£
-\fIname\fP ¤¬´Ä¶­¤Ë¸ºß¤¹¤ë¾ì¹ç¤Ï \fIname\fP ¤ÎÃͤϠ\fIvalue\fP ¤ËÊѹ¹¤µ¤ì¤ë¡£
+\fIname\fP が環境に存在しない場合は \fIstring\fP が環境に追加される。
+\fIname\fP が環境に存在する場合は \fIname\fP の値は \fIvalue\fP に変更される。
 .\"O The string pointed to by \fIstring\fP becomes part of the environment,
 .\"O so altering the string changes the environment.
-\fIstring\fP ¤¬»Ø¤·¤Æ¤¤¤ëʸ»úÎó¤Ï´Ä¶­¤Î°ìÉô¤È¤Ê¤ë¤Î¤Ç¡¢
-ʸ»úÎó¤òÊѹ¹¤¹¤ë¤È´Ä¶­¤âÊѹ¹¤µ¤ì¤ë¡£
+\fIstring\fP が指している文字列は環境の一部となるので、
+文字列を変更すると環境も変更される。
 .\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
+.SH 返り値
 .\"O The
 .\"O .BR putenv ()
 .\"O function returns zero on success,
 .\"O or nonzero if an error occurs.
 .BR putenv ()
-´Ø¿ô¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç 0 ¤ò¡¢
-¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç 0 °Ê³°¤òÊÖ¤¹¡£
+関数は、成功した場合 0 を、
+エラーが発生した場合 0 以外を返す。
 .\"O .SH ERRORS
-.SH ¥¨¥é¡¼
+.SH ã\82¨ã\83©ã\83¼
 .TP
 .B ENOMEM
 .\"O Insufficient space to allocate new environment.
-¿·¤·¤¤´Ä¶­¤ò³ä¤êÅö¤Æ¤ë¤Î¤Ë½½Ê¬¤Ê¶õ¤­¤¬¤Ê¤¤¡£
-.SH ½àµò
+新しい環境を割り当てるのに十分な空きがない。
+.SH 準拠
 SVr4, POSIX.1-2001, 4.3BSD.
 .\"O .SH NOTES
-.SH Ãí°Õ
+.SH 注意
 .\"O The
 .\"O .BR putenv ()
 .\"O function is not required to be reentrant, and the
 .\"O one in libc4, libc5 and glibc 2.0 is not, but the glibc 2.1 version is.
 .BR putenv ()
-¤Ï¥ê¥¨¥ó¥È¥é¥ó¥È¤Ç¤¢¤ë¤³¤È¤òµá¤á¤é¤ì¤Æ¤¤¤Ê¤¤¡£
-libc4, libc5, glibc 2.0 ¤Ç¤Ï¥ê¥¨¥ó¥È¥é¥ó¥È¤Ç¤Ï¤Ê¤¤¡£
-glibc 2.1 ¤Ç¤Ï¥ê¥¨¥ó¥È¥é¥ó¥È¤Ç¤¢¤ë¡£
+はリエントラントであることを求められていない。
+libc4, libc5, glibc 2.0 ではリエントラントではない。
+glibc 2.1 ではリエントラントである。
 .LP
 .\"O Description for libc4, libc5, glibc:
-libc4, libc5, glibc ¤Ë´Ø¤¹¤ëÀâÌÀ:
+libc4, libc5, glibc に関する説明:
 .\"O If the argument \fIstring\fP is of the form \fIname\fP,
 .\"O and does not contain an \(aq=\(aq character, then the variable \fIname\fP
 .\"O is removed from the environment.
-¤â¤·°ú¿ô  \fIstring\fP ¤¬ \fIname\fP Ã±ÆȤǡ¢
-\(aq=\(aq Ê¸»ú¤ò´Þ¤ó¤Ç¤¤¤Ê¤¤¾ì¹ç¡¢´Ä¶­ÊÑ¿ô \fIname\fP ¤Ï´Ä¶­¤«¤é½üµî¤µ¤ì¤ë¡£
+もし引数  \fIstring\fP が \fIname\fP 単独で、
+\(aq=\(aq 文字を含んでいない場合、環境変数 \fIname\fP は環境から除去される。
 .\"O If
 .\"O .BR putenv ()
 .\"O has to allocate a new array \fIenviron\fP,
@@ -126,49 +126,49 @@ libc4, libc5, glibc 
 .\"O then it will be freed.
 .\"O In no case will the old storage associated
 .\"O to the environment variable itself be freed.
-¤â¤·
+もし
 .BR putenv ()
-¤¬¿·¤·¤¤ \fIenviron\fP ÇÛÎó¤ò³ÎÊݤ·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤»þ¡¢
-°ÊÁ°¤Î \fIenviron\fP ÇÛÎó¤â
+が新しい \fIenviron\fP 配列を確保しなければならない時、
+以前の \fIenviron\fP 配列も
 .BR putenv ()
-¤Ë¤è¤Ã¤Æ³ÎÊݤµ¤ì¤¿¤â¤Î¤Ê¤é¤Ð¡¢
-¤½¤ì¤Ï²òÊü¤µ¤ì¤ë¡£
-´Ä¶­ÊÑ¿ô¤½¤Î¤â¤Î¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¸Å¤¤µ­²±Îΰ褬²òÊü¤µ¤ì¤ë¤³¤È¤Ï¤Ê¤¤¡£
+によって確保されたものならば、
+それは解放される。
+環境変数そのものに割り当てられた古い記憶領域が解放されることはない。
 .LP
 .\"O The libc4 and libc5 and glibc 2.1.2 versions conform to SUSv2:
 .\"O the pointer \fIstring\fP given to
 .\"O .BR putenv ()
 .\"O is used.
-libc4 ¤È libc5 ¤È glibc 2.1.2 ¤Ç¤Ï SUSv2 ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
+libc4 と libc5 と glibc 2.1.2 では SUSv2 に準拠している。
 .BR putenv ()
-¤ÇÍ¿¤¨¤é¤ì¤¿¥Ý¥¤¥ó¥¿ \fIstring\fP ¤¬»È¤ï¤ì¤ë¡£
+で与えられたポインタ \fIstring\fP が使われる。
 .\"O In particular, this string becomes part of the environment;
 .\"O changing it later will change the environment.
-¤³¤Îʸ»úÎó¤Ï´Ä¶­¤Î°ìÉô¤È¤Ê¤ê¡¢¸å¤ÇÊѹ¹¤¹¤ë¤È´Ä¶­¤âÊѤï¤ë¡£
+この文字列は環境の一部となり、後で変更すると環境も変わる。
 .\"O (Thus, it is an error is to call
 .\"O .BR putenv ()
 .\"O with an automatic variable
 .\"O as the argument, then return from the calling function while \fIstring\fP
 .\"O is still part of the environment.)
-(½¾¤Ã¤Æ¡¢
+(従って、
 .BR putenv ()
-¤ò¼«Æ°ÊÑ¿ô¤ò°ú¿ô¤È¤·¤Æ¸Æ¤Ó½Ð¤·¡¢
-\fIstring\fP¤¬´Ä¶­¤Î°ìÉô¤Î¤Þ¤Þ¤Ç¸Æ¤Ó½Ð¤·¤¿´Ø¿ô¤«¤é return ¤¹¤ë¤È¥¨¥é¡¼¤Ë¤Ê¤ë)
+を自動変数を引数として呼び出し、
+\fIstring\fPが環境の一部のままで呼び出した関数から return するとエラーになる)
 .\"O However, glibc 2.0-2.1.1 differs: a copy of the string is used.
 .\"O On the one hand this causes a memory leak, and on the other hand
 .\"O it violates SUSv2.
 .\"O This has been fixed in glibc2.1.2.
-¤·¤«¤·¡¢glibc 2.0-2.1.1 ¤Ç¤Ï°Û¤Ê¤ê¡¢Ê¸»úÎó¤Î¥³¥Ô¡¼¤¬»È¤ï¤ì¤ë¡£
-¤³¤ì¤Ï¥á¥â¥ê¥ê¡¼¥¯¤ò°ú¤­µ¯¤³¤¹¤À¤±¤Ç¤Ê¤¯¡¢ SUSv2 ¤Ë°ãÈ¿¤·¤Æ¤¤¤ë¡£
-¤³¤ì¤Ï glibc2.1.2 ¤Ç½¤Àµ¤µ¤ì¤¿¡£
+しかし、glibc 2.0-2.1.1 では異なり、文字列のコピーが使われる。
+これはメモリリークを引き起こすだけでなく、 SUSv2 に違反している。
+これは glibc2.1.2 で修正された。
 .LP
 .\"O The 4.4BSD version, like glibc 2.0, uses a copy.
-4.4BSD ¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢glibc 2.0 ¤ÈƱÍͤ˥³¥Ô¡¼¤ò»È¤¦¡£
+4.4BSD バージョンでは、glibc 2.0 と同様にコピーを使う。
 .LP
 .\"O SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3.
-SUSv2 ¤Ç¤Ï¥×¥í¥È¥¿¥¤¥×¤«¤é \fIconst\fP ¤¬¼è¤ê½ü¤«¤ì¤Æ¤ª¤ê¡¢
-glibc 2.1.3 ¤â¤½¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
-.SH ´ØÏ¢¹àÌÜ
+SUSv2 ではプロトタイプから \fIconst\fP が取り除かれており、
+glibc 2.1.3 もそのようになっている。
+.SH 関連項目
 .BR clearenv (3),
 .BR getenv (3),
 .BR setenv (3),