Processing files larger than 2.2GB. - Linux
This is a discussion on Processing files larger than 2.2GB. - Linux ; I always used the following functions to process files:
fopen()
fclose()
fseek()
ftell()
fwrite()
fread()
fputc()
fgetc()
The limitation of (at least some of) these functions is the maximum
filesize of 2^31 bytes.
So, to solve this I use:
fopen64()
...
-
Processing files larger than 2.2GB.
I always used the following functions to process files:
fopen()
fclose()
fseek()
ftell()
fwrite()
fread()
fputc()
fgetc()
The limitation of (at least some of) these functions is the maximum
filesize of 2^31 bytes.
So, to solve this I use:
fopen64()
fseeko64()
ftello64()
But for the other functions I can't find theire largefile equivalents.
Can I safely assume that they are compatibel?
Unfortunately, I can't find manpages for fopen64(), fseeko64() and
ftello64();
Where can I find more information about this matter?
-
Re: Processing files larger than 2.2GB.
On a sunny day (Sat, 19 Jan 2008 02:37:11 -0800 (PST)) it happened
teuniz@gmail.com wrote in
<50c7ac32-dcf3-43b1-a39f-09a36e8eeecd@i12g2000prf.googlegroups.com>:
>I always used the following functions to process files:
>
>fopen()
>fclose()
>fseek()
>ftell()
>fwrite()
>fread()
>fputc()
>fgetc()
>
>The limitation of (at least some of) these functions is the maximum
>filesize of 2^31 bytes.
>
>So, to solve this I use:
>
>fopen64()
>fseeko64()
>ftello64()
>
>But for the other functions I can't find theire largefile equivalents.
>Can I safely assume that they are compatibel?
You should read libc.info, possibly on your system in
/usr/share/info/libc.info
It describes how the 32 bit interface is automatically replaced by the
64 bit one if you compile with the correct flags, like
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
It also describes all those libc functions in detail.
>Unfortunately, I can't find manpages for fopen64(), fseeko64() and
>ftello64();
>Where can I find more information about this matter?
>
>