Yes there are 64 bit versions of fopen and friends. If you have already written your program using fopen, fread etc, you can simply define _FILE_OFFSET_BITS == 64 when you compile, and all fopen calls will be translated to fopen64 automatically.
For example, when building myprog.c, which would usually be built like this (where $ is your shell prompt):
Code:
$ gcc myprog.c -o myprog_32_bit_fh_version
For a 64 bit version you might do it like this:
Code:
$ gcc -D_FILE_OFFSET_BITS=64 myprog.c -o myprog_64_bit_fh_version
You can test to see if your program is using the large file option using strace. For example, if your program opens the file "myfile" for writing:
Code:
$ strace ./myprog_32_bit_fh_version 2>&1 |grep myfile
open("myfile", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
$ strace ./myprog_64_bit_fh_version 2>&1 |grep myfile
open("myfile", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
Notice the addition of the O_LARGEFILE flag in the 64 bit version.