source: rtems/cpukit/zlib/zconf.h @ 59efee34

4.104.115
Last change on this file since 59efee34 was 1cb54d1f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/11/08 at 00:47:56

#include <stdint.h> instead of <rtems/stdint.h>.

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