cannot open huge file (beyond 4GB) with fopen

Discussion in 'C Programming' started by Digital Puer, Nov 24, 2005.

  1. Digital Puer

    Digital Puer Guest

    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.
     
    Digital Puer, Nov 24, 2005
    #1
    1. Advertising

  2. Digital Puer

    Skarmander Guest

    Digital Puer wrote:
    > 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.
     
    Skarmander, Nov 24, 2005
    #2
    1. Advertising

  3. Digital Puer

    Skarmander Guest

    Skarmander wrote:
    > Digital Puer wrote:
    >
    >> 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.
    >

    Oh, and try "man fopen64".

    S.
     
    Skarmander, Nov 24, 2005
    #3
  4. "Digital Puer" <> writes:
    > 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.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Nov 24, 2005
    #4
  5. On 23 Nov 2005 18:27:02 -0800, in comp.lang.c , "Digital Puer"
    <> wrote:

    >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.


    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mark McIntyre, Nov 24, 2005
    #5
  6. Digital Puer

    Digital Puer Guest

    Skarmander wrote:
    > >

    > Oh, and try "man fopen64".
    >
    > S.



    This works. Thanks!
     
    Digital Puer, Nov 25, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DotNetJunkies User

    How to upload file > 4GB on web server from ASP.NET

    DotNetJunkies User, Jul 31, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    3,782
    Joe Fallon
    Aug 1, 2004
  2. Nonee
    Replies:
    2
    Views:
    2,693
    Neredbojias
    Oct 25, 2005
  3. Replies:
    2
    Views:
    350
    Larry I Smith
    Jun 21, 2005
  4. Michel Rouzic
    Replies:
    4
    Views:
    1,854
    Michel Rouzic
    Apr 28, 2008
  5. Replies:
    3
    Views:
    530
Loading...

Share This Page