-D_FILE_OFFSET_BITS=64 as a compiler flag, and that's it.
i'm using open without any special flag, and without all the lseek64 calls, etc, even the sizeof off_t is 64bit automatically.
guy keren wrote:
On Sat, 15 Jan 2005, Shachar Shemesh wrote:
I'm trying to make sure a program I'm writing works with files greater than 4GB in length. In order to do that, I'm trying to create a sparse file of this size. The program is this: #define _LARGEFILE64_SOURCE #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h>
int main(int argc, char *argv[] )
{
int fd=open(argv[1], O_CREAT|O_WRONLY, 0755);
you need to add 'O_LARGEFILE' to the flags of 'open'.
if you search for EFBIG in the sources of your file system, you'll see this instantly.
================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
