bump standards-version
[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 On platforms where @code{off_t} is a 32-bit type, @code{lseek} does not work
13 correctly with files larger than 2 GB.  (Cf. @code{AC_SYS_LARGEFILE}.)
14 @item
15 This function mistakenly succeeds on pipes on some platforms: mingw, MSVC 9, BeOS.
16 @end itemize
17
18 Portability problems not fixed by Gnulib:
19 @itemize
20 @item
21 POSIX does not specify which file descriptors support seeking and which don't.
22 In practice, regular files and block devices support seeking, and ttys, pipes,
23 and most character devices don't support it.
24 @item
25 When the third argument is invalid, POSIX says that @code{lseek} should set
26 @code{errno} to @code{EINVAL} and return -1, but in this situation a
27 @code{SIGSYS} signal is raised on some platforms:
28 IRIX 6.5.
29 @item
30 When the @code{lseek} function fails, POSIX says that the file offset remains
31 unchanged.  But on some platforms, attempting to set a negative file offset
32 fails and sets the file offset to 0:
33 BeOS.
34 @end itemize