Add nonstandard ftell64() and fseek64().
commit1c7f38170ae59d6ce57e8d9dc903fba31f74ad15
authorJiří Zárevúcky <zarevucky.jiri@gmail.com>
Mon, 22 Jan 2018 20:12:00 +0000 (22 21:12 +0100)
committerJiří Zárevúcky <zarevucky.jiri@gmail.com>
Mon, 22 Jan 2018 20:12:00 +0000 (22 21:12 +0100)
treecb34b9bb6a37c2b155946737e997527889ac3cf6
parentdf2e5514fa8f0044ee3ce752a6fd5cf72425718e
Add nonstandard ftell64() and fseek64().

Currently, the C standard does not define any functions that can access file
offset with full 64-bit range. Standard ftell()/fseek() are nonportable on files
over 2 GB, while fgetpos()/fsetpos() can work with arbitrary length file, but
keep the position opaque, and no cannot be used for seeks to known numerical
offsets.

POSIX defines ftello()/fseeko(), which _can_ be 64-bit, but aren't guaranteed
to be by the standard, and come with additional baggage. Also, the naming
is rather awkward.

In short, there is no portable interface for this functionality, so
a pair of nonstandard functions is an adequate answer for this.
uspace/lib/c/generic/io/io.c
uspace/lib/c/include/stdio.h