1FSEEKO(3)                  Linux Programmer's Manual                 FSEEKO(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

35       See the ERRORS in fseek(3).
36

VERSIONS

38       These functions are available under glibc since version 2.1.
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

CONFORMING TO

51       POSIX.1-2001, POSIX.1-2008, SUSv2.
52

NOTES

54       The  declarations  of  these functions can also be obtained by defining
55       the obsolete _LARGEFILE_SOURCE feature test macro.
56

SEE ALSO

58       fseek(3)
59

COLOPHON

61       This page is part of release 5.13 of the Linux  man-pages  project.   A
62       description  of  the project, information about reporting bugs, and the
63       latest    version    of    this    page,    can     be     found     at
64       https://www.kernel.org/doc/man-pages/.
65
66
67
68                                  2021-03-22                         FSEEKO(3)
Impressum