MSVC large file support (was Re: [Xapian-devel] Re: [Xapian-commits]
7603: trunk/xapian-core/ trunk/xapian-core/backends/flint/
olly at survex.com
Tue Feb 6 06:28:20 GMT 2007
On Mon, Jan 29, 2007 at 05:31:19PM +0000, Charlie Hull wrote:
> I've produced patches for xapian-compact.cc, quartzcompact.cc and
> quartzcheck.cc (enclosed). Unfortunately I don't have any way of quickly
> testing them here but we should soon have some kind of Xapian test
> framework on Windows, complete with huge files, so I'll do it then.
I don't think this patch is quite correct - MSDN seems to say that
_stat64() only increases the size of the *TIMESTAMP* fields to 64 bit
- I think we actually want _stati64()! That's consistent with needing
to use _lseeki64() instead of lseek() I guess.
I think it's cleaner, and more robust to future changes, to put the
magic in one place rather than fixing this in the files which use
stat(), so I've done a bit of refactoring of this patch and some of the
other MSVC specific bits and created a couple of new "safeXXX.h" headers
which is how we've been encapsulating other platform specific oddities.
The patched version builds cleanly on Linux, so I've checked in the
changes to SVN HEAD (revision 7605) to see if it builds on the tinderbox
machines. Could you see if it at least builds on MSVC even if you can't
try it on 2GB+ files right now?
More information about the Xapian-devel