1fseeko(3)                  Library Functions Manual                  fseeko(3)
2
3
4

NAME

6       fseeko, ftello - seek to or report file position
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <stdio.h>
13
14       int fseeko(FILE *stream, off_t offset, int whence);
15       off_t ftello(FILE *stream);
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       fseeko(), ftello():
20           _FILE_OFFSET_BITS == 64 || _POSIX_C_SOURCE >= 200112L
21

DESCRIPTION

23       The  fseeko()  and  ftello()  functions  are  identical to fseek(3) and
24       ftell(3) (see fseek(3)), respectively, except that the offset  argument
25       of  fseeko()  and the return value of ftello() is of type off_t instead
26       of long.
27
28       On some architectures, both off_t and long are 32-bit types, but defin‐
29       ing  _FILE_OFFSET_BITS  with  the value 64 (before including any header
30       files) will turn off_t into a 64-bit type.
31

RETURN VALUE

33       On successful completion, fseeko() returns 0,  while  ftello()  returns
34       the  current offset.  Otherwise, -1 is returned and errno is set to in‐
35       dicate the error.
36

ERRORS

38       See the ERRORS in fseek(3).
39

ATTRIBUTES

41       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
42       tributes(7).
43
44       ┌────────────────────────────────────────────┬───────────────┬─────────┐
45Interface                                   Attribute     Value   
46       ├────────────────────────────────────────────┼───────────────┼─────────┤
47fseeko(), ftello()                          │ Thread safety │ MT-Safe │
48       └────────────────────────────────────────────┴───────────────┴─────────┘
49

STANDARDS

51       POSIX.1-2008.
52

HISTORY

54       glibc 2.1.  POSIX.1-2001, SUSv2.
55

NOTES

57       The  declarations  of  these functions can also be obtained by defining
58       the obsolete _LARGEFILE_SOURCE feature test macro.
59

SEE ALSO

61       fseek(3)
62
63
64
65Linux man-pages 6.04              2023-03-30                         fseeko(3)
Impressum