aboutsummaryrefslogtreecommitdiff
path: root/documentation/manual-pages/ja/man3/confstr.3
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/manual-pages/ja/man3/confstr.3')
-rw-r--r--documentation/manual-pages/ja/man3/confstr.3126
1 files changed, 126 insertions, 0 deletions
diff --git a/documentation/manual-pages/ja/man3/confstr.3 b/documentation/manual-pages/ja/man3/confstr.3
new file mode 100644
index 0000000000..22416d03d7
--- /dev/null
+++ b/documentation/manual-pages/ja/man3/confstr.3
@@ -0,0 +1,126 @@
+.\" Copyright (c) 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)confstr.3 8.1 (Berkeley) 6/4/93
+.\" %FreeBSD: src/lib/libc/gen/confstr.3,v 1.5.2.5 2001/12/14 18:33:50 ru Exp %
+.\"
+.\" $FreeBSD$
+.Dd June 4, 1993
+.Dt CONFSTR 3
+.Os
+.Sh 名称
+.Nm confstr
+.Nd 文字列値の設定可能変数を得る
+.Sh ライブラリ
+.Lb libc
+.Sh 書式
+.In unistd.h
+.Ft size_t
+.Fn confstr "int name" "char *buf" "size_t len"
+.Sh 解説
+.Bf -symbolic
+このインタフェースは、
+.Xr sysctl 3
+によって旧式になっています。
+.Ef
+.Pp
+.Fn confstr
+関数は、システム構成により定義されている文字列値を、
+アプリケーションが取得するための方式を提供します。
+.Pp
+.Fa name
+引数は、照会されるシステム変数を指定します。
+各名前の値となるシンボリック定数は、インクルードファイル
+.Aq Pa unistd.h
+の中にあります。
+.Fa len
+引数は、引数
+.Fa buf
+が参照するバッファのサイズを指定します。
+.Fa len
+が 0 でない場合、
+.Fa buf
+は NULL ではないポインタで、
+.Fa name
+は値を持っており、その値のうち最高
+.Fa len
+\- 1 バイトがバッファ
+.Fa buf
+にコピーされます。
+コピーされた値の末尾は必ずヌル文字です。
+.Pp
+利用可能な値は次のとおりです。
+.Pp
+.Bl -tag -width 6n
+.Pp
+.It Li _CS_PATH
+全標準ユーティリティを検出する
+.Ev PATH
+環境変数の値を返します。
+.El
+.Sh 戻り値
+.Fn confstr
+の呼び出しが正常に完了しない場合、\-1 が返され、該当する
+.Va errno
+が設定されます。
+また変数に、システム構成により定義されている値がない場合 0 が返され、
+.Va errno
+は変更されません。
+それ以外の場合は、設定定義された
+値全体を入れるのに必要なバッファサイズが返されます。
+このサイズが引数
+.Fa len
+より大きい場合、
+.Fa buf
+内の文字列は切り捨てられています。
+.Sh エラー
+.Fn confstr
+関数がエラーになると、ライブラリ関数
+.Xr malloc 3
+と
+.Xr sysctl 3
+で規定されているエラーを
+.Va errno
+に設定することがあります。
+.Pp
+さらに、次のエラーがレポートされることがあります。
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Fa name
+引数の値は無効です。
+.El
+.Sh 関連項目
+.Xr sysctl 3
+.Sh 歴史
+.Fn confstr
+関数は
+.Bx 4.4
+ではじめて登場しました。