OSDN Git Service

Release pages for LDP v3.77
[linuxjm/LDP_man-pages.git] / release / man3 / putenv.3
index 49ca38e..61b6eff 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -19,6 +20,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     Linux libc source code
 .\" Modified Mon Oct 11 11:11:11 1999 by Andries Brouwer (aeb@cwi.nl)
 .\" Modified Wed Nov 10 00:02:26 1999 by Andries Brouwer (aeb@cwi.nl)
 .\" Modified Sun May 20 22:17:20 2001 by Andries Brouwer (aeb@cwi.nl)
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
 .\"    all rights reserved.
 .\" Updated 2000-06-18, Kentaro Shirakata <argrath@ub32.org>
 .\" Updated 2005-11-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
 .\"
-.TH PUTENV 3  2007-07-26 "GNU" "Linux Programmer's Manual"
+.TH PUTENV 3 2014\-08\-19 GNU "Linux Programmer's Manual"
 .SH 名前
 putenv \- 環境変数の変更または追加
 .SH 書式
 .nf
-.B #include <stdlib.h>
+\fB#include <stdlib.h>\fP
 .sp
-.BI "int putenv(char *" string );
 .\" Not: const char *
+\fBint putenv(char *\fP\fIstring\fP\fB);\fP
 .fi
 .sp
 .in -4n
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR putenv ():
-_SVID_SOURCE || _XOPEN_SOURCE
-\"O .SH DESCRIPTION
+\fBputenv\fP(): _SVID_SOURCE || _XOPEN_SOURCE
 .SH 説明
-.BR putenv ()
-関数は、環境変数の追加または値の変更を行う。
-引数 \fIstring\fP は \fIname\fP=\fIvalue\fP という形式を取る。
-\fIname\fP が環境に存在しない場合は \fIstring\fP が環境に追加される。
-\fIname\fP が環境に存在する場合は \fIname\fP の値は \fIvalue\fP に変更される。
-\fIstring\fP が指している文字列は環境の一部となるので、
+\fBputenv\fP()  関数は、環境変数の追加または値の変更を行う。 引数 \fIstring\fP は \fIname\fP=\fIvalue\fP
+という形式を取る。 \fIname\fP が環境に存在しない場合は \fIstring\fP が環境に追加される。 \fIname\fP が環境に存在する場合は
+\fIname\fP の値は \fIvalue\fP に変更される。 \fIstring\fP が指している文字列は環境の一部となるので、
 文字列を変更すると環境も変更される。
 .SH 返り値
-.BR putenv ()
-関数は、成功した場合 0 を、
-エラーが発生した場合 0 以外を返す。
+\fBputenv\fP() 関数は、成功すると 0 を返し、エラーの場合は 0 以外の値を返す。エラーが発生した場合、 \fIerrno\fP
+に原因を示す値が設定される。
 .SH エラー
-.TP
-.B ENOMEM
+.TP 
+\fBENOMEM\fP
 新しい環境を割り当てるのに十分な空きがない。
 .SH 準拠
-SVr4, POSIX.1-2001, 4.3BSD.
+SVr4, POSIX.1\-2001, 4.3BSD.
 .SH 注意
-.BR putenv ()
-はリエントラントであることを求められていない。
-libc4, libc5, glibc 2.0 ではリエントラントではない。
-glibc 2.1 ではリエントラントである。
-.LP
-libc4, libc5, glibc に関する説明:
-もし引数  \fIstring\fP が \fIname\fP 単独で、
-\(aq=\(aq 文字を含んでいない場合、環境変数 \fIname\fP は環境から除去される。
-もし
-.BR putenv ()
-が新しい \fIenviron\fP 配列を確保しなければならない時、
-以前の \fIenviron\fP 配列も
-.BR putenv ()
-によって確保されたものならば、
-それは解放される。
-環境変数そのものに割り当てられた古い記憶領域が解放されることはない。
+.\" .LP
+.\" Description for libc4, libc5, glibc:
+.\" If the argument \fIstring\fP is of the form \fIname\fP,
+.\" and does not contain an \(aq=\(aq character, then the variable \fIname\fP
+.\" is removed from the environment.
+.\" If
+.\" .BR putenv ()
+.\" has to allocate a new array \fIenviron\fP,
+.\" and the previous array was also allocated by
+.\" .BR putenv (),
+.\" then it will be freed.
+.\" In no case will the old storage associated
+.\" to the environment variable itself be freed.
+\fBputenv\fP()  はリエントラントであることを求められていない。 glibc 2.0 ではリエントラントではない。 glibc 2.1
+ではリエントラントである。
 .LP
-libc4 と libc5 と glibc 2.1.2 では SUSv2 に準拠している。
-.BR putenv ()
-で与えられたポインタ \fIstring\fP が使われる。
-この文字列は環境の一部となり、後で変更すると環境も変わる。
-(従って、
-.BR putenv ()
-を自動変数を引数として呼び出し、
-\fIstring\fPが環境の一部のままで呼び出した関数から return するとエラーになる)
-しかし、glibc 2.0-2.1.1 では異なり、文字列のコピーが使われる。
-これはメモリリークを引き起こすだけでなく、 SUSv2 に違反している。
-これは glibc2.1.2 で修正された。
+バージョン 2.1.2 以降では、 glibc の実装は SUSv2 に準拠している。 \fBputenv\fP()  で与えられたポインタ
+\fIstring\fP が使われる。 この文字列は環境の一部となり、後で変更すると環境も変わる。 (従って、 \fBputenv\fP()
+を自動変数を引数として呼び出し、 \fIstring\fPが環境の一部のままで呼び出した関数から return するとエラーになる)  しかし、glibc
+バージョン 2.0 から 2.1.1 まででは違っており、文字列のコピーが使われる。 これはメモリリークを引き起こすだけでなく、 SUSv2
+にも違反している。
 .LP
 4.4BSD バージョンでは、glibc 2.0 と同様にコピーを使う。
 .LP
-SUSv2 ではプロトタイプから \fIconst\fP が取り除かれており、
-glibc 2.1.3 もそのようになっている。
+SUSv2 ではプロトタイプから \fIconst\fP が取り除かれており、 glibc 2.1.3 もそのようになっている。
 .SH 関連項目
-.BR clearenv (3),
-.BR getenv (3),
-.BR setenv (3),
-.BR unsetenv (3),
-.BR environ (7)
+\fBclearenv\fP(3), \fBgetenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBenviron\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.77 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。