summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-09-20 21:38:29 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-09-20 21:38:29 +0000
commit772d49eb4a3248adcaf0fdd075ae978d733ff7bc (patch)
treeb89f1b6224dd92e7de110b56c0488d2911b372cb /src
parent21b129a7e49f25b1963f3371a910272725013dff (diff)
Added large file support for MinGW
git-svn-id: http://pugixml.googlecode.com/svn/trunk@744 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp7
1 files changed, 7 insertions, 0 deletions
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;