[Patch] Fix libstdc++/11378 (take2) + xsputn optmizations
Andreas Jaeger
aj@suse.de
Tue Jul 8 19:01:00 GMT 2003
Nathan Myers <ncm-nospam@cantrip.org> writes:
> 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.
I would not use int64_t - let's use the libc types directly like
fpos64_t and off64_t - and then using fsetpos64/fseeko64.
> 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.
Not sure whether this works. One problem with the 64-bit types and
system calls is that they are not available everywhere, we have to be
carefull to test for them. Using int64_t as a fallback might work...
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Libstdc++
mailing list