diff --git a/unzip/ioapi.cpp b/unzip/ioapi.cpp index 161718bdfe..3d69b8ec63 100644 --- a/unzip/ioapi.cpp +++ b/unzip/ioapi.cpp @@ -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 = ftello((FILE *)stream); + ret = ftell((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(fseeko((FILE *)stream, offset, fseek_origin) != 0) + if(fseek((FILE *)stream, offset, fseek_origin) != 0) return -1; return 0; } diff --git a/unzip/ioapi.h b/unzip/ioapi.h index 97e81b8400..d3d2a3f0fc 100644 --- a/unzip/ioapi.h +++ b/unzip/ioapi.h @@ -57,12 +57,16 @@ namespace cocos2d { #define fopen64 fopen #define ftello64 ftell #define fseeko64 fseek +#define ftello ftell +#define fseeko fseek #else #ifdef _MSC_VER #define fopen64 fopen #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) #define ftello64 _ftelli64 #define fseeko64 _fseeki64 + #define ftello _ftelli64 + #define fseeko _fseeki64 #else // old MSC #define ftello64 ftell #define fseeko64 fseek