Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
zconf.h
1
/* zconf.h -- configuration of the zlib compression library
2
* Copyright (C) 1995-2002 Jean-loup Gailly.
3
* For conditions of distribution and use, see copyright notice in zlib.h
4
*/
5
6
/* @(#) $Id: zconf.h 5432 2023-05-02 01:10:25Z wini $ */
7
8
#ifndef _ZCONF_H
9
#define _ZCONF_H
10
11
#ifndef USE_Z_NAMES
12
# define deflateInit_ zba_deflateInit_
13
# define deflate zba_deflate
14
# define deflateEnd zba_deflateEnd
15
# define inflateInit_ zba_inflateInit_
16
# define inflate zba_inflate
17
# define inflateEnd zba_inflateEnd
18
# define deflateInit2_ zba_deflateInit2_
19
# define deflateSetDictionary zba_deflateSetDictionary
20
# define deflateCopy zba_deflateCopy
21
# define deflateReset zba_deflateReset
22
# define deflateParams zba_deflateParams
23
# define inflateInit2_ zba_inflateInit2_
24
# define inflateSetDictionary zba_inflateSetDictionary
25
# define inflateSync zba_inflateSync
26
# define inflateSyncPoint zba_inflateSyncPoint
27
# define inflateReset zba_inflateReset
28
# define compress zba_compress
29
# define compress2 zba_compress2
30
# define uncompress zba_uncompress
31
# define adler32 zba_adler32
32
# define get_crc_table zba_get_crc_table
33
#endif
34
35
#if 0
36
# define Byte z_Byte
37
# define uInt z_uInt
38
# define uLong z_uLong
39
# define Bytef z_Bytef
40
# define charf z_charf
41
# define intf z_intf
42
# define uIntf z_uIntf
43
# define uLongf z_uLongf
44
# define voidpf z_voidpf
45
# define voidp z_voidp
46
#endif
47
48
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
49
# define WIN32
50
#endif
51
#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
52
# ifndef __32BIT__
53
# define __32BIT__
54
# endif
55
#endif
56
#if defined(__MSDOS__) && !defined(MSDOS)
57
# define MSDOS
58
#endif
59
60
/*
61
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
62
* than 64k bytes at a time (needed on systems with 16-bit int).
63
*/
64
#if defined(MSDOS) && !defined(__32BIT__)
65
# define MAXSEG_64K
66
#endif
67
#ifdef MSDOS
68
# define UNALIGNED_OK
69
#endif
70
71
#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
72
# define STDC
73
#endif
74
#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
75
# ifndef STDC
76
# define STDC
77
# endif
78
#endif
79
80
#ifndef STDC
81
# ifndef const
/* cannot use !defined(STDC) && !defined(const) on Mac */
82
# define const
83
# endif
84
#endif
85
86
/* Some Mac compilers merge all .h files incorrectly: */
87
#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
88
# define NO_DUMMY_DECL
89
#endif
90
91
/* Old Borland C incorrectly complains about missing returns: */
92
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
93
# define NEED_DUMMY_RETURN
94
#endif
95
96
97
/* Maximum value for memLevel in deflateInit2 */
98
#ifndef MAX_MEM_LEVEL
99
# ifdef MAXSEG_64K
100
# define MAX_MEM_LEVEL 8
101
# else
102
# define MAX_MEM_LEVEL 9
103
# endif
104
#endif
105
106
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
107
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
108
* created by gzip. (Files created by minigzip can still be extracted by
109
* gzip.)
110
*/
111
#ifndef MAX_WBITS
112
# define MAX_WBITS 15
/* 32K LZ77 window */
113
#endif
114
115
/* The memory requirements for deflate are (in bytes):
116
(1 << (windowBits+2)) + (1 << (memLevel+9))
117
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
118
plus a few kilobytes for small objects. For example, if you want to reduce
119
the default memory requirements from 256K to 128K, compile with
120
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
121
Of course this will generally degrade compression (there's no free lunch).
122
123
The memory requirements for inflate are (in bytes) 1 << windowBits
124
that is, 32K for windowBits=15 (default value) plus a few kilobytes
125
for small objects.
126
*/
127
128
/* Type declarations */
129
130
#ifndef OF
/* function prototypes */
131
# ifdef STDC
132
# define OF(args) args
133
# else
134
# define OF(args) ()
135
# endif
136
#endif
137
138
/* The following definitions for FAR are needed only for MSDOS mixed
139
* model programming (small or medium model with some far allocations).
140
* This was tested only with MSC; for other MSDOS compilers you may have
141
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
142
* just define FAR to be empty.
143
*/
144
#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
145
/* MSC small or medium model */
146
# define SMALL_MEDIUM
147
# ifdef _MSC_VER
148
# define FAR _far
149
# else
150
# define FAR far
151
# endif
152
#endif
153
#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
154
# ifndef __32BIT__
155
# define SMALL_MEDIUM
156
# define FAR _far
157
# endif
158
#endif
159
160
/* Compile with -DZLIB_DLL for Windows DLL support */
161
#if defined(ZLIB_DLL)
162
# if defined(_WINDOWS) || defined(WINDOWS)
163
# ifdef FAR
164
# undef FAR
165
# endif
166
# include <windows.h>
167
# define ZEXPORT WINAPI
168
# ifdef WIN32
169
# define ZEXPORTVA WINAPIV
170
# else
171
# define ZEXPORTVA FAR _cdecl _export
172
# endif
173
# endif
174
# if defined (__BORLANDC__)
175
# if (__BORLANDC__ >= 0x0500) && defined (WIN32)
176
# include <windows.h>
177
# define ZEXPORT __declspec(dllexport) WINAPI
178
# define ZEXPORTRVA __declspec(dllexport) WINAPIV
179
# else
180
# if defined (_Windows) && defined (__DLL__)
181
# define ZEXPORT _export
182
# define ZEXPORTVA _export
183
# endif
184
# endif
185
# endif
186
#endif
187
188
#if defined (__BEOS__)
189
# if defined (ZLIB_DLL)
190
# define ZEXTERN extern __declspec(dllexport)
191
# else
192
# define ZEXTERN extern __declspec(dllimport)
193
# endif
194
#endif
195
196
#ifndef ZEXPORT
197
# define ZEXPORT
198
#endif
199
#ifndef ZEXPORTVA
200
# define ZEXPORTVA
201
#endif
202
#ifndef ZEXTERN
203
# define ZEXTERN extern
204
#endif
205
206
#ifndef FAR
207
# define FAR
208
#endif
209
210
typedef
unsigned
char
Byte;
/* 8 bits */
211
typedef
unsigned
int
uInt;
/* 16 bits or more */
212
typedef
unsigned
long
uLong;
/* 32 bits or more */
213
214
#ifdef SMALL_MEDIUM
215
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
216
# define Bytef Byte FAR
217
#else
218
typedef
Byte FAR Bytef;
219
#endif
220
typedef
char
FAR charf;
221
typedef
int
FAR intf;
222
typedef
uInt FAR uIntf;
223
typedef
uLong FAR uLongf;
224
225
#ifdef STDC
226
typedef
void
FAR *voidpf;
227
typedef
void
*voidp;
228
#else
229
typedef
Byte FAR *voidpf;
230
typedef
Byte *voidp;
231
#endif
232
233
#ifdef HAVE_UNISTD_H
234
# include <sys/types.h>
/* for off_t */
235
# include <unistd.h>
/* for SEEK_* and off_t */
236
# define z_off_t off_t
237
#endif
238
#ifndef SEEK_SET
239
# define SEEK_SET 0
/* Seek from beginning of file. */
240
# define SEEK_CUR 1
/* Seek from current position. */
241
# define SEEK_END 2
/* Set file pointer to EOF plus "offset" */
242
#endif
243
#ifndef z_off_t
244
# define z_off_t long
245
#endif
246
247
/* MVS linker does not support external names larger than 8 bytes */
248
#if defined(__MVS__)
249
# pragma map(deflateInit_,"DEIN"
)
250
# pragma map(deflateInit2_,"DEIN2"
)
251
# pragma map(deflateEnd,"DEEND"
)
252
# pragma map(inflateInit_,"ININ"
)
253
# pragma map(inflateInit2_,"ININ2"
)
254
# pragma map(inflateEnd,"INEND"
)
255
# pragma map(inflateSync,"INSY"
)
256
# pragma map(inflateSetDictionary,"INSEDI"
)
257
# pragma map(inflate_blocks,"INBL"
)
258
# pragma map(inflate_blocks_new,"INBLNE"
)
259
# pragma map(inflate_blocks_free,"INBLFR"
)
260
# pragma map(inflate_blocks_reset,"INBLRE"
)
261
# pragma map(inflate_codes_free,"INCOFR"
)
262
# pragma map(inflate_codes,"INCO"
)
263
# pragma map(inflate_fast,"INFA"
)
264
# pragma map(inflate_flush,"INFLU"
)
265
# pragma map(inflate_mask,"INMA"
)
266
# pragma map(inflate_set_dictionary,"INSEDI2"
)
267
# pragma map(inflate_copyright,"INCOPY"
)
268
# pragma map(inflate_trees_bits,"INTRBI"
)
269
# pragma map(inflate_trees_dynamic,"INTRDY"
)
270
# pragma map(inflate_trees_fixed,"INTRFI"
)
271
# pragma map(inflate_trees_free,"INTRFR"
)
272
#endif
273
274
#endif
/* _ZCONF_H */
inc
zconf.h
Barracuda Application Server
documentation generated on Sun Sep 20 2026 07:32:41