cannot open huge file (beyond 4GB) with fopen

D

Digital Puer

Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
message is: "Value too large to be stored in data type". Can someone
sugggest a solution? Do I need to use a new file library?

I am on an AIX, 32-bit PPC architecture, in case that matters.
 
S

Skarmander

Digital said:
Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
message is: "Value too large to be stored in data type". Can someone
sugggest a solution? Do I need to use a new file library?

I am on an AIX, 32-bit PPC architecture, in case that matters.
I'm unfamiliar with the platform, but if fopen() is already failing
before you even perform an operation on the file, your problem is with
the C library implementation.

Try a platform or library-specific newsgroup/forum/wiki/message
board/Post-It(tm) exchange network. comp.unix.aix looks promising.

S.
 
S

Skarmander

Skarmander said:
I'm unfamiliar with the platform, but if fopen() is already failing
before you even perform an operation on the file, your problem is with
the C library implementation.

Try a platform or library-specific newsgroup/forum/wiki/message
board/Post-It(tm) exchange network. comp.unix.aix looks promising.
Oh, and try "man fopen64".

S.
 
K

Keith Thompson

Digital Puer said:
Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
message is: "Value too large to be stored in data type". Can someone
sugggest a solution? Do I need to use a new file library?

I am on an AIX, 32-bit PPC architecture, in case that matters.

This is system-specific, so we can't really give a definitive answer
here.

<OFF_TOPIC>
I don't know whether the "-q64" option to IBM's compiler will help.
</OFF_TOPIC>

Try comp.unix.aix.
 
M

Mark McIntyre

Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
message is: "Value too large to be stored in data type". Can someone
sugggest a solution?

Upgrade to Solaris.... :)
Do I need to use a new file library?

Its possible you might find a different standard library could handle
larger files. the likely problem is that the filesize is stored in a
long, which on a 32-bit implementation is probably 32 bits ie max of
4GB.

The short answer is that this is very operating system specific, and
you'll need to ask in a group specialising in your OS.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top