source: svn/trunk/newcon3bcm2_21bu/dta/src/z/zconf.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

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