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
13       off_t ftello(FILE *stream);
14
15   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
16
17       fseeko(), ftello():
18           _FILE_OFFSET_BITS == 64 || _POSIX_C_SOURCE >= 200112L
19           (defining the obsolete _LARGEFILE_SOURCE macro also works)
20

DESCRIPTION

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

RETURN VALUE

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

ERRORS

37       See the ERRORS in fseek(3).
38

VERSIONS

40       These functions are available under glibc since version 2.1.
41

ATTRIBUTES

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

CONFORMING TO

53       POSIX.1-2001, POSIX.1-2008, SUSv2.
54

SEE ALSO

56       fseek(3)
57

COLOPHON

59       This  page  is  part of release 5.04 of the Linux man-pages project.  A
60       description of the project, information about reporting bugs,  and  the
61       latest     version     of     this    page,    can    be    found    at
62       https://www.kernel.org/doc/man-pages/.
63
64
65
66                                  2017-09-15                         FSEEKO(3)
Impressum