This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] Large file iostreams
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 13 Oct 2003 11:57:30 +0200
- Subject: Re: [RFC] Large file iostreams
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F55EE@mail.ru.is>
Pétur Runólfsson wrote:
Hi,
This was discussed in July in the thread starting at:
http://gcc.gnu.org/ml/libstdc++/2003-07/msg00108.html
It was agreed that streamoff needs to be a class type that
encapsulates a 64-bit integer and that this change needs to be made
before gcc 3.4 is released.
The best I can come up with is something like this:
// A signed integer type, at least 64-bits wide
typedef /* ... */ __streamoff_base_type;
Hi Pétur
Indeed, I was about to post something about this. Thanks for your
detailed analysis: I sincerely hope we can fix 8610 in time.
Before going into the deep technical issues, a couple of thoughts
about the general framework, which I would like to work on,
relying on the specifics of the streamoff class which probably
you are better than me at refining.
What should happen in 'seekoff'/'seekpos' if the user asks for
long seek on a platform which doesn't have large file support in
its glibc? I think Nathan would agree that the best thing to do
is providing checks that lead to failure. Therefore, the idea
would be adding an autoconf test for off64_t and, depending on
it, issuing either a direct low level lseek64 or a check + a
low level lseek. Do you concur?
About the typedef, I think we have basically two options:
1- long long
2- int64_t
I don't remember well the pros and cons of both, but this doesn't
seem such a difficult to resolve issue.
Paolo.