From 0802ba275f589520988ea9af6c434af6b78add41 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 26 Jun 2012 16:52:30 -0400 Subject: Visual C++ and mingw32 fixes for large files --- libqpdf/QUtil.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libqpdf/QUtil.cc') 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 } -- cgit v1.2.3-54-g00ecf