~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to lib/zlib/zconf.h

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* zconf.h -- configuration of the zlib compression library
 
2
 * Copyright (C) 1995-2005 Jean-loup Gailly.
 
3
 * For conditions of distribution and use, see copyright notice in zlib.h
 
4
 */
 
5
 
 
6
/* @(#) $Id$ */
 
7
 
 
8
#include "replace.h"
 
9
#define Z_PREFIX
 
10
 
 
11
#ifndef ZCONF_H
 
12
#define ZCONF_H
 
13
 
 
14
/*
 
15
 * If you *really* need a unique prefix for all types and library functions,
 
16
 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
 
17
 */
 
18
#ifdef Z_PREFIX
 
19
#  define deflateInit_          z_deflateInit_
 
20
#  define deflate               z_deflate
 
21
#  define deflateEnd            z_deflateEnd
 
22
#  define inflateInit_          z_inflateInit_
 
23
#  define inflate               z_inflate
 
24
#  define inflateEnd            z_inflateEnd
 
25
#  define deflateInit2_         z_deflateInit2_
 
26
#  define deflateSetDictionary  z_deflateSetDictionary
 
27
#  define deflateCopy           z_deflateCopy
 
28
#  define deflateReset          z_deflateReset
 
29
#  define deflateParams         z_deflateParams
 
30
#  define deflateBound          z_deflateBound
 
31
#  define deflatePrime          z_deflatePrime
 
32
#  define inflateInit2_         z_inflateInit2_
 
33
#  define inflateSetDictionary  z_inflateSetDictionary
 
34
#  define inflateSync           z_inflateSync
 
35
#  define inflateSyncPoint      z_inflateSyncPoint
 
36
#  define inflateCopy           z_inflateCopy
 
37
#  define inflateReset          z_inflateReset
 
38
#  define inflateBack           z_inflateBack
 
39
#  define inflateBackEnd        z_inflateBackEnd
 
40
#  define compress              z_compress
 
41
#  define compress2             z_compress2
 
42
#  define compressBound         z_compressBound
 
43
#  define uncompress            z_uncompress
 
44
#  define adler32               z_adler32
 
45
#  define crc32                 z_crc32
 
46
#  define get_crc_table         z_get_crc_table
 
47
#  define zError                z_zError
 
48
 
 
49
#  define alloc_func            z_alloc_func
 
50
#  define free_func             z_free_func
 
51
#  define in_func               z_in_func
 
52
#  define out_func              z_out_func
 
53
#  define Byte                  z_Byte
 
54
#  define uInt                  z_uInt
 
55
#  define uLong                 z_uLong
 
56
#  define Bytef                 z_Bytef
 
57
#  define charf                 z_charf
 
58
#  define intf                  z_intf
 
59
#  define uIntf                 z_uIntf
 
60
#  define uLongf                z_uLongf
 
61
#  define voidpf                z_voidpf
 
62
#  define voidp                 z_voidp
 
63
#endif
 
64
 
 
65
#if defined(__MSDOS__) && !defined(MSDOS)
 
66
#  define MSDOS
 
67
#endif
 
68
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
 
69
#  define OS2
 
70
#endif
 
71
#if defined(_WINDOWS) && !defined(WINDOWS)
 
72
#  define WINDOWS
 
73
#endif
 
74
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
 
75
#  ifndef WIN32
 
76
#    define WIN32
 
77
#  endif
 
78
#endif
 
79
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
 
80
#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
 
81
#    ifndef SYS16BIT
 
82
#      define SYS16BIT
 
83
#    endif
 
84
#  endif
 
85
#endif
 
86
 
 
87
/*
 
88
 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
 
89
 * than 64k bytes at a time (needed on systems with 16-bit int).
 
90
 */
 
91
#ifdef SYS16BIT
 
92
#  define MAXSEG_64K
 
93
#endif
 
94
#ifdef MSDOS
 
95
#  define UNALIGNED_OK
 
96
#endif
 
97
 
 
98
#ifdef __STDC_VERSION__
 
99
#  ifndef STDC
 
100
#    define STDC
 
101
#  endif
 
102
#  if __STDC_VERSION__ >= 199901L
 
103
#    ifndef STDC99
 
104
#      define STDC99
 
105
#    endif
 
106
#  endif
 
107
#endif
 
108
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
 
109
#  define STDC
 
110
#endif
 
111
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
 
112
#  define STDC
 
113
#endif
 
114
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
 
115
#  define STDC
 
116
#endif
 
117
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
 
118
#  define STDC
 
119
#endif
 
120
 
 
121
#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
 
122
#  define STDC
 
123
#endif
 
124
 
 
125
#ifndef STDC
 
126
#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
 
127
#    define const       /* note: need a more gentle solution here */
 
128
#  endif
 
129
#endif
 
130
 
 
131
/* Some Mac compilers merge all .h files incorrectly: */
 
132
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
 
133
#  define NO_DUMMY_DECL
 
134
#endif
 
135
 
 
136
/* Maximum value for memLevel in deflateInit2 */
 
137
#ifndef MAX_MEM_LEVEL
 
138
#  ifdef MAXSEG_64K
 
139
#    define MAX_MEM_LEVEL 8
 
140
#  else
 
141
#    define MAX_MEM_LEVEL 9
 
142
#  endif
 
143
#endif
 
144
 
 
145
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
 
146
 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
 
147
 * created by gzip. (Files created by minigzip can still be extracted by
 
148
 * gzip.)
 
149
 */
 
150
#ifndef MAX_WBITS
 
151
#  define MAX_WBITS   15 /* 32K LZ77 window */
 
152
#endif
 
153
 
 
154
/* The memory requirements for deflate are (in bytes):
 
155
            (1 << (windowBits+2)) +  (1 << (memLevel+9))
 
156
 that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
 
157
 plus a few kilobytes for small objects. For example, if you want to reduce
 
158
 the default memory requirements from 256K to 128K, compile with
 
159
     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
 
160
 Of course this will generally degrade compression (there's no free lunch).
 
161
 
 
162
   The memory requirements for inflate are (in bytes) 1 << windowBits
 
163
 that is, 32K for windowBits=15 (default value) plus a few kilobytes
 
164
 for small objects.
 
165
*/
 
166
 
 
167
                        /* Type declarations */
 
168
 
 
169
#ifndef OF /* function prototypes */
 
170
#  ifdef STDC
 
171
#    define OF(args)  args
 
172
#  else
 
173
#    define OF(args)  ()
 
174
#  endif
 
175
#endif
 
176
 
 
177
/* The following definitions for FAR are needed only for MSDOS mixed
 
178
 * model programming (small or medium model with some far allocations).
 
179
 * This was tested only with MSC; for other MSDOS compilers you may have
 
180
 * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
 
181
 * just define FAR to be empty.
 
182
 */
 
183
#ifdef SYS16BIT
 
184
#  if defined(M_I86SM) || defined(M_I86MM)
 
185
     /* MSC small or medium model */
 
186
#    define SMALL_MEDIUM
 
187
#    ifdef _MSC_VER
 
188
#      define FAR _far
 
189
#    else
 
190
#      define FAR far
 
191
#    endif
 
192
#  endif
 
193
#  if (defined(__SMALL__) || defined(__MEDIUM__))
 
194
     /* Turbo C small or medium model */
 
195
#    define SMALL_MEDIUM
 
196
#    ifdef __BORLANDC__
 
197
#      define FAR _far
 
198
#    else
 
199
#      define FAR far
 
200
#    endif
 
201
#  endif
 
202
#endif
 
203
 
 
204
#if defined(WINDOWS) || defined(WIN32)
 
205
   /* If building or using zlib as a DLL, define ZLIB_DLL.
 
206
    * This is not mandatory, but it offers a little performance increase.
 
207
    */
 
208
#  ifdef ZLIB_DLL
 
209
#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
 
210
#      ifdef ZLIB_INTERNAL
 
211
#        define ZEXTERN extern __declspec(dllexport)
 
212
#      else
 
213
#        define ZEXTERN extern __declspec(dllimport)
 
214
#      endif
 
215
#    endif
 
216
#  endif  /* ZLIB_DLL */
 
217
   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
 
218
    * define ZLIB_WINAPI.
 
219
    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
 
220
    */
 
221
#  ifdef ZLIB_WINAPI
 
222
#    ifdef FAR
 
223
#      undef FAR
 
224
#    endif
 
225
#    include <windows.h>
 
226
     /* No need for _export, use ZLIB.DEF instead. */
 
227
     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
 
228
#    define ZEXPORT WINAPI
 
229
#    ifdef WIN32
 
230
#      define ZEXPORTVA WINAPIV
 
231
#    else
 
232
#      define ZEXPORTVA FAR CDECL
 
233
#    endif
 
234
#  endif
 
235
#endif
 
236
 
 
237
#if defined (__BEOS__)
 
238
#  ifdef ZLIB_DLL
 
239
#    ifdef ZLIB_INTERNAL
 
240
#      define ZEXPORT   __declspec(dllexport)
 
241
#      define ZEXPORTVA __declspec(dllexport)
 
242
#    else
 
243
#      define ZEXPORT   __declspec(dllimport)
 
244
#      define ZEXPORTVA __declspec(dllimport)
 
245
#    endif
 
246
#  endif
 
247
#endif
 
248
 
 
249
#ifndef ZEXTERN
 
250
#  define ZEXTERN extern
 
251
#endif
 
252
#ifndef ZEXPORT
 
253
#  define ZEXPORT
 
254
#endif
 
255
#ifndef ZEXPORTVA
 
256
#  define ZEXPORTVA
 
257
#endif
 
258
 
 
259
#ifndef FAR
 
260
#  define FAR
 
261
#endif
 
262
 
 
263
#if !defined(__MACTYPES__)
 
264
typedef unsigned char  Byte;  /* 8 bits */
 
265
#endif
 
266
typedef unsigned int   uInt;  /* 16 bits or more */
 
267
typedef unsigned long  uLong; /* 32 bits or more */
 
268
 
 
269
#ifdef SMALL_MEDIUM
 
270
   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
 
271
#  define Bytef Byte FAR
 
272
#else
 
273
   typedef Byte  FAR Bytef;
 
274
#endif
 
275
typedef char  FAR charf;
 
276
typedef int   FAR intf;
 
277
typedef uInt  FAR uIntf;
 
278
typedef uLong FAR uLongf;
 
279
 
 
280
#ifdef STDC
 
281
   typedef void const *voidpc;
 
282
   typedef void FAR   *voidpf;
 
283
   typedef void       *voidp;
 
284
#else
 
285
   typedef Byte const *voidpc;
 
286
   typedef Byte FAR   *voidpf;
 
287
   typedef Byte       *voidp;
 
288
#endif
 
289
 
 
290
#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
 
291
#  include <sys/types.h> /* for off_t */
 
292
#  include <unistd.h>    /* for SEEK_* and off_t */
 
293
#  ifdef VMS
 
294
#    include <unixio.h>   /* for off_t */
 
295
#  endif
 
296
#  define z_off_t off_t
 
297
#endif
 
298
#ifndef SEEK_SET
 
299
#  define SEEK_SET        0       /* Seek from beginning of file.  */
 
300
#  define SEEK_CUR        1       /* Seek from current position.  */
 
301
#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
 
302
#endif
 
303
#ifndef z_off_t
 
304
#  define z_off_t long
 
305
#endif
 
306
 
 
307
#if defined(__OS400__)
 
308
#  define NO_vsnprintf
 
309
#endif
 
310
 
 
311
#if defined(__MVS__)
 
312
#  define NO_vsnprintf
 
313
#  ifdef FAR
 
314
#    undef FAR
 
315
#  endif
 
316
#endif
 
317
 
 
318
/* MVS linker does not support external names larger than 8 bytes */
 
319
#if defined(__MVS__)
 
320
#   pragma map(deflateInit_,"DEIN")
 
321
#   pragma map(deflateInit2_,"DEIN2")
 
322
#   pragma map(deflateEnd,"DEEND")
 
323
#   pragma map(deflateBound,"DEBND")
 
324
#   pragma map(inflateInit_,"ININ")
 
325
#   pragma map(inflateInit2_,"ININ2")
 
326
#   pragma map(inflateEnd,"INEND")
 
327
#   pragma map(inflateSync,"INSY")
 
328
#   pragma map(inflateSetDictionary,"INSEDI")
 
329
#   pragma map(compressBound,"CMBND")
 
330
#   pragma map(inflate_table,"INTABL")
 
331
#   pragma map(inflate_fast,"INFA")
 
332
#   pragma map(inflate_copyright,"INCOPY")
 
333
#endif
 
334
 
 
335
#endif /* ZCONF_H */