fopen large file (tera byte) support?

Discussion in 'C++' started by Nagrik, Jun 20, 2008.

  1. Nagrik

    Nagrik Guest

    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
     
    Nagrik, Jun 20, 2008
    #1
    1. Advertising

  2. Nagrik

    Daniel Pitts Guest

    Nagrik wrote:
    > 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?

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Jun 20, 2008
    #2
    1. Advertising

  3. Nagrik

    Ian Collins Guest

    Nagrik wrote:
    > 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.

    --
    Ian Collins.
     
    Ian Collins, Jun 20, 2008
    #3
    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. Nonee
    Replies:
    2
    Views:
    2,711
    Neredbojias
    Oct 25, 2005
  2. Replies:
    2
    Views:
    355
    Larry I Smith
    Jun 21, 2005
  3. Michel Rouzic
    Replies:
    4
    Views:
    1,864
    Michel Rouzic
    Apr 28, 2008
  4. daved170

    read text file byte by byte

    daved170, Dec 12, 2009, in forum: Python
    Replies:
    30
    Views:
    1,908
    Nobody
    Dec 16, 2009
  5. terrable

    Re: Free Tera Has Gone Crazy

    terrable, Jan 9, 2013, in forum: Java
    Replies:
    1
    Views:
    207
    terrable
    Jan 9, 2013
Loading...

Share This Page