This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix libstdc++/11378 (take2) + xsputn optmizations
Nathan Myers wrote:
I think it would be a grave error to introduce compile-time
dependencies into the interface. Glibc had no choice, as they
were constrained by backward compatibility.
Instead, our streamoff and streampos types should always be 64-bit
types on all platforms. (That is, "int64_t", not "long long".)
Furthermore, we should use the 64-bit versions of system calls
automatically wherever they exist. Where they don't, we should check
for range errors where we convert a 64-bit offset to a 32-bit offset.
As a matter of staging, we might introduce the 64-bit types and the
range checks first, and then work on enabling use of the 64-bit system
calls after. That would probably flush out helpers quicker.
Thanks Nathan, for your feedback.
To be honest, when I first discussed a bit this issue with Andreas (a 64
bit expert) in Ottawa he mentioned that the approach using compile-time
dependencies was only one possibility, to be weighed against others. At
the time I didn't fully understand what he meant, but now I do much better.
Paolo.