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: [Patch] Fix libstdc++/11378 (take2) + xsputn optmizations


Pétur Runólfsson wrote:

Indeed - that's why we have streamoff.


Users of iostreams (and the library itself) should use streamoff
everywhere - the problem is to find a type for streamoff that can
be used for the forseeable future (the next decade or so) - which
probably means at least 64 bits for all platforms.

It may be safe to use

typedef long long streamoff;

If sizeof(long long) changes, binary compatibility is lost anyway
so changing the definition is OK; and it is only one line of code
that needs to change so that's not much of an issue either.

Pétur, the funny side of your argument (which overall I value, be that clear!) is that it never mentions that this 'abstract' streamoff type sooner or later is used for a sys call (lseek, fseek or whatever) which expects a well defined and fixed in advance type, not what we agree to choose for our beloved new ABI!

Paolo.


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