[Patch] Fix libstdc++/11378 (take2) + xsputn optmizations

Paolo Carlini pcarlini@unitus.it
Tue Jul 8 20:37:00 GMT 2003


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.



More information about the Libstdc++ mailing list