OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man3 / gethostid.3
index 8b1d852..a100b97 100644 (file)
@@ -1,7 +1,9 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
 .\"
+.\" Updated with additions from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
+.\" Portions Copyright 1993 Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" Updated with additions from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
-.\" Portions Copyright 1993 Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
+.\" %%%LICENSE_END
 .\"
 .\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
+.\"*******************************************************************
 .\"
-.\" (Previously this file is gethostid.2)
-.\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
-.\"         all rights reserved.
-.\" Translated 1997-06-27, SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
-.\" Modified 1999-05-21, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\"
-.\" (Move to section 3 in LDP v3.16 since the interfaces are purely glibc)
-.\" Updated 2009-01-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.16
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH GETHOSTID 3 2010-09-20 "Linux" "Linux Programmer's Manual"
-.SH Ì¾Á°
-gethostid, sethostid \- ¸½ºß¤Î¥Û¥¹¥È¤Î¸ÇÍ­¤Î¼±Ê̻Ҥò¼èÆÀ/ÀßÄꤹ¤ë
-.SH ½ñ¼°
-.B #include <unistd.h>
+.\"*******************************************************************
+.TH GETHOSTID 3 2010\-09\-20 Linux "Linux Programmer's Manual"
+.SH 名前
+gethostid, sethostid \- 現在のホストの固有の識別子を取得/設定する
+.SH 書式
+\fB#include <unistd.h>\fP
 .sp
-.B long gethostid(void);
+\fBlong gethostid(void);\fP
 .br
-.BI "int sethostid(long " hostid );
+\fBint sethostid(long \fP\fIhostid\fP\fB);\fP
 .sp
 .in -4n
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
 .ad l
 .br
-.BR gethostid ():
+\fBgethostid\fP():
 .RS 4
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
-_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
 .RE
-.BR sethostid ():
+\fBsethostid\fP():
 .RS 4
 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
 .RE
 .ad b
-.SH ÀâÌÀ
-.BR gethostid ()
-¤È
-.BR sethostid ()
-¤Ï¡¢¤½¤ì¤¾¤ì¡¢¸½ºß»ÈÍѤ·¤Æ¤¤¤ë¥Û¥¹¥È¤Ë¸ÇÍ­¤Î 32 ¥Ó¥Ã¥È¤Î¼±Ê̻ҤÎ
-¼èÆÀ/ÀßÄê¤ò¹Ô¤¦¡£
-¤³¤Î 32 ¥Ó¥Ã¥È¤Î¼±Ê̻Ҥϡ¢¸½ºß¸ºß¤·¤Æ¤¤¤ëÁ´¤Æ¤Î UNIX ¥·¥¹¥Æ¥à
-¤ÎÃæ¤ÇÍ£°ì¤Ë¤Ê¤ë¤è¤¦¤Ë·è¤á¤é¤ì¤ë¡£Ä̾ï¤Ï
-.BR gethostbyname (3)
-¤Ë¤è¤êÊÖ¤µ¤ì¤ë¥í¡¼¥«¥ë¥Þ¥·¥ó¤Î Internet ¥¢¥É¥ì¥¹¤¬Âå¤ï¤ê¤Ë»ÈÍѤµ¤ì¡¢
-ÉáÄ̤ϼ±Ê̻Ҥò¤¢¤¨¤ÆÀßÄꤹ¤ëɬÍפϤʤ¤¡£
+.SH 説明
+\fBgethostid\fP()  と \fBsethostid\fP()  は、それぞれ、現在使用しているホストに固有の 32 ビットの識別子の
+取得/設定を行う。 この 32 ビットの識別子は、現在存在している全ての UNIX システム の中で唯一になるように決められる。通常は
+\fBgethostbyname\fP(3)  により返されるローカルマシンの Internet アドレスが代わりに使用され、
+普通は識別子をあえて設定する必要はない。
 
-.BR sethostid ()
-¤Ï¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¤·¤«»ÈÍѤǤ­¤Ê¤¤¡£
-.SH ÊÖ¤êÃÍ
-.BR gethostid ()
-¤Ï¡¢
-.BR sethostid ()
-¤Ë¤è¤Ã¤ÆÀßÄꤵ¤ì¤¿¡¢¸½ºß»ÈÍѤ·¤Æ¤¤¤ë¥Û¥¹¥È¤Î 32 ¥Ó¥Ã¥È¤Î¼±Ê̻ҤÎÃͤòÊÖ¤¹¡£
+\fBsethostid\fP()  はスーパーユーザしか使用できない。
+.SH 返り値
+\fBgethostid\fP()  は、 \fBsethostid\fP()  によって設定された、現在使用しているホストの 32 ビットの識別子の値を返す。
 
-À®¸ù¤¹¤ë¤È¡¢
-.BR sethostid ()
-¤Ï 0 ¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
-.I errno
-¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
-.SH ¥¨¥é¡¼
-.BR sethostid ()
-¤Ï°Ê²¼¤Î¥¨¥é¡¼¤Ç¼ºÇÔ¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
-.TP
-.B EACCES
-¸Æ¤Ó½Ð¤·¸µ¤¬¥Û¥¹¥È ID ¤òÊݸ¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤ë¥Õ¥¡¥¤¥ë¤Ø¤Î
-½ñ¤­¹þ¤ßµö²Ä¤ò»ý¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿¡£
-.TP
-.B EPERM
-¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¼Â¸ú UID/GID ¤¬Âбþ¤¹¤ë¼Â UID/GID ¤ÈƱ¤¸¤Ç¤Ï¤Ê¤¤¡£
-.SH ½àµò
-4.2BSD¡£4.4BSD ¤Ç¤Ï¤³¤ì¤é¤Î´Ø¿ô¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£
-SVr4 ¤Ë¤Ï
-.BR gethostid ()
-¤Ï´Þ¤Þ¤ì¤Æ¤¤¤ë¤¬¡¢
-.BR sethostid ()
-¤Ï´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¡£
-POSIX.1-2001 ¤Ç¤Ï¡¢
-.BR gethostid ()
-¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤ë¤¬¡¢
-.BR sethostid ()
-¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
-.SH Ãí°Õ
-glibc ¤Î¼ÂÁõ¤Ç¤Ï¡¢
-.I hostid
-¤Ï¥Õ¥¡¥¤¥ë
-.I /etc/hostid
-¤ËÊݸ¤µ¤ì¤ë
-(¥Ð¡¼¥¸¥ç¥ó 2.2 ¤è¤êÁ°¤Î glibc ¤Ç¤Ï¡¢
-.I /var/adm/hostid
-¤¬»ÈÍѤµ¤ì¤Æ¤¤¤¿)¡£
+成功すると、 \fBsethostid\fP()  は 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。
+.SH エラー
+\fBsethostid\fP()  は以下のエラーで失敗する可能性がある。
+.TP 
+\fBEACCES\fP
+呼び出し元がホスト ID を保存するのに使用されるファイルへの 書き込み許可を持っていなかった。
+.TP 
+\fBEPERM\fP
+呼び出し元プロセスの実効 UID/GID が対応する実 UID/GID と同じではない。
+.SH 準拠
+4.2BSD。4.4BSD ではこれらの関数はなくなった。 SVr4 には \fBgethostid\fP()  は含まれているが、
+\fBsethostid\fP()  は含まれていない。 POSIX.1\-2001 では、 \fBgethostid\fP()  は規定されているが、
+\fBsethostid\fP()  は規定されていない。
+.SH 注意
 .\" libc5 used /etc/hostid; libc4 didn't have these functions
+glibc の実装では、 \fIhostid\fP はファイル \fI/etc/hostid\fP に保存される (バージョン 2.2 より前の glibc では、
+\fI/var/adm/hostid\fP が使用されていた)。
 
-glibc ¤Î¼ÂÁõ¤Ç¤Ï¡¢¥Û¥¹¥È ID ¤òÊݸ¤·¤¿¥Õ¥¡¥¤¥ë¤ò
-¥ª¡¼¥×¥ó¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¡¢
-.BR gethostid ()
-¤Ï
-.BR gethostname (2)
-¤ò»È¤Ã¤Æ¥Û¥¹¥È̾¤òÆþ¼ê¤·¡¢¤½¤Î¥Û¥¹¥È̾¤ò
-.BR gethostbyname_r (3)
-¤ËÅϤ·¥Û¥¹¥È¤Î IPv4 ¥¢¥É¥ì¥¹¤ò¼èÆÀ¤·¤Æ¡¢
-¤½¤Î IPv4 ¥¢¥É¥ì¥¹¤Î¥Ó¥Ã¥ÈÆþ¤ìÂؤ¨¤ò¹Ô¤Ã¤¿ÃͤòÊÖ¤¹¡£
-.SH ¥Ð¥°
-¼±Ê̻Ҥ¬À¤³¦Ãæ¤Ç°ì°Õ¤Ç¤¢¤ë¤³¤È¤òÊݾڤ¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
-.SH ´ØÏ¢¹àÌÜ
-.BR hostid (1),
-.BR gethostbyname (3)
+glibc の実装では、ホスト ID を保存したファイルを オープンできなかった場合、 \fBgethostid\fP()  は
+\fBgethostname\fP(2)  を使ってホスト名を入手し、そのホスト名を \fBgethostbyname_r\fP(3)  に渡しホストの IPv4
+アドレスを取得して、 その IPv4 アドレスのビット入れ替えを行った値を返す。
+.SH バグ
+識別子が世界中で一意であることを保証することはできない。
+.SH 関連項目
+\fBhostid\fP(1), \fBgethostbyname\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。