aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QUtil.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-06-26 22:52:30 +0200
committerJay Berkenbilt <ejb@ql.org>2012-06-27 05:05:59 +0200
commit0802ba275f589520988ea9af6c434af6b78add41 (patch)
treeb1da015693b0ff49aedb73edd44c7b73591bc33c /libqpdf/QUtil.cc
parentf60bb8e07141b605265fb3a0241b4a5f73d4498c (diff)
downloadqpdf-0802ba275f589520988ea9af6c434af6b78add41.tar.zst
Visual C++ and mingw32 fixes for large files
Diffstat (limited to 'libqpdf/QUtil.cc')
-rw-r--r--libqpdf/QUtil.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index bdb73f54..0db61eed 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -126,8 +126,14 @@ QUtil::fseek_off_t(FILE* stream, qpdf_offset_t offset, int whence)
{
#if HAVE_FSEEKO
return fseeko(stream, (off_t)offset, whence);
+#elif HAVE_FSEEKO64
+ return fseeko64(stream, offset, whence);
#else
+# ifdef _MSC_VER
+ return _fseeki64(stream, offset, whence);
+# else
return fseek(stream, (long)offset, whence);
+# endif
#endif
}
@@ -136,8 +142,14 @@ QUtil::ftell_off_t(FILE* stream)
{
#if HAVE_FSEEKO
return (qpdf_offset_t)ftello(stream);
+#elif HAVE_FSEEKO64
+ return (qpdf_offset_t)ftello64(stream);
#else
+# ifdef _MSC_VER
+ return _ftelli64(stream);
+# else
return (qpdf_offset_t)ftell(stream);
+# endif
#endif
}