avoid some overlong lines from posix urls, etc.
[gnulib.git] / doc / posix-functions / lseek.texi
1 @node lseek
2 @section @code{lseek}
3 @findex lseek
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/lseek.html}
6
7 Gnulib module: lseek
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function mistakenly succeeds on pipes on some platforms: mingw, BeOS.
13 @end itemize
14
15 Portability problems not fixed by Gnulib:
16 @itemize
17 @item
18 POSIX does not specify which file descriptors support seeking and which don't.
19 In practice, regular files and block devices support seeking, and ttys, pipes,
20 and most character devices don't support it.
21 @item
22 On platforms where @code{off_t} is a 32-bit type, @code{lseek} does not work
23 correctly with files larger than 2 GB.  The fix is to use the
24 @code{AC_SYS_LARGEFILE} macro.
25 @item
26 When the third argument is invalid, POSIX says that @code{lseek} should set
27 @code{errno} to @code{EINVAL} and return -1, but in this situation a
28 @code{SIGSYS} signal is raised on some platforms:
29 IRIX 6.5.
30 @item
31 When the @code{lseek} function fails, POSIX says that the file offset remains
32 unchanged.  But on some platforms, attempting to set a negative file offset
33 fails and sets the file offset to 0:
34 BeOS.
35 @end itemize