public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "D. R. Evans" <doc.evans@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Writing past the 2GB file size boundary on 32-bit systems
Date: Mon, 07 Jan 2008 12:30:00 -0000	[thread overview]
Message-ID: <47800F8D.9080402@gmail.com> (raw)

Sorry... originally posted from an unsubscribed account, which seems to
mean that some people saw it but it wasn't posted to the entire reflector.

I've also added some more detail.

----

Using gcc/g++ 3.3.1 on an old 32-bit Mandrake 9.2.1 production system
(which means that I can't update to anything newer).

Is there a clear description anywhere of how to use C++ streams and
ordinary C FILE* functions so that they don't fail when an attempt to write
to a file goes past the 2GB boundary?

I have found various vague comments and a few suggestions scattered around
various places, but nothing I've tried so far has worked. I've spent a day
and a half trying various things and figured it was now time to ask in a
place where people probably know how to get this working :-)

If anyone cares about the part of the problem I'm trying to solve first: I
have attached cout to a file using the mechanism in Josuttis pp 641-642. It
works fine until the file hits 2GB, at which point the program prints that
the file size limit has been exceeded and then terminates. This is true no
matter what macros I define (in particular -D_LARGEFILE_SOURCE and
_D_FILE_OFFSET_BITS=64).

  Doc Evans






             reply	other threads:[~2008-01-05 23:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-07 12:30 D. R. Evans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-07 14:24 Nick Maclaren
2008-01-07  0:08 D. R. Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47800F8D.9080402@gmail.com \
    --to=doc.evans@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).