[arm64] Handle fp regs in mono_sigctx_to_monoctx () on linux, recent gcc versions...
[mono-project.git] / support / minizip / ioapi.h
blobff8470389618d93df5307f98f5fc27cc5fb7325a
1 /* ioapi.h -- IO base function header for compress/uncompress .zip
2 files using zlib + zip or unzip API
4 Version 1.01e, February 12th, 2005
6 Copyright (C) 1998-2005 Gilles Vollant
7 */
9 #ifndef _ZLIBIOAPI_H
10 #define _ZLIBIOAPI_H
13 #define ZLIB_FILEFUNC_SEEK_CUR (1)
14 #define ZLIB_FILEFUNC_SEEK_END (2)
15 #define ZLIB_FILEFUNC_SEEK_SET (0)
17 #define ZLIB_FILEFUNC_MODE_READ (1)
18 #define ZLIB_FILEFUNC_MODE_WRITE (2)
19 #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
21 #define ZLIB_FILEFUNC_MODE_EXISTING (4)
22 #define ZLIB_FILEFUNC_MODE_CREATE (8)
25 #ifndef ZCALLBACK
26 // Nothing defines 'CALLBACK' anyway so to avoid accidentally changing
27 // the calling convention by including a header which defines this, just
28 // define ZCALLBACK as empty so we always get cdecl and our P/Invokes don't break.
29 #define ZCALLBACK
31 //#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
32 //#define ZCALLBACK CALLBACK
33 //#else
34 //#define ZCALLBACK
35 //#endif
36 #endif
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
42 typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
43 typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
44 typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
45 typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
46 typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
47 typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
48 typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
50 typedef struct zlib_filefunc_def_s
52 open_file_func zopen_file;
53 read_file_func zread_file;
54 write_file_func zwrite_file;
55 tell_file_func ztell_file;
56 seek_file_func zseek_file;
57 close_file_func zclose_file;
58 testerror_file_func zerror_file;
59 voidpf opaque;
60 } zlib_filefunc_def;
64 void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
66 #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
67 #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
68 #define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
69 #define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
70 #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
71 #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
74 #ifdef __cplusplus
76 #endif
78 #endif