20 #ifndef _ZLIBIOAPI64_H 21 #define _ZLIBIOAPI64_H 23 #if (!defined(_WIN32)) && (!defined(WIN32)) 28 #ifndef __USE_FILE_OFFSET64 29 #define __USE_FILE_OFFSET64 31 #ifndef __USE_LARGEFILE64 32 #define __USE_LARGEFILE64 34 #ifndef _LARGEFILE64_SOURCE 35 #define _LARGEFILE64_SOURCE 37 #ifndef _FILE_OFFSET_BIT 38 #define _FILE_OFFSET_BIT 64 45 #if defined(USE_FILE32API) 47 #define ftello64 ftell 48 #define fseeko64 fseek 52 #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) 53 #define ftello64 _ftelli64 54 #define fseeko64 _fseeki64 56 #define ftello64 ftell 57 #define fseeko64 fseek 73 #ifdef HAVE_MINIZIP64_CONF_H 78 #ifdef HAVE_64BIT_INT_CUSTOM 79 typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
83 typedef uint64_t ZPOS64_T;
87 #if defined(_MSC_VER) || defined(__BORLANDC__) 88 typedef unsigned __int64 ZPOS64_T;
90 typedef unsigned long long int ZPOS64_T;
102 #define ZLIB_FILEFUNC_SEEK_CUR (1) 103 #define ZLIB_FILEFUNC_SEEK_END (2) 104 #define ZLIB_FILEFUNC_SEEK_SET (0) 106 #define ZLIB_FILEFUNC_MODE_READ (1) 107 #define ZLIB_FILEFUNC_MODE_WRITE (2) 108 #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) 110 #define ZLIB_FILEFUNC_MODE_EXISTING (4) 111 #define ZLIB_FILEFUNC_MODE_CREATE (8) 115 #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) 116 #define ZCALLBACK CALLBACK 125 typedef voidpf (ZCALLBACK *open_file_func) (voidpf opaque,
const char* filename,
int mode);
126 typedef uLong (ZCALLBACK *read_file_func) (voidpf opaque, voidpf stream,
void* buf, uLong size);
127 typedef uLong (ZCALLBACK *write_file_func) (voidpf opaque, voidpf stream,
const void* buf, uLong size);
128 typedef int (ZCALLBACK *close_file_func) (voidpf opaque, voidpf stream);
129 typedef int (ZCALLBACK *testerror_file_func) (voidpf opaque, voidpf stream);
131 typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream);
132 typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset,
int origin);
138 open_file_func zopen_file;
139 read_file_func zread_file;
140 write_file_func zwrite_file;
141 tell_file_func ztell_file;
142 seek_file_func zseek_file;
143 close_file_func zclose_file;
144 testerror_file_func zerror_file;
146 alloc_func alloc_mem;
150 typedef ZPOS64_T (ZCALLBACK *tell64_file_func) (voidpf opaque, voidpf stream);
151 typedef long (ZCALLBACK *seek64_file_func) (voidpf opaque, voidpf stream, ZPOS64_T offset,
int origin);
152 typedef voidpf (ZCALLBACK *open64_file_func) (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;
164 alloc_func alloc_mem;
176 open_file_func zopen32_file;
177 tell_file_func ztell32_file;
178 seek_file_func zseek32_file;
182 #define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) 183 #define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) 186 #define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) 187 #define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) 190 long call_zseek64 (
const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset,
int origin);
195 #define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) 196 #define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) 197 #define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))