fopen large file (tera byte) support?

N

Nagrik

Hello Group,

I have to support 200 Gigabyte support to open a file in my program.
My program exits with

open("/mnt/d1/tmp/<file name>", O_RDONLY) = -1 EFBIG (File too large)

This open system call is a result of fopen C++ library call, and there
is no way I can provide

O_LARGEFILE mode in fopen call.

Also the return valud of fopen is a file handle, where open system
call returns the file descriptor and hence I can not substitute one vs
other.

Is there a way I can get around this problem.

Thanks.

nagrik
 
D

Daniel Pitts

Nagrik said:
Hello Group,

I have to support 200 Gigabyte support to open a file in my program.
My program exits with

open("/mnt/d1/tmp/<file name>", O_RDONLY) = -1 EFBIG (File too large)

This open system call is a result of fopen C++ library call, and there
is no way I can provide

O_LARGEFILE mode in fopen call.

Also the return valud of fopen is a file handle, where open system
call returns the file descriptor and hence I can not substitute one vs
other.

Is there a way I can get around this problem.

Thanks.

nagrik
is fdopen OR _fdopen available on your compiler?
 
I

Ian Collins

Nagrik said:
Hello Group,

I have to support 200 Gigabyte support to open a file in my program.
My program exits with

open("/mnt/d1/tmp/<file name>", O_RDONLY) = -1 EFBIG (File too large)
comp.unix.programmer would be a better place to ask.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top