24#if (!defined(_WIN32)) && (!defined(WIN32))
29 #ifndef __USE_FILE_OFFSET64
30 #define __USE_FILE_OFFSET64
32 #ifndef __USE_LARGEFILE64
33 #define __USE_LARGEFILE64
35 #ifndef _LARGEFILE64_SOURCE
36 #define _LARGEFILE64_SOURCE
38 #ifndef _FILE_OFFSET_BIT
39 #define _FILE_OFFSET_BIT 64
47#if defined(USE_FILE32API)
54 #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
55 #define ftello64 _ftelli64
56 #define fseeko64 _fseeki64
58 #define ftello64 ftell
59 #define fseeko64 fseek
75#ifdef HAVE_MINIZIP64_CONF_H
80#ifdef HAVE_64BIT_INT_CUSTOM
81typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
85typedef uint64_t ZPOS64_T;
89#if defined(_MSC_VER) || defined(__BORLANDC__)
90typedef unsigned __int64 ZPOS64_T;
92typedef unsigned long long int ZPOS64_T;
104#define ZLIB_FILEFUNC_SEEK_CUR (1)
105#define ZLIB_FILEFUNC_SEEK_END (2)
106#define ZLIB_FILEFUNC_SEEK_SET (0)
108#define ZLIB_FILEFUNC_MODE_READ (1)
109#define ZLIB_FILEFUNC_MODE_WRITE (2)
110#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
112#define ZLIB_FILEFUNC_MODE_EXISTING (4)
113#define ZLIB_FILEFUNC_MODE_CREATE (8)
117 #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
118 #define ZCALLBACK CALLBACK
127typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque,
const char* filename,
int mode));
128typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream,
void* buf, uLong size));
129typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream,
const void* buf, uLong size));
130typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
131typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
133typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
134typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset,
int origin));
140 open_file_func zopen_file;
141 read_file_func zread_file;
142 write_file_func zwrite_file;
143 tell_file_func ztell_file;
144 seek_file_func zseek_file;
145 close_file_func zclose_file;
146 testerror_file_func zerror_file;
150typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream));
151typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset,
int origin));
152typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque,
const void* filename,
int mode));
156 open64_file_func zopen64_file;
157 read_file_func zread_file;
158 write_file_func zwrite_file;
159 tell64_file_func ztell64_file;
160 seek64_file_func zseek64_file;
161 close_file_func zclose_file;
162 testerror_file_func zerror_file;
173 open_file_func zopen32_file;
174 tell_file_func ztell32_file;
175 seek_file_func zseek32_file;
179#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
180#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
183#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
184#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
187long call_zseek64 OF((
const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset,
int origin));
192#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode)))
193#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream)))
194#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))