From 772d49eb4a3248adcaf0fdd075ae978d733ff7bc Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Mon, 20 Sep 2010 21:38:29 +0000 Subject: Added large file support for MinGW git-svn-id: http://pugixml.googlecode.com/svn/trunk@744 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/pugixml.cpp') diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 5c327ff..54afded 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -2989,6 +2989,13 @@ namespace _fseeki64(file, 0, SEEK_END); length_type length = _ftelli64(file); _fseeki64(file, 0, SEEK_SET); + #elif defined(__MINGW32__) && !defined(__NO_MINGW_LFS) + // there are 64-bit versions of fseek/ftell, let's use them + typedef off64_t length_type; + + fseeko64(file, 0, SEEK_END); + length_type length = ftello64(file); + fseeko64(file, 0, SEEK_SET); #else // if this is a 32-bit OS, long is enough; if this is a unix system, long is 64-bit, which is enough; otherwise we can't do anything anyway. typedef long length_type; -- cgit v1.2.3