1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Japanese Version Copyright (c) 2005 Yuichi SATO
24 .\" all rights reserved.
25 .\" Translated Sun Jan 30 03:23:04 JST 2005
26 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
28 .TH LSEEK64 3 2004-12-11 "Linux" "Linux Programmer's Manual"
31 .\"O lseek64 \- reposition 64-bit read/write file offset
32 lseek64 \- ファイルの 64 ビットの読み書きオフセットの位置を変える
35 .\"O .BR "#define _LARGEFILE64_SOURCE" " /* See feature_test_macros(7) */"
36 .BR "#define _LARGEFILE64_SOURCE" " /* feature_test_macros(7) 参照 */"
38 .B #include <sys/types.h>
40 .B #include <unistd.h>
42 .BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence );
47 .\"O family of functions reposition the offset of the open file associated
48 .\"O with the file descriptor
52 .\"O bytes relative to the start, current position, or end of the file,
64 に関連するオープンされたファイルのオフセットを、
76 .\"O For more details, return value, and errors, see
82 .\"O Four interfaces are available:
86 .\"O and the raw system call
101 .BI "off_t lseek(int " fd ", off_t " offset ", int " whence );
112 .\"O This is a 32-bit signed type on 32-bit architectures, unless one
114 これは 32 ビットアーキテクチャ上では 32 ビット符号付き型である。
119 #define _FILE_OFFSET_BITS 64
123 .\"O in which case it is a 64-bit signed type.
124 を定義してコンパイルした場合は 64 ビット符号付き型である。
131 .BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence );
135 .\"O The library routine
137 .\"O uses a 64-bit type even when
139 .\"O is a 32-bit type.
140 .\"O Its prototype (and the type
142 .\"O is available only when one compiles with
147 が 32 ビット型であっても 64 ビット型を使う。
150 は、以下の定義をしてコンパイルした場合にのみ使用可能である。
154 #define _LARGEFILE64_SOURCE
160 .\"O .\" in glibc 2.0.94, not in 2.0.6
161 .\"O is available since glibc 2.1, and is defined to be an alias for
165 .\" glibc 2.0.94 には存在するが 2.0.6 には存在しない
166 は glibc 2.1 以降で使用可能であり、
175 .BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence );
181 .\"O is a 64-bit signed type.
185 .\"O The library routine
187 .\"O .\" in libc 5.0.9, not in 4.7.6
188 .\"O is available in libc5 and glibc and works without special defines.
191 .\" libc 5.0.9 には存在するが 4.7.6 は存在しない
192 は libc5 と glibc で使用可能であり、特別な定義なしに動作する。
193 .\"O Its prototype was given in
195 .\"O with libc5, but glibc does not provide a prototype.
198 で与えられるが、glibc はプロトタイプを提供しない。
199 .\"O This is bad, since a prototype is needed.
200 .\"O Users should add
201 .\"O the above prototype, or something equivalent, to their own source.
202 これはプロトタイプが必要になるので良くない。
203 ユーザは上記のプロトタイプまたはそれと同等のものを、
205 .\"O When users complained about data loss caused by a miscompilation of
207 .\"O glibc 2.1.3 added the link-time warning
210 のコンパイルが失敗するという苦情がユーザから出たので、
211 glibc 2.1.3 では以下のようなリンク時の警告が追加された。
214 "the \`llseek\' function may be dangerous; use \`lseek64\' instead."
217 .\"O This makes this function unusable if one desires a warning-free
219 これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。
221 .\"O All the above functions are implemented in terms of this system call.
222 .\"O The prototype is:
223 上記の全ての関数は、このシステムコールに基づいて実装される。
228 .BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo ,
229 .BI " loff_t *" result ", int " whence );
233 .\"O For more details, see