170c83c0peter/* zconf.h -- configuration of the zlib compression library
2abe96eddelphij * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
32368747tjr * For conditions of distribution and use, see copyright notice in zlib.h
470c83c0peter */
570c83c0peter
676f0c92peter/* @(#) $FreeBSD$ */
770c83c0peter
82368747tjr#ifndef ZCONF_H
92368747tjr#define ZCONF_H
1070c83c0peter
1103ea53cdelphij#ifdef __FreeBSD__
1203ea53cdelphij#ifdef _KERNEL
1303ea53cdelphij#define Z_SOLO
1403ea53cdelphij#endif
1503ea53cdelphij#endif
1603ea53cdelphij
1770c83c0peter/*
1870c83c0peter * If you *really* need a unique prefix for all types and library functions,
1970c83c0peter * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
20354ebf4delphij * Even better than compiling with -DZ_PREFIX would be to use configure to set
21354ebf4delphij * this permanently in zconf.h using "./configure --zprefix".
2270c83c0peter */
23354ebf4delphij#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
24abe1867delphij#  define Z_PREFIX_SET
25354ebf4delphij
26abe96eddelphij/* all linked symbols and init macros */
27354ebf4delphij#  define _dist_code            z__dist_code
28354ebf4delphij#  define _length_code          z__length_code
29354ebf4delphij#  define _tr_align             z__tr_align
303aa8c3cdelphij#  define _tr_flush_bits        z__tr_flush_bits
31354ebf4delphij#  define _tr_flush_block       z__tr_flush_block
32354ebf4delphij#  define _tr_init              z__tr_init
33354ebf4delphij#  define _tr_stored_block      z__tr_stored_block
34354ebf4delphij#  define _tr_tally             z__tr_tally
35354ebf4delphij#  define adler32               z_adler32
36354ebf4delphij#  define adler32_combine       z_adler32_combine
37354ebf4delphij#  define adler32_combine64     z_adler32_combine64
38abe96eddelphij#  define adler32_z             z_adler32_z
3903ea53cdelphij#  if !defined(Z_SOLO) && !defined(_KERNEL)
40abe1867delphij#    define compress              z_compress
41abe1867delphij#    define compress2             z_compress2
42abe1867delphij#    define compressBound         z_compressBound
43abe1867delphij#  endif
44354ebf4delphij#  define crc32                 z_crc32
45354ebf4delphij#  define crc32_combine         z_crc32_combine
46354ebf4delphij#  define crc32_combine64       z_crc32_combine64
47abe96eddelphij#  define crc32_z               z_crc32_z
483747e27kientzle#  define deflate               z_deflate
49354ebf4delphij#  define deflateBound          z_deflateBound
50354ebf4delphij#  define deflateCopy           z_deflateCopy
513747e27kientzle#  define deflateEnd            z_deflateEnd
52abe96eddelphij#  define deflateGetDictionary  z_deflateGetDictionary
53abe96eddelphij#  define deflateInit           z_deflateInit
54abe96eddelphij#  define deflateInit2          z_deflateInit2
553747e27kientzle#  define deflateInit2_         z_deflateInit2_
56354ebf4delphij#  define deflateInit_          z_deflateInit_
573747e27kientzle#  define deflateParams         z_deflateParams
58abe1867delphij#  define deflatePending        z_deflatePending
593747e27kientzle#  define deflatePrime          z_deflatePrime
60354ebf4delphij#  define deflateReset          z_deflateReset
61abe1867delphij#  define deflateResetKeep      z_deflateResetKeep
62354ebf4delphij#  define deflateSetDictionary  z_deflateSetDictionary
63354ebf4delphij#  define deflateSetHeader      z_deflateSetHeader
64354ebf4delphij#  define deflateTune           z_deflateTune
65354ebf4delphij#  define deflate_copyright     z_deflate_copyright
66354ebf4delphij#  define get_crc_table         z_get_crc_table
67abe1867delphij#  ifndef Z_SOLO
68abe1867delphij#    define gz_error              z_gz_error
69abe1867delphij#    define gz_intmax             z_gz_intmax
70abe1867delphij#    define gz_strwinerror        z_gz_strwinerror
71abe1867delphij#    define gzbuffer              z_gzbuffer
72abe1867delphij#    define gzclearerr            z_gzclearerr
73abe1867delphij#    define gzclose               z_gzclose
74abe1867delphij#    define gzclose_r             z_gzclose_r
75abe1867delphij#    define gzclose_w             z_gzclose_w
76abe1867delphij#    define gzdirect              z_gzdirect
77abe1867delphij#    define gzdopen               z_gzdopen
78abe1867delphij#    define gzeof                 z_gzeof
79abe1867delphij#    define gzerror               z_gzerror
80abe1867delphij#    define gzflush               z_gzflush
81abe96eddelphij#    define gzfread               z_gzfread
82abe96eddelphij#    define gzfwrite              z_gzfwrite
83abe1867delphij#    define gzgetc                z_gzgetc
84abe1867delphij#    define gzgetc_               z_gzgetc_
85abe1867delphij#    define gzgets                z_gzgets
86abe1867delphij#    define gzoffset              z_gzoffset
87abe1867delphij#    define gzoffset64            z_gzoffset64
88abe1867delphij#    define gzopen                z_gzopen
89abe1867delphij#    define gzopen64              z_gzopen64
905ecec51delphij#    ifdef _WIN32
915ecec51delphij#      define gzopen_w              z_gzopen_w
925ecec51delphij#    endif
93abe1867delphij#    define gzprintf              z_gzprintf
94abe1867delphij#    define gzputc                z_gzputc
95abe1867delphij#    define gzputs                z_gzputs
96abe1867delphij#    define gzread                z_gzread
97abe1867delphij#    define gzrewind              z_gzrewind
98abe1867delphij#    define gzseek                z_gzseek
99abe1867delphij#    define gzseek64              z_gzseek64
100abe1867delphij#    define gzsetparams           z_gzsetparams
101abe1867delphij#    define gztell                z_gztell
102abe1867delphij#    define gztell64              z_gztell64
103abe1867delphij#    define gzungetc              z_gzungetc
104abe96eddelphij#    define gzvprintf             z_gzvprintf
105abe1867delphij#    define gzwrite               z_gzwrite
106abe1867delphij#  endif
107354ebf4delphij#  define inflate               z_inflate
108354ebf4delphij#  define inflateBack           z_inflateBack
109354ebf4delphij#  define inflateBackEnd        z_inflateBackEnd
110abe96eddelphij#  define inflateBackInit       z_inflateBackInit
111354ebf4delphij#  define inflateBackInit_      z_inflateBackInit_
112abe96eddelphij#  define inflateCodesUsed      z_inflateCodesUsed
113354ebf4delphij#  define inflateCopy           z_inflateCopy
114354ebf4delphij#  define inflateEnd            z_inflateEnd
115abe96eddelphij#  define inflateGetDictionary  z_inflateGetDictionary
116354ebf4delphij#  define inflateGetHeader      z_inflateGetHeader
117abe96eddelphij#  define inflateInit           z_inflateInit
118abe96eddelphij#  define inflateInit2          z_inflateInit2
1193747e27kientzle#  define inflateInit2_         z_inflateInit2_
120354ebf4delphij#  define inflateInit_          z_inflateInit_
121354ebf4delphij#  define inflateMark           z_inflateMark
122354ebf4delphij#  define inflatePrime          z_inflatePrime
123354ebf4delphij#  define inflateReset          z_inflateReset
124354ebf4delphij#  define inflateReset2         z_inflateReset2
125abe96eddelphij#  define inflateResetKeep      z_inflateResetKeep
1263747e27kientzle#  define inflateSetDictionary  z_inflateSetDictionary
1273747e27kientzle#  define inflateSync           z_inflateSync
1283747e27kientzle#  define inflateSyncPoint      z_inflateSyncPoint
129354ebf4delphij#  define inflateUndermine      z_inflateUndermine
130abe96eddelphij#  define inflateValidate       z_inflateValidate
131354ebf4delphij#  define inflate_copyright     z_inflate_copyright
132354ebf4delphij#  define inflate_fast          z_inflate_fast
133354ebf4delphij#  define inflate_table         z_inflate_table
13403ea53cdelphij#  if !defined(Z_SOLO) && !defined(_KERNEL)
135abe1867delphij#    define uncompress            z_uncompress
136abe96eddelphij#    define uncompress2           z_uncompress2
137abe1867delphij#  endif
1383747e27kientzle#  define zError                z_zError
13903ea53cdelphij#  if !defined(Z_SOLO) && !defined(_KERNEL)
140abe1867delphij#    define zcalloc               z_zcalloc
141abe1867delphij#    define zcfree                z_zcfree
142abe1867delphij#  endif
143354ebf4delphij#  define zlibCompileFlags      z_zlibCompileFlags
144354ebf4delphij#  define zlibVersion           z_zlibVersion
14570c83c0peter
146354ebf4delphij/* all zlib typedefs in zlib.h and zconf.h */
147354ebf4delphij#  define Byte                  z_Byte
148354ebf4delphij#  define Bytef                 z_Bytef
149ec17f77des#  define alloc_func            z_alloc_func
150354ebf4delphij#  define charf                 z_charf
151ec17f77des#  define free_func             z_free_func
152abe1867delphij#  ifndef Z_SOLO
153abe1867delphij#    define gzFile                z_gzFile
154abe1867delphij#  endif
155354ebf4delphij#  define gz_header             z_gz_header
156354ebf4delphij#  define gz_headerp            z_gz_headerp
157ec17f77des#  define in_func               z_in_func
158354ebf4delphij#  define intf                  z_intf
159ec17f77des#  define out_func              z_out_func
1603747e27kientzle#  define uInt                  z_uInt
1613747e27kientzle#  define uIntf                 z_uIntf
162354ebf4delphij#  define uLong                 z_uLong
1633747e27kientzle#  define uLongf                z_uLongf
1643747e27kientzle#  define voidp                 z_voidp
165354ebf4delphij#  define voidpc                z_voidpc
166354ebf4delphij#  define voidpf                z_voidpf
167354ebf4delphij
168354ebf4delphij/* all zlib structs in zlib.h and zconf.h */
169354ebf4delphij#  define gz_header_s           z_gz_header_s
170354ebf4delphij#  define internal_state        z_internal_state
171354ebf4delphij
17270c83c0peter#endif
17370c83c0peter
1742368747tjr#if defined(__MSDOS__) && !defined(MSDOS)
1752368747tjr#  define MSDOS
1762368747tjr#endif
1772368747tjr#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
1782368747tjr#  define OS2
1792368747tjr#endif
1802368747tjr#if defined(_WINDOWS) && !defined(WINDOWS)
1812368747tjr#  define WINDOWS
1822368747tjr#endif
183ec17f77des#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
184ec17f77des#  ifndef WIN32
185ec17f77des#    define WIN32
186ec17f77des#  endif
18770c83c0peter#endif
1882368747tjr#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
1892368747tjr#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
1902368747tjr#    ifndef SYS16BIT
1912368747tjr#      define SYS16BIT
1922368747tjr#    endif
19370c83c0peter#  endif
19470c83c0peter#endif
19570c83c0peter
19670c83c0peter/*
19770c83c0peter * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
19870c83c0peter * than 64k bytes at a time (needed on systems with 16-bit int).
19970c83c0peter */
2002368747tjr#ifdef SYS16BIT
20170c83c0peter#  define MAXSEG_64K
20270c83c0peter#endif
20370c83c0peter#ifdef MSDOS
20470c83c0peter#  define UNALIGNED_OK
20570c83c0peter#endif
20670c83c0peter
2072368747tjr#ifdef __STDC_VERSION__
208237ff31steve#  ifndef STDC
209237ff31steve#    define STDC
210237ff31steve#  endif
2112368747tjr#  if __STDC_VERSION__ >= 199901L
2122368747tjr#    ifndef STDC99
2132368747tjr#      define STDC99
2142368747tjr#    endif
2152368747tjr#  endif
2162368747tjr#endif
2172368747tjr#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
2182368747tjr#  define STDC
2192368747tjr#endif
2202368747tjr#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
2212368747tjr#  define STDC
2222368747tjr#endif
2232368747tjr#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
2242368747tjr#  define STDC
2252368747tjr#endif
2262368747tjr#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
2272368747tjr#  define STDC
2282368747tjr#endif
2292368747tjr
2302368747tjr#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
2312368747tjr#  define STDC
23270c83c0peter#endif
23370c83c0peter
23470c83c0peter#ifndef STDC
23570c83c0peter#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
2362368747tjr#    define const       /* note: need a more gentle solution here */
23770c83c0peter#  endif
23870c83c0peter#endif
23970c83c0peter
240abe1867delphij#if defined(ZLIB_CONST) && !defined(z_const)
241abe1867delphij#  define z_const const
242abe1867delphij#else
243abe1867delphij#  define z_const
244abe1867delphij#endif
245abe1867delphij
246abe96eddelphij#ifdef Z_SOLO
247abe96eddelphij   typedef unsigned long z_size_t;
248abe96eddelphij#else
249abe96eddelphij#  define z_longlong long long
250abe96eddelphij#  if defined(NO_SIZE_T)
251abe96eddelphij     typedef unsigned NO_SIZE_T z_size_t;
252abe96eddelphij#  elif defined(STDC)
253abe96eddelphij#    include <stddef.h>
254abe96eddelphij     typedef size_t z_size_t;
255abe96eddelphij#  else
256abe96eddelphij     typedef unsigned long z_size_t;
257abe96eddelphij#  endif
258abe96eddelphij#  undef z_longlong
25970c83c0peter#endif
26070c83c0peter
26170c83c0peter/* Maximum value for memLevel in deflateInit2 */
26270c83c0peter#ifndef MAX_MEM_LEVEL
26370c83c0peter#  ifdef MAXSEG_64K
26470c83c0peter#    define MAX_MEM_LEVEL 8
26570c83c0peter#  else
26670c83c0peter#    define MAX_MEM_LEVEL 9
26770c83c0peter#  endif
26870c83c0peter#endif
26970c83c0peter
270237ff31steve/* Maximum value for windowBits in deflateInit2 and inflateInit2.
271237ff31steve * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
272237ff31steve * created by gzip. (Files created by minigzip can still be extracted by
273237ff31steve * gzip.)
274237ff31steve */
27570c83c0peter#ifndef MAX_WBITS
27670c83c0peter#  define MAX_WBITS   15 /* 32K LZ77 window */
27770c83c0peter#endif
27870c83c0peter
27970c83c0peter/* The memory requirements for deflate are (in bytes):
280237ff31steve            (1 << (windowBits+2)) +  (1 << (memLevel+9))
28170c83c0peter that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
28270c83c0peter plus a few kilobytes for small objects. For example, if you want to reduce
28370c83c0peter the default memory requirements from 256K to 128K, compile with
28470c83c0peter     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
28570c83c0peter Of course this will generally degrade compression (there's no free lunch).
28670c83c0peter
28770c83c0peter   The memory requirements for inflate are (in bytes) 1 << windowBits
288abe96eddelphij that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
28970c83c0peter for small objects.
29070c83c0peter*/
29170c83c0peter
29270c83c0peter                        /* Type declarations */
29370c83c0peter
29470c83c0peter#ifndef OF /* function prototypes */
29570c83c0peter#  ifdef STDC
29670c83c0peter#    define OF(args)  args
29770c83c0peter#  else
29870c83c0peter#    define OF(args)  ()
29970c83c0peter#  endif
30070c83c0peter#endif
30170c83c0peter
302abe1867delphij#ifndef Z_ARG /* function prototypes for stdarg */
303abe1867delphij#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
304abe1867delphij#    define Z_ARG(args)  args
305abe1867delphij#  else
306abe1867delphij#    define Z_ARG(args)  ()
307abe1867delphij#  endif
308abe1867delphij#endif
309abe1867delphij
31070c83c0peter/* The following definitions for FAR are needed only for MSDOS mixed
31170c83c0peter * model programming (small or medium model with some far allocations).
31270c83c0peter * This was tested only with MSC; for other MSDOS compilers you may have
31370c83c0peter * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
31470c83c0peter * just define FAR to be empty.
31570c83c0peter */
3162368747tjr#ifdef SYS16BIT
3172368747tjr#  if defined(M_I86SM) || defined(M_I86MM)
3182368747tjr     /* MSC small or medium model */
3192368747tjr#    define SMALL_MEDIUM
3202368747tjr#    ifdef _MSC_VER
3212368747tjr#      define FAR _far
3222368747tjr#    else
3232368747tjr#      define FAR far
3242368747tjr#    endif
32570c83c0peter#  endif
3262368747tjr#  if (defined(__SMALL__) || defined(__MEDIUM__))
3272368747tjr     /* Turbo C small or medium model */
32870c83c0peter#    define SMALL_MEDIUM
3292368747tjr#    ifdef __BORLANDC__
3302368747tjr#      define FAR _far
3312368747tjr#    else
3322368747tjr#      define FAR far
3332368747tjr#    endif
33470c83c0peter#  endif
33570c83c0peter#endif
336237ff31steve
3372368747tjr#if defined(WINDOWS) || defined(WIN32)
3382368747tjr   /* If building or using zlib as a DLL, define ZLIB_DLL.
3392368747tjr    * This is not mandatory, but it offers a little performance increase.
3402368747tjr    */
3412368747tjr#  ifdef ZLIB_DLL
3422368747tjr#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
3432368747tjr#      ifdef ZLIB_INTERNAL
3442368747tjr#        define ZEXTERN extern __declspec(dllexport)
3452368747tjr#      else
3462368747tjr#        define ZEXTERN extern __declspec(dllimport)
3472368747tjr#      endif
3482368747tjr#    endif
3492368747tjr#  endif  /* ZLIB_DLL */
3502368747tjr   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
3512368747tjr    * define ZLIB_WINAPI.
3522368747tjr    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
3532368747tjr    */
3542368747tjr#  ifdef ZLIB_WINAPI
35567d696bpeter#    ifdef FAR
35667d696bpeter#      undef FAR
35767d696bpeter#    endif
35867d696bpeter#    include <windows.h>
3592368747tjr     /* No need for _export, use ZLIB.DEF instead. */
3602368747tjr     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
3612368747tjr#    define ZEXPORT WINAPI
36267d696bpeter#    ifdef WIN32
3632368747tjr#      define ZEXPORTVA WINAPIV
36467d696bpeter#    else
3652368747tjr#      define ZEXPORTVA FAR CDECL
36667d696bpeter#    endif
36767d696bpeter#  endif
36867d696bpeter#endif
36967d696bpeter
37067d696bpeter#if defined (__BEOS__)
3712368747tjr#  ifdef ZLIB_DLL
3722368747tjr#    ifdef ZLIB_INTERNAL
3732368747tjr#      define ZEXPORT   __declspec(dllexport)
3742368747tjr#      define ZEXPORTVA __declspec(dllexport)
3752368747tjr#    else
3762368747tjr#      define ZEXPORT   __declspec(dllimport)
3772368747tjr#      define ZEXPORTVA __declspec(dllimport)
3782368747tjr#    endif
379237ff31steve#  endif
38067d696bpeter#endif
38167d696bpeter
3822368747tjr#ifndef ZEXTERN
3832368747tjr#  define ZEXTERN extern
3842368747tjr#endif
38567d696bpeter#ifndef ZEXPORT
38667d696bpeter#  define ZEXPORT
38767d696bpeter#endif
38867d696bpeter#ifndef ZEXPORTVA
38967d696bpeter#  define ZEXPORTVA
39067d696bpeter#endif
391237ff31steve
39270c83c0peter#ifndef FAR
3932368747tjr#  define FAR
39470c83c0peter#endif
39570c83c0peter
3962368747tjr#if !defined(__MACTYPES__)
39770c83c0petertypedef unsigned char  Byte;  /* 8 bits */
39867d696bpeter#endif
39970c83c0petertypedef unsigned int   uInt;  /* 16 bits or more */
40070c83c0petertypedef unsigned long  uLong; /* 32 bits or more */
40170c83c0peter
40267d696bpeter#ifdef SMALL_MEDIUM
40367d696bpeter   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
40470c83c0peter#  define Bytef Byte FAR
40570c83c0peter#else
40670c83c0peter   typedef Byte  FAR Bytef;
40770c83c0peter#endif
40870c83c0petertypedef char  FAR charf;
40970c83c0petertypedef int   FAR intf;
41070c83c0petertypedef uInt  FAR uIntf;
41170c83c0petertypedef uLong FAR uLongf;
41270c83c0peter
41370c83c0peter#ifdef STDC
4142368747tjr   typedef void const *voidpc;
4152368747tjr   typedef void FAR   *voidpf;
4162368747tjr   typedef void       *voidp;
41770c83c0peter#else
4182368747tjr   typedef Byte const *voidpc;
4192368747tjr   typedef Byte FAR   *voidpf;
4202368747tjr   typedef Byte       *voidp;
42170c83c0peter#endif
42270c83c0peter
4235ecec51delphij#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
4245ecec51delphij#  include <limits.h>
4255ecec51delphij#  if (UINT_MAX == 0xffffffffUL)
4265ecec51delphij#    define Z_U4 unsigned
4273aa8c3cdelphij#  elif (ULONG_MAX == 0xffffffffUL)
4283aa8c3cdelphij#    define Z_U4 unsigned long
4293aa8c3cdelphij#  elif (USHRT_MAX == 0xffffffffUL)
4303aa8c3cdelphij#    define Z_U4 unsigned short
4315ecec51delphij#  endif
4325ecec51delphij#endif
4335ecec51delphij
4345ecec51delphij#ifdef Z_U4
4355ecec51delphij   typedef Z_U4 z_crc_t;
4365ecec51delphij#else
4375ecec51delphij   typedef unsigned long z_crc_t;
4385ecec51delphij#endif
4395ecec51delphij
4404171b4edelphij#if 0    /* was set to #if 0 by ./configure */
441354ebf4delphij#  define Z_HAVE_UNISTD_H
442354ebf4delphij#endif
443354ebf4delphij
4445ecec51delphij#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
445abe1867delphij#  define Z_HAVE_STDARG_H
446abe1867delphij#endif
447abe1867delphij
44860d1ae7delphij#ifdef STDC
449abe1867delphij#  ifndef Z_SOLO
450abe1867delphij#    include <sys/types.h>      /* for off_t */
451abe1867delphij#  endif
4523799ed4delphij#endif
4533799ed4delphij
4543aa8c3cdelphij#if defined(STDC) || defined(Z_HAVE_STDARG_H)
4553aa8c3cdelphij#  ifndef Z_SOLO
4563aa8c3cdelphij#    include <stdarg.h>         /* for va_list */
4573aa8c3cdelphij#  endif
4583aa8c3cdelphij#endif
4593aa8c3cdelphij
4605ecec51delphij#ifdef _WIN32
4613aa8c3cdelphij#  ifndef Z_SOLO
4623aa8c3cdelphij#    include <stddef.h>         /* for wchar_t */
4633aa8c3cdelphij#  endif
46460d1ae7delphij#endif
46560d1ae7delphij
466e4b26ecdelphij/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
467e4b26ecdelphij * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
468e4b26ecdelphij * though the former does not conform to the LFS document), but considering
469e4b26ecdelphij * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
470e4b26ecdelphij * equivalently requesting no 64-bit operations
471e4b26ecdelphij */
4723aa8c3cdelphij#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
473e4b26ecdelphij#  undef _LARGEFILE64_SOURCE
474e4b26ecdelphij#endif
475e4b26ecdelphij
4765ecec51delphij#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
4775ecec51delphij#  define Z_HAVE_UNISTD_H
478abe1867delphij#endif
4795ecec51delphij#ifndef Z_SOLO
4803aa8c3cdelphij#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
4815ecec51delphij#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
4825ecec51delphij#    ifdef VMS
4835ecec51delphij#      include <unixio.h>       /* for off_t */
4845ecec51delphij#    endif
4855ecec51delphij#    ifndef z_off_t
4865ecec51delphij#      define z_off_t off_t
4875ecec51delphij#    endif
4882368747tjr#  endif
489237ff31steve#endif
490354ebf4delphij
4915ecec51delphij#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
4925ecec51delphij#  define Z_LFS64
4935ecec51delphij#endif
4945ecec51delphij
4955ecec51delphij#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
4965ecec51delphij#  define Z_LARGE64
4975ecec51delphij#endif
4985ecec51delphij
4995ecec51delphij#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
5005ecec51delphij#  define Z_WANT64
5015ecec51delphij#endif
5025ecec51delphij
503abe1867delphij#if !defined(SEEK_SET) && !defined(Z_SOLO)
504237ff31steve#  define SEEK_SET        0       /* Seek from beginning of file.  */
505237ff31steve#  define SEEK_CUR        1       /* Seek from current position.  */
50667d696bpeter#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
507237ff31steve#endif
508977cb31bde
509977cb31bde/*
5104171b4edelphij * This is hard-configured for FreeBSD.
511977cb31bde */
51283948bcdelphij#ifdef Z_SOLO
51383948bcdelphij#  include <sys/types.h>      /* for off_t */
51483948bcdelphij#endif
5154171b4edelphij#define	z_off_t	off_t
5164171b4edelphij#ifndef _FILE_OFFSET_BITS
5174171b4edelphij#define _FILE_OFFSET_BITS 64
5184171b4edelphij#endif
5193747e27kientzle
5203747e27kientzle#ifndef z_off_t
5213747e27kientzle#  define z_off_t long
5223747e27kientzle#endif
523237ff31steve
5245ecec51delphij#if !defined(_WIN32) && defined(Z_LARGE64)
52560d1ae7delphij#  define z_off64_t off64_t
52660d1ae7delphij#else
5275ecec51delphij#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
528abe1867delphij#    define z_off64_t __int64
529abe1867delphij#  else
5305ecec51delphij#    define z_off64_t z_off_t
5315ecec51delphij#  endif
5322368747tjr#endif
5332368747tjr
534237ff31steve/* MVS linker does not support external names larger than 8 bytes */
535237ff31steve#if defined(__MVS__)
536354ebf4delphij  #pragma map(deflateInit_,"DEIN")
537354ebf4delphij  #pragma map(deflateInit2_,"DEIN2")
538354ebf4delphij  #pragma map(deflateEnd,"DEEND")
539354ebf4delphij  #pragma map(deflateBound,"DEBND")
540354ebf4delphij  #pragma map(inflateInit_,"ININ")
541354ebf4delphij  #pragma map(inflateInit2_,"ININ2")
542354ebf4delphij  #pragma map(inflateEnd,"INEND")
543354ebf4delphij  #pragma map(inflateSync,"INSY")
544354ebf4delphij  #pragma map(inflateSetDictionary,"INSEDI")
545354ebf4delphij  #pragma map(compressBound,"CMBND")
546354ebf4delphij  #pragma map(inflate_table,"INTABL")
547354ebf4delphij  #pragma map(inflate_fast,"INFA")
548354ebf4delphij  #pragma map(inflate_copyright,"INCOPY")
54970c83c0peter#endif
55070c83c0peter
5512368747tjr#endif /* ZCONF_H */
552