[Patch draft] Fix libstdc++/8610

Paolo Carlini pcarlini@suse.de
Tue Oct 21 15:11:00 GMT 2003


Benjamin Kosnik wrote:

>Yeah. No ideas on this, however. Maybe
>
>numeric_limits<off_t>::max()?
>
Nice idea! Will test that change, thanks.

>>Also, is it safe to assume that a libc making available lseek64
>>does also provide fopen64?
>>    
>>
>Not really.
>
I see.

> You should check for this as well. I suggest also, instead
>of keying off of HAVE_INT64_T, HAVE_LSEEK64 that you check for all this
>stuff in much the same way that _GLIBCXX_USE_WCHAR_T operates.
>
>Ie, in configure test for  int64_t, lseek64, fopen64 and if they all succeed define
>
>_GLIBCXX_USE_LFS 1
>
>And then use this macro in the source files.
>  
>
Hummm. However, those are really two orthogonal issues: I mean, we
*always* typedef __streamoff_base_type to a "big" type, irrespective
of the actual low level support for LFS. The check for int64_t (vs
long long) is only of minor importance wrt to the other one (in fact
glibc defines int64_t as exactly long long on 32 bit machines!).

Therefore that check should be kept separate, on my opinion.

On the other hand we can have a check for *both* fopen64 and lseek64
which outputs _GLIBCXX_USE_LFS

Do you concur?

Paolo.



More information about the Libstdc++ mailing list