This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Large file iostreams


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]