This is the mail archive of the
mailing list for the libstdc++ project.
Re: [Patch] Fix libstdc++/11378 (take2) + xsputn optmizations
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: Andreas Jaeger <aj at suse dot de>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 08 Jul 2003 22:39:32 +0200
- Subject: Re: [Patch] Fix libstdc++/11378 (take2) + xsputn optmizations
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F558F@nike.hir.is>
Pétur Runólfsson wrote:
Indeed - that's why we have streamoff.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!
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.