------- Additional Comments From ra at atterer dot net  2005-07-10 08:39 -------
(In reply to comment #1)
> mingw runtime does not have struct stat64 or fstat64(), so this define is not 
> correct.

Hmm - but I've successfully cross-compiled libstdc++ on Linux with this #define,
and I'm 100% sure it made a difference - my cross-compiled program can now
access large files under Windows, previously it couldn't.

Look e.g. at the code in libstdc++-v3/config/io/basic_file_stdio.cc:

#if defined (_GLIBCXX_USE_LFS) && defined (__MINGW32__)
    struct _stati64 __buffer;
    int __ret = _fstati64 (this->fd(), &__buffer);
...
It's all there, and _GLIBCXX_USE_LFS is needed to enable it. BTW, your native
mingw builds do have large file support, LFS only breaks if libstdc++ is
cross-compiled.

The rest of libstdc++ does not use fstat64(), only fstat() - I guess it relies
on someone re#defing it to fstat64 (or, in fact, _fstati64).

Richard (OP)

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22388

Reply via email to