From 4ded6d5ea077e91ce68eb22aff326cf1709741b9 Mon Sep 17 00:00:00 2001 From: Arnold <40414978+PatriceJiang@users.noreply.github.com> Date: Wed, 9 Jan 2019 14:47:19 +0800 Subject: [PATCH] already support 64 bits offset by define _FILE_OFFSET_BITS=64 (#341) --- unzip/ioapi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unzip/ioapi.cpp b/unzip/ioapi.cpp index 7898b28047..161718bdfe 100644 --- a/unzip/ioapi.cpp +++ b/unzip/ioapi.cpp @@ -111,7 +111,7 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, if ((filename!=NULL) && (mode_fopen != NULL)) { - file = fopen64((const char*)filename, mode_fopen); + file = fopen((const char*)filename, mode_fopen); } return file; @@ -143,7 +143,7 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) { ZPOS64_T ret; - ret = ftello64((FILE *)stream); + ret = ftello((FILE *)stream); return ret; } @@ -186,7 +186,7 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T break; default: return -1; } - if(fseeko64((FILE *)stream, offset, fseek_origin) != 0) + if(fseeko((FILE *)stream, offset, fseek_origin) != 0) return -1; return 0; }