Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / include / zconf.h @ 2486

History | View | Annotate | Download (12.4 kB)

1
/* zconf.h -- configuration of the zlib compression library
2
 * Copyright (C) 1995-2013 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
#ifdef HAVE_CONFIG_H
12
#include <config.h>
13
#endif
14

    
15
/* R change */
16
#ifndef WIN32
17
#define Z_PREFIX
18
#endif
19
/*
20
 * If you *really* need a unique prefix for all types and library functions,
21
 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
22
 * Even better than compiling with -DZ_PREFIX would be to use configure to set
23
 * this permanently in zconf.h using "./configure --zprefix".
24
 */
25
#ifdef Z_PREFIX
26
#  define deflateInit_          Rz_deflateInit_
27
#  define deflate               Rz_deflate
28
#  define deflateEnd            Rz_deflateEnd
29
#  define inflateInit_          Rz_inflateInit_
30
#  define inflate               Rz_inflate
31
#  define inflateEnd            Rz_inflateEnd
32
#  define deflateInit2_         Rz_deflateInit2_
33
#  define deflateSetDictionary  Rz_deflateSetDictionary
34
#  define deflateCopy           Rz_deflateCopy
35
#  define deflateReset          Rz_deflateReset
36
#  define deflateParams         Rz_deflateParams
37
#  define deflateBound          Rz_deflateBound
38
#  define deflatePrime          Rz_deflatePrime
39
#  define inflateInit2_         Rz_inflateInit2_
40
#  define inflateSetDictionary  Rz_inflateSetDictionary
41
#  define inflateSync           Rz_inflateSync
42
#  define inflateSyncPoint      Rz_inflateSyncPoint
43
#  define inflateCopy           Rz_inflateCopy
44
#  define inflateReset          Rz_inflateReset
45
#  define inflateBack           Rz_inflateBack
46
#  define inflateBackEnd        Rz_inflateBackEnd
47
#  define compress              Rz_compress
48
#  define compress2             Rz_compress2
49
#  define compressBound         Rz_compressBound
50
#  define uncompress            Rz_uncompress
51
#  define adler32               Rz_adler32
52
#  define crc32                 Rz_crc32
53
#  define get_crc_table         Rz_get_crc_table
54
#  define zError                Rz_zError
55

    
56
#  define alloc_func            Rz_alloc_func
57
#  define free_func             Rz_free_func
58
#  define in_func               Rz_in_func
59
#  define out_func              Rz_out_func
60

    
61
# define adler32_combine               Rz_adler32_combine
62
# define adler32_combine64      Rz_adler32_combine64
63
# define crc32_combine                Rz_crc32_combine
64
# define crc32_combine64        Rz_crc32_combine64
65
# define deflateSetHeader              Rz_deflateSetHeader
66
# define deflateTune                Rz_deflateTune
67
# define inflateBackInit_              Rz_inflateBackInit_
68
# define inflate_fast                Rz_inflate_fast
69
# define inflateGetHeader              Rz_inflateGetHeader
70
# define inflatePrime                Rz_inflatePrime
71
# define inflate_table                Rz_inflate_table
72
# define inflateMark                Rz_inflateMark
73
# define inflateReset2                Rz_inflateReset2
74
# define inflateUndermine        Rz_inflateUndermine
75
# define _tr_align                Rz__tr_align
76
# define _tr_flush_block               Rz__tr_flush_block
77
# define _tr_init                Rz__tr_init
78
# define _tr_stored_block              Rz__tr_stored_block
79
# define _tr_tally                Rz__tr_tally
80
# define zcalloc                Rz_zcalloc
81
# define zcfree                        Rz_zcfree
82
# define zlibCompileFlags              Rz_zlibCompileFlags
83
# define zlibVersion                Rz_zlibVersion
84
# define _dist_code                Rz_dist_code
85
# define _length_code                Rz_length_code
86
# define z_errmsg                Rz_errmsg
87
# define deflate_copyright        Rz_deflate_copyright 
88
# define inflate_copyright        Rz_inflate_copyright 
89
#endif
90

    
91
#if defined(__MSDOS__) && !defined(MSDOS)
92
#  define MSDOS
93
#endif
94
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
95
#  define OS2
96
#endif
97
#if defined(_WINDOWS) && !defined(WINDOWS)
98
#  define WINDOWS
99
#endif
100
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
101
#  ifndef WIN32
102
#    define WIN32
103
#  endif
104
#endif
105
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
106
#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
107
#    ifndef SYS16BIT
108
#      define SYS16BIT
109
#    endif
110
#  endif
111
#endif
112

    
113
/*
114
 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
115
 * than 64k bytes at a time (needed on systems with 16-bit int).
116
 */
117
#ifdef SYS16BIT
118
#  define MAXSEG_64K
119
#endif
120
#ifdef MSDOS
121
#  define UNALIGNED_OK
122
#endif
123

    
124
#ifdef __STDC_VERSION__
125
#  ifndef STDC
126
#    define STDC
127
#  endif
128
#  if __STDC_VERSION__ >= 199901L
129
#    ifndef STDC99
130
#      define STDC99
131
#    endif
132
#  endif
133
#endif
134
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
135
#  define STDC
136
#endif
137
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
138
#  define STDC
139
#endif
140
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
141
#  define STDC
142
#endif
143
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
144
#  define STDC
145
#endif
146

    
147
#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
148
#  define STDC
149
#endif
150

    
151
#ifndef STDC
152
#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
153
#    define const       /* note: need a more gentle solution here */
154
#  endif
155
#endif
156

    
157
#if defined(ZLIB_CONST) && !defined(z_const)
158
#  define z_const const
159
#else
160
#  define z_const
161
#endif
162

    
163
/* Some Mac compilers merge all .h files incorrectly: */
164
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
165
#  define NO_DUMMY_DECL
166
#endif
167

    
168
/* Maximum value for memLevel in deflateInit2 */
169
#ifndef MAX_MEM_LEVEL
170
#  ifdef MAXSEG_64K
171
#    define MAX_MEM_LEVEL 8
172
#  else
173
#    define MAX_MEM_LEVEL 9
174
#  endif
175
#endif
176

    
177
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
178
 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
179
 * created by gzip. (Files created by minigzip can still be extracted by
180
 * gzip.)
181
 */
182
#ifndef MAX_WBITS
183
#  define MAX_WBITS   15 /* 32K LZ77 window */
184
#endif
185

    
186
/* The memory requirements for deflate are (in bytes):
187
            (1 << (windowBits+2)) +  (1 << (memLevel+9))
188
 that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
189
 plus a few kilobytes for small objects. For example, if you want to reduce
190
 the default memory requirements from 256K to 128K, compile with
191
     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
192
 Of course this will generally degrade compression (there's no free lunch).
193

194
   The memory requirements for inflate are (in bytes) 1 << windowBits
195
 that is, 32K for windowBits=15 (default value) plus a few kilobytes
196
 for small objects.
197
*/
198

    
199
                        /* Type declarations */
200

    
201
#ifndef OF /* function prototypes */
202
#  ifdef STDC
203
#    define OF(args)  args
204
#  else
205
#    define OF(args)  ()
206
#  endif
207
#endif
208

    
209
#ifndef Z_ARG /* function prototypes for stdarg */
210
#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
211
#    define Z_ARG(args)  args
212
#  else
213
#    define Z_ARG(args)  ()
214
#  endif
215
#endif
216

    
217
/* The following definitions for FAR are needed only for MSDOS mixed
218
 * model programming (small or medium model with some far allocations).
219
 * This was tested only with MSC; for other MSDOS compilers you may have
220
 * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
221
 * just define FAR to be empty.
222
 */
223
#ifdef SYS16BIT
224
#  if defined(M_I86SM) || defined(M_I86MM)
225
     /* MSC small or medium model */
226
#    define SMALL_MEDIUM
227
#    ifdef _MSC_VER
228
#      define FAR _far
229
#    else
230
#      define FAR far
231
#    endif
232
#  endif
233
#  if (defined(__SMALL__) || defined(__MEDIUM__))
234
     /* Turbo C small or medium model */
235
#    define SMALL_MEDIUM
236
#    ifdef __BORLANDC__
237
#      define FAR _far
238
#    else
239
#      define FAR far
240
#    endif
241
#  endif
242
#endif
243

    
244
#if defined(WINDOWS) || defined(WIN32)
245
   /* If building or using zlib as a DLL, define ZLIB_DLL.
246
    * This is not mandatory, but it offers a little performance increase.
247
    */
248
#  ifdef ZLIB_DLL
249
#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
250
#      ifdef ZLIB_INTERNAL
251
#        define ZEXTERN extern __declspec(dllexport)
252
#      else
253
#        define ZEXTERN extern __declspec(dllimport)
254
#      endif
255
#    endif
256
#  endif  /* ZLIB_DLL */
257
   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
258
    * define ZLIB_WINAPI.
259
    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
260
    */
261
#  ifdef ZLIB_WINAPI
262
#    ifdef FAR
263
#      undef FAR
264
#    endif
265
#    include <windows.h>
266
     /* No need for _export, use ZLIB.DEF instead. */
267
     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
268
#    define ZEXPORT WINAPI
269
#    ifdef WIN32
270
#      define ZEXPORTVA WINAPIV
271
#    else
272
#      define ZEXPORTVA FAR CDECL
273
#    endif
274
#  endif
275
#endif
276

    
277
#if defined (__BEOS__)
278
#  ifdef ZLIB_DLL
279
#    ifdef ZLIB_INTERNAL
280
#      define ZEXPORT   __declspec(dllexport)
281
#      define ZEXPORTVA __declspec(dllexport)
282
#    else
283
#      define ZEXPORT   __declspec(dllimport)
284
#      define ZEXPORTVA __declspec(dllimport)
285
#    endif
286
#  endif
287
#endif
288

    
289
#ifndef ZEXTERN
290
#  define ZEXTERN extern
291
#endif
292
#ifndef ZEXPORT
293
#  define ZEXPORT
294
#endif
295
#ifndef ZEXPORTVA
296
#  define ZEXPORTVA
297
#endif
298

    
299
#ifndef FAR
300
#  define FAR
301
#endif
302

    
303
#if !defined(__MACTYPES__)
304
typedef unsigned char  Byte;  /* 8 bits */
305
#endif
306
typedef unsigned int   uInt;  /* 16 bits or more */
307
typedef unsigned long  uLong; /* 32 bits or more */
308

    
309
#ifdef SMALL_MEDIUM
310
   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
311
#  define Bytef Byte FAR
312
#else
313
   typedef Byte  FAR Bytef;
314
#endif
315
typedef char  FAR charf;
316
typedef int   FAR intf;
317
typedef uInt  FAR uIntf;
318
typedef uLong FAR uLongf;
319

    
320
#ifdef STDC
321
   typedef void const *voidpc;
322
   typedef void FAR   *voidpf;
323
   typedef void       *voidp;
324
#else
325
   typedef Byte const *voidpc;
326
   typedef Byte FAR   *voidpf;
327
   typedef Byte       *voidp;
328
#endif
329

    
330
/* ./configure may #define Z_U4 here */
331

    
332
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
333
#  include <limits.h>
334
#  if (UINT_MAX == 0xffffffffUL)
335
#    define Z_U4 unsigned
336
#  elif (ULONG_MAX == 0xffffffffUL)
337
#    define Z_U4 unsigned long
338
#  elif (USHRT_MAX == 0xffffffffUL)
339
#    define Z_U4 unsigned short
340
#  endif
341
#endif
342

    
343
#ifdef Z_U4
344
   typedef Z_U4 z_crc_t;
345
#else
346
   typedef unsigned long z_crc_t;
347
#endif
348

    
349
#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
350
#  define Z_HAVE_UNISTD_H
351
#endif
352

    
353
#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
354
#  define Z_HAVE_STDARG_H
355
#endif
356

    
357
#ifdef STDC
358
#  ifndef Z_SOLO
359
#    include <sys/types.h>      /* for off_t */
360
#  endif
361
#endif
362

    
363
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
364
#  ifndef Z_SOLO
365
#    include <stdarg.h>         /* for va_list */
366
#  endif
367
#endif
368

    
369
#ifdef _WIN32
370
#  include <stddef.h>           /* for wchar_t */
371
#endif
372

    
373
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
374
 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
375
 * though the former does not conform to the LFS document), but considering
376
 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
377
 * equivalently requesting no 64-bit operations
378
 */
379
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
380
#  undef _LARGEFILE64_SOURCE
381
#endif
382

    
383
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
384
#  define Z_HAVE_UNISTD_H
385
#endif
386
#ifndef Z_SOLO
387
#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
388
#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
389
#    ifdef VMS
390
#      include <unixio.h>       /* for off_t */
391
#    endif
392
#    ifndef z_off_t
393
#      define z_off_t off_t
394
#    endif
395
#  endif
396
#endif
397

    
398
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
399
#  define Z_LFS64
400
#endif
401

    
402
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
403
#  define Z_LARGE64
404
#endif
405

    
406
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
407
#  define Z_WANT64
408
#endif
409

    
410
#if !defined(SEEK_SET) && !defined(Z_SOLO)
411
#  define SEEK_SET        0       /* Seek from beginning of file.  */
412
#  define SEEK_CUR        1       /* Seek from current position.  */
413
#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
414
#endif
415

    
416
#ifndef z_off_t
417
#  define z_off_t long
418
#endif
419

    
420
#if !defined(_WIN32) && defined(Z_LARGE64)
421
#  define z_off64_t off64_t
422
#else
423
#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
424
#    define z_off64_t __int64
425
#  else
426
#    define z_off64_t z_off_t
427
#  endif
428
#endif
429

    
430
/* MVS linker does not support external names larger than 8 bytes */
431
#if defined(__MVS__)
432
  #pragma map(deflateInit_,"DEIN")
433
  #pragma map(deflateInit2_,"DEIN2")
434
  #pragma map(deflateEnd,"DEEND")
435
  #pragma map(deflateBound,"DEBND")
436
  #pragma map(inflateInit_,"ININ")
437
  #pragma map(inflateInit2_,"ININ2")
438
  #pragma map(inflateEnd,"INEND")
439
  #pragma map(inflateSync,"INSY")
440
  #pragma map(inflateSetDictionary,"INSEDI")
441
  #pragma map(compressBound,"CMBND")
442
  #pragma map(inflate_table,"INTABL")
443
  #pragma map(inflate_fast,"INFA")
444
  #pragma map(inflate_copyright,"INCOPY")
445
#endif
446

    
447
#endif /* ZCONF_H */