OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / lseek64.3
1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\"*******************************************************************
24 .\"
25 .\" This file was generated with po4a. Translate the source file.
26 .\"
27 .\"*******************************************************************
28 .TH LSEEK64 3 2004\-12\-11 Linux "Linux Programmer's Manual"
29 .SH 名前
30 lseek64 \- ファイルの 64 ビットの読み書きオフセットの位置を変える
31 .SH 書式
32 \fB#define _LARGEFILE64_SOURCE\fP /* feature_test_macros(7) 参照 */
33 .br
34 \fB#include <sys/types.h>\fP
35 .br
36 \fB#include <unistd.h>\fP
37 .sp
38 \fBoff64_t lseek64(int \fP\fIfd\fP\fB, off64_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
39 .SH 説明
40 \fBlseek\fP(2)  関数ファミリーは、ファイルディスクリプタ \fIfd\fP に関連するオープンされたファイルのオフセットを、
41 ファイルの開始位置・現在位置・終端から \fIoffset\fP の位置へ変更する。 これは \fIwhence\fP がそれぞれ \fBSEEK_SET\fP,
42 \fBSEEK_CUR\fP, \fBSEEK_END\fP の場合に対応する。
43 .LP
44 更に詳しい説明・返り値・エラーは、 \fBlseek\fP(2)  を参照すること。
45 .PP
46 4 つのインタフェースが使用可能である: \fBlseek\fP(2), \fBlseek64\fP(), \fBllseek\fP(2)  と元となるシステムコール
47 \fB_llseek\fP(2)  である。
48 .SS lseek
49 プロトタイプ:
50 .nf
51 .sp
52 .in +4n
53 \fBoff_t lseek(int \fP\fIfd\fP\fB, off_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
54 .in
55 .fi
56 .sp
57 \fBlseek\fP(2)  は型 \fIoff_t\fP を使う。 これは 32 ビットアーキテクチャ上では 32 ビット符号付き型である。 ただし、
58 .nf
59 .sp
60 .in +4n
61 #define _FILE_OFFSET_BITS 64
62 .in
63 .sp
64 .fi
65 を定義してコンパイルした場合は 64 ビット符号付き型である。
66 .SS lseek64
67 プロトタイプ:
68 .nf
69 .sp
70 .in +4n
71 \fBoff64_t lseek64(int \fP\fIfd\fP\fB, off64_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
72 .in
73 .fi
74 .sp
75 ライブラリルーチン \fBlseek64\fP()  は \fIoff_t\fP が 32 ビット型であっても 64 ビット型を使う。 このプロトタイプ (と型
76 \fIoff64_t\fP)  は、以下の定義をしてコンパイルした場合にのみ使用可能である。
77 .nf
78 .sp
79 .in +4n
80 #define _LARGEFILE64_SOURCE
81 .in
82 .sp
83 .fi
84 .\" in glibc 2.0.94, not in 2.0.6
85 関数 \fBlseek64\fP()  は glibc 2.1 以降で使用可能であり、 \fBllseek\fP()  のエイリアスとして定義されている。
86 .SS llseek
87 プロトタイプ:
88 .nf
89 .sp
90 .in +4n
91 \fBloff_t llseek(int \fP\fIfd\fP\fB, loff_t \fP\fIoffset\fP\fB, int \fP\fIwhence\fP\fB);\fP
92 .in
93 .fi
94 .sp
95 .\" in libc 5.0.9, not in 4.7.6
96 型 \fIloff_t\fP は 64 ビット符号付き型である。 ライブラリルーチン \fBllseek\fP()  は libc5 と glibc
97 で使用可能であり、特別な定義なしに動作する。 このプロトタイプは、libc5 では \fI<unistd.h>\fP
98 で与えられるが、glibc はプロトタイプを提供しない。 これはプロトタイプが必要になるので良くない。
99 ユーザは上記のプロトタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 このデータがないことによって \fBe2fsck\fP(8)
100 のコンパイルが失敗するという苦情がユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。
101 .sp
102 .in +4n
103 "the \`llseek\' function may be dangerous; use \`lseek64\' instead."
104 .in
105 .sp
106 これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。
107 .SS _llseek
108 上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以下の通り:
109 .nf
110 .sp
111 .in +4n
112 \fBint _llseek(int \fP\fIfd\fP\fB, off_t \fP\fIoffset_hi\fP\fB, off_t \fP\fIoffset_lo\fP\fB,\fP
113 \fB            loff_t *\fP\fIresult\fP\fB, int \fP\fIwhence\fP\fB);\fP
114 .in
115 .fi
116 .sp
117 更に詳しい情報は、 \fBllseek\fP(2)  を参照すること。
118 .SH 関連項目
119 \fBllseek\fP(2), \fBlseek\fP(2)