zconf.h.cmakein revision 1.1.1.3
11.1Schristos/* zconf.h -- configuration of the zlib compression library
21.1Schristos * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
31.1Schristos * For conditions of distribution and use, see copyright notice in zlib.h
41.1Schristos */
51.1Schristos
61.1.1.3Schristos/* @(#) Id */
71.1Schristos
81.1Schristos#ifndef ZCONF_H
91.1Schristos#define ZCONF_H
101.1Schristos#cmakedefine Z_PREFIX
111.1Schristos#cmakedefine Z_HAVE_UNISTD_H
121.1Schristos
131.1Schristos/*
141.1Schristos * If you *really* need a unique prefix for all types and library functions,
151.1Schristos * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
161.1Schristos * Even better than compiling with -DZ_PREFIX would be to use configure to set
171.1Schristos * this permanently in zconf.h using "./configure --zprefix".
181.1Schristos */
191.1Schristos#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
201.1Schristos#  define Z_PREFIX_SET
211.1Schristos
221.1Schristos/* all linked symbols and init macros */
231.1Schristos#  define _dist_code            z__dist_code
241.1Schristos#  define _length_code          z__length_code
251.1Schristos#  define _tr_align             z__tr_align
261.1Schristos#  define _tr_flush_bits        z__tr_flush_bits
271.1Schristos#  define _tr_flush_block       z__tr_flush_block
281.1Schristos#  define _tr_init              z__tr_init
291.1Schristos#  define _tr_stored_block      z__tr_stored_block
301.1Schristos#  define _tr_tally             z__tr_tally
311.1Schristos#  define adler32               z_adler32
321.1Schristos#  define adler32_combine       z_adler32_combine
331.1Schristos#  define adler32_combine64     z_adler32_combine64
341.1Schristos#  define adler32_z             z_adler32_z
351.1Schristos#  ifndef Z_SOLO
361.1Schristos#    define compress              z_compress
371.1Schristos#    define compress2             z_compress2
381.1Schristos#    define compressBound         z_compressBound
391.1Schristos#  endif
401.1Schristos#  define crc32                 z_crc32
411.1Schristos#  define crc32_combine         z_crc32_combine
421.1Schristos#  define crc32_combine64       z_crc32_combine64
431.1.1.2Schristos#  define crc32_combine_gen     z_crc32_combine_gen
441.1.1.2Schristos#  define crc32_combine_gen64   z_crc32_combine_gen64
451.1.1.2Schristos#  define crc32_combine_op      z_crc32_combine_op
461.1Schristos#  define crc32_z               z_crc32_z
471.1Schristos#  define deflate               z_deflate
481.1Schristos#  define deflateBound          z_deflateBound
491.1Schristos#  define deflateCopy           z_deflateCopy
501.1Schristos#  define deflateEnd            z_deflateEnd
511.1Schristos#  define deflateGetDictionary  z_deflateGetDictionary
521.1Schristos#  define deflateInit           z_deflateInit
531.1Schristos#  define deflateInit2          z_deflateInit2
541.1Schristos#  define deflateInit2_         z_deflateInit2_
551.1Schristos#  define deflateInit_          z_deflateInit_
561.1Schristos#  define deflateParams         z_deflateParams
571.1Schristos#  define deflatePending        z_deflatePending
581.1Schristos#  define deflatePrime          z_deflatePrime
591.1Schristos#  define deflateReset          z_deflateReset
601.1Schristos#  define deflateResetKeep      z_deflateResetKeep
611.1Schristos#  define deflateSetDictionary  z_deflateSetDictionary
621.1Schristos#  define deflateSetHeader      z_deflateSetHeader
631.1Schristos#  define deflateTune           z_deflateTune
641.1Schristos#  define deflate_copyright     z_deflate_copyright
651.1Schristos#  define get_crc_table         z_get_crc_table
661.1Schristos#  ifndef Z_SOLO
671.1Schristos#    define gz_error              z_gz_error
681.1Schristos#    define gz_intmax             z_gz_intmax
691.1Schristos#    define gz_strwinerror        z_gz_strwinerror
701.1Schristos#    define gzbuffer              z_gzbuffer
711.1Schristos#    define gzclearerr            z_gzclearerr
721.1Schristos#    define gzclose               z_gzclose
731.1Schristos#    define gzclose_r             z_gzclose_r
741.1Schristos#    define gzclose_w             z_gzclose_w
751.1Schristos#    define gzdirect              z_gzdirect
761.1Schristos#    define gzdopen               z_gzdopen
771.1Schristos#    define gzeof                 z_gzeof
781.1Schristos#    define gzerror               z_gzerror
791.1Schristos#    define gzflush               z_gzflush
801.1Schristos#    define gzfread               z_gzfread
811.1Schristos#    define gzfwrite              z_gzfwrite
821.1Schristos#    define gzgetc                z_gzgetc
831.1Schristos#    define gzgetc_               z_gzgetc_
841.1Schristos#    define gzgets                z_gzgets
851.1Schristos#    define gzoffset              z_gzoffset
861.1Schristos#    define gzoffset64            z_gzoffset64
871.1Schristos#    define gzopen                z_gzopen
881.1Schristos#    define gzopen64              z_gzopen64
891.1Schristos#    ifdef _WIN32
901.1Schristos#      define gzopen_w              z_gzopen_w
911.1Schristos#    endif
921.1Schristos#    define gzprintf              z_gzprintf
931.1Schristos#    define gzputc                z_gzputc
941.1Schristos#    define gzputs                z_gzputs
951.1Schristos#    define gzread                z_gzread
961.1Schristos#    define gzrewind              z_gzrewind
971.1Schristos#    define gzseek                z_gzseek
981.1Schristos#    define gzseek64              z_gzseek64
991.1Schristos#    define gzsetparams           z_gzsetparams
1001.1Schristos#    define gztell                z_gztell
1011.1Schristos#    define gztell64              z_gztell64
1021.1Schristos#    define gzungetc              z_gzungetc
1031.1Schristos#    define gzvprintf             z_gzvprintf
1041.1Schristos#    define gzwrite               z_gzwrite
1051.1Schristos#  endif
1061.1Schristos#  define inflate               z_inflate
1071.1Schristos#  define inflateBack           z_inflateBack
1081.1Schristos#  define inflateBackEnd        z_inflateBackEnd
1091.1Schristos#  define inflateBackInit       z_inflateBackInit
1101.1Schristos#  define inflateBackInit_      z_inflateBackInit_
1111.1Schristos#  define inflateCodesUsed      z_inflateCodesUsed
1121.1Schristos#  define inflateCopy           z_inflateCopy
1131.1Schristos#  define inflateEnd            z_inflateEnd
1141.1Schristos#  define inflateGetDictionary  z_inflateGetDictionary
1151.1Schristos#  define inflateGetHeader      z_inflateGetHeader
1161.1Schristos#  define inflateInit           z_inflateInit
1171.1Schristos#  define inflateInit2          z_inflateInit2
1181.1Schristos#  define inflateInit2_         z_inflateInit2_
1191.1Schristos#  define inflateInit_          z_inflateInit_
1201.1Schristos#  define inflateMark           z_inflateMark
1211.1Schristos#  define inflatePrime          z_inflatePrime
1221.1Schristos#  define inflateReset          z_inflateReset
1231.1Schristos#  define inflateReset2         z_inflateReset2
1241.1Schristos#  define inflateResetKeep      z_inflateResetKeep
1251.1Schristos#  define inflateSetDictionary  z_inflateSetDictionary
1261.1Schristos#  define inflateSync           z_inflateSync
1271.1Schristos#  define inflateSyncPoint      z_inflateSyncPoint
1281.1Schristos#  define inflateUndermine      z_inflateUndermine
1291.1Schristos#  define inflateValidate       z_inflateValidate
1301.1Schristos#  define inflate_copyright     z_inflate_copyright
1311.1Schristos#  define inflate_fast          z_inflate_fast
1321.1Schristos#  define inflate_table         z_inflate_table
1331.1Schristos#  ifndef Z_SOLO
1341.1Schristos#    define uncompress            z_uncompress
1351.1Schristos#    define uncompress2           z_uncompress2
1361.1Schristos#  endif
1371.1Schristos#  define zError                z_zError
1381.1Schristos#  ifndef Z_SOLO
1391.1Schristos#    define zcalloc               z_zcalloc
1401.1Schristos#    define zcfree                z_zcfree
1411.1Schristos#  endif
1421.1Schristos#  define zlibCompileFlags      z_zlibCompileFlags
1431.1Schristos#  define zlibVersion           z_zlibVersion
1441.1Schristos
1451.1Schristos/* all zlib typedefs in zlib.h and zconf.h */
1461.1Schristos#  define Byte                  z_Byte
1471.1Schristos#  define Bytef                 z_Bytef
1481.1Schristos#  define alloc_func            z_alloc_func
1491.1Schristos#  define charf                 z_charf
1501.1Schristos#  define free_func             z_free_func
1511.1Schristos#  ifndef Z_SOLO
1521.1Schristos#    define gzFile                z_gzFile
1531.1Schristos#  endif
1541.1Schristos#  define gz_header             z_gz_header
1551.1Schristos#  define gz_headerp            z_gz_headerp
1561.1Schristos#  define in_func               z_in_func
1571.1Schristos#  define intf                  z_intf
1581.1Schristos#  define out_func              z_out_func
1591.1Schristos#  define uInt                  z_uInt
1601.1Schristos#  define uIntf                 z_uIntf
1611.1Schristos#  define uLong                 z_uLong
1621.1Schristos#  define uLongf                z_uLongf
1631.1Schristos#  define voidp                 z_voidp
1641.1Schristos#  define voidpc                z_voidpc
1651.1Schristos#  define voidpf                z_voidpf
1661.1Schristos
1671.1Schristos/* all zlib structs in zlib.h and zconf.h */
1681.1Schristos#  define gz_header_s           z_gz_header_s
1691.1Schristos#  define internal_state        z_internal_state
1701.1Schristos
1711.1Schristos#endif
1721.1Schristos
1731.1Schristos#if defined(__MSDOS__) && !defined(MSDOS)
1741.1Schristos#  define MSDOS
1751.1Schristos#endif
1761.1Schristos#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
1771.1Schristos#  define OS2
1781.1Schristos#endif
1791.1Schristos#if defined(_WINDOWS) && !defined(WINDOWS)
1801.1Schristos#  define WINDOWS
1811.1Schristos#endif
1821.1Schristos#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
1831.1Schristos#  ifndef WIN32
1841.1Schristos#    define WIN32
1851.1Schristos#  endif
1861.1Schristos#endif
1871.1Schristos#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
1881.1Schristos#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
1891.1Schristos#    ifndef SYS16BIT
1901.1Schristos#      define SYS16BIT
1911.1Schristos#    endif
1921.1Schristos#  endif
1931.1Schristos#endif
1941.1Schristos
1951.1Schristos/*
1961.1Schristos * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
1971.1Schristos * than 64k bytes at a time (needed on systems with 16-bit int).
1981.1Schristos */
1991.1Schristos#ifdef SYS16BIT
2001.1Schristos#  define MAXSEG_64K
2011.1Schristos#endif
2021.1Schristos#ifdef MSDOS
2031.1Schristos#  define UNALIGNED_OK
2041.1Schristos#endif
2051.1Schristos
2061.1Schristos#ifdef __STDC_VERSION__
2071.1Schristos#  ifndef STDC
2081.1Schristos#    define STDC
2091.1Schristos#  endif
2101.1Schristos#  if __STDC_VERSION__ >= 199901L
2111.1Schristos#    ifndef STDC99
2121.1Schristos#      define STDC99
2131.1Schristos#    endif
2141.1Schristos#  endif
2151.1Schristos#endif
2161.1Schristos#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
2171.1Schristos#  define STDC
2181.1Schristos#endif
2191.1Schristos#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
2201.1Schristos#  define STDC
2211.1Schristos#endif
2221.1Schristos#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
2231.1Schristos#  define STDC
2241.1Schristos#endif
2251.1Schristos#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
2261.1Schristos#  define STDC
2271.1Schristos#endif
2281.1Schristos
2291.1Schristos#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
2301.1Schristos#  define STDC
2311.1Schristos#endif
2321.1Schristos
2331.1Schristos#ifndef STDC
2341.1Schristos#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
2351.1Schristos#    define const       /* note: need a more gentle solution here */
2361.1Schristos#  endif
2371.1Schristos#endif
2381.1Schristos
2391.1Schristos#if defined(ZLIB_CONST) && !defined(z_const)
2401.1Schristos#  define z_const const
2411.1Schristos#else
2421.1Schristos#  define z_const
2431.1Schristos#endif
2441.1Schristos
2451.1Schristos#ifdef Z_SOLO
2461.1Schristos   typedef unsigned long z_size_t;
2471.1Schristos#else
2481.1Schristos#  define z_longlong long long
2491.1Schristos#  if defined(NO_SIZE_T)
2501.1Schristos     typedef unsigned NO_SIZE_T z_size_t;
2511.1Schristos#  elif defined(STDC)
2521.1Schristos#    include <stddef.h>
2531.1Schristos     typedef size_t z_size_t;
2541.1Schristos#  else
2551.1Schristos     typedef unsigned long z_size_t;
2561.1Schristos#  endif
2571.1Schristos#  undef z_longlong
2581.1Schristos#endif
2591.1Schristos
2601.1Schristos/* Maximum value for memLevel in deflateInit2 */
2611.1Schristos#ifndef MAX_MEM_LEVEL
2621.1Schristos#  ifdef MAXSEG_64K
2631.1Schristos#    define MAX_MEM_LEVEL 8
2641.1Schristos#  else
2651.1Schristos#    define MAX_MEM_LEVEL 9
2661.1Schristos#  endif
2671.1Schristos#endif
2681.1Schristos
2691.1Schristos/* Maximum value for windowBits in deflateInit2 and inflateInit2.
2701.1Schristos * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
2711.1Schristos * created by gzip. (Files created by minigzip can still be extracted by
2721.1Schristos * gzip.)
2731.1Schristos */
2741.1Schristos#ifndef MAX_WBITS
2751.1Schristos#  define MAX_WBITS   15 /* 32K LZ77 window */
2761.1Schristos#endif
2771.1Schristos
2781.1Schristos/* The memory requirements for deflate are (in bytes):
2791.1Schristos            (1 << (windowBits+2)) +  (1 << (memLevel+9))
2801.1Schristos that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
2811.1Schristos plus a few kilobytes for small objects. For example, if you want to reduce
2821.1Schristos the default memory requirements from 256K to 128K, compile with
2831.1Schristos     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
2841.1Schristos Of course this will generally degrade compression (there's no free lunch).
2851.1Schristos
2861.1Schristos   The memory requirements for inflate are (in bytes) 1 << windowBits
2871.1Schristos that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
2881.1Schristos for small objects.
2891.1Schristos*/
2901.1Schristos
2911.1Schristos                        /* Type declarations */
2921.1Schristos
2931.1Schristos#ifndef OF /* function prototypes */
2941.1Schristos#  ifdef STDC
2951.1Schristos#    define OF(args)  args
2961.1Schristos#  else
2971.1Schristos#    define OF(args)  ()
2981.1Schristos#  endif
2991.1Schristos#endif
3001.1Schristos
3011.1Schristos#ifndef Z_ARG /* function prototypes for stdarg */
3021.1Schristos#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
3031.1Schristos#    define Z_ARG(args)  args
3041.1Schristos#  else
3051.1Schristos#    define Z_ARG(args)  ()
3061.1Schristos#  endif
3071.1Schristos#endif
3081.1Schristos
3091.1Schristos/* The following definitions for FAR are needed only for MSDOS mixed
3101.1Schristos * model programming (small or medium model with some far allocations).
3111.1Schristos * This was tested only with MSC; for other MSDOS compilers you may have
3121.1Schristos * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
3131.1Schristos * just define FAR to be empty.
3141.1Schristos */
3151.1Schristos#ifdef SYS16BIT
3161.1Schristos#  if defined(M_I86SM) || defined(M_I86MM)
3171.1Schristos     /* MSC small or medium model */
3181.1Schristos#    define SMALL_MEDIUM
3191.1Schristos#    ifdef _MSC_VER
3201.1Schristos#      define FAR _far
3211.1Schristos#    else
3221.1Schristos#      define FAR far
3231.1Schristos#    endif
3241.1Schristos#  endif
3251.1Schristos#  if (defined(__SMALL__) || defined(__MEDIUM__))
3261.1Schristos     /* Turbo C small or medium model */
3271.1Schristos#    define SMALL_MEDIUM
3281.1Schristos#    ifdef __BORLANDC__
3291.1Schristos#      define FAR _far
3301.1Schristos#    else
3311.1Schristos#      define FAR far
3321.1Schristos#    endif
3331.1Schristos#  endif
3341.1Schristos#endif
3351.1Schristos
3361.1Schristos#if defined(WINDOWS) || defined(WIN32)
3371.1Schristos   /* If building or using zlib as a DLL, define ZLIB_DLL.
3381.1Schristos    * This is not mandatory, but it offers a little performance increase.
3391.1Schristos    */
3401.1Schristos#  ifdef ZLIB_DLL
3411.1Schristos#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
3421.1Schristos#      ifdef ZLIB_INTERNAL
3431.1Schristos#        define ZEXTERN extern __declspec(dllexport)
3441.1Schristos#      else
3451.1Schristos#        define ZEXTERN extern __declspec(dllimport)
3461.1Schristos#      endif
3471.1Schristos#    endif
3481.1Schristos#  endif  /* ZLIB_DLL */
3491.1Schristos   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
3501.1Schristos    * define ZLIB_WINAPI.
3511.1Schristos    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
3521.1Schristos    */
3531.1Schristos#  ifdef ZLIB_WINAPI
3541.1Schristos#    ifdef FAR
3551.1Schristos#      undef FAR
3561.1Schristos#    endif
3571.1.1.2Schristos#    ifndef WIN32_LEAN_AND_MEAN
3581.1.1.2Schristos#      define WIN32_LEAN_AND_MEAN
3591.1.1.2Schristos#    endif
3601.1Schristos#    include <windows.h>
3611.1Schristos     /* No need for _export, use ZLIB.DEF instead. */
3621.1Schristos     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
3631.1Schristos#    define ZEXPORT WINAPI
3641.1Schristos#    ifdef WIN32
3651.1Schristos#      define ZEXPORTVA WINAPIV
3661.1Schristos#    else
3671.1Schristos#      define ZEXPORTVA FAR CDECL
3681.1Schristos#    endif
3691.1Schristos#  endif
3701.1Schristos#endif
3711.1Schristos
3721.1Schristos#if defined (__BEOS__)
3731.1Schristos#  ifdef ZLIB_DLL
3741.1Schristos#    ifdef ZLIB_INTERNAL
3751.1Schristos#      define ZEXPORT   __declspec(dllexport)
3761.1Schristos#      define ZEXPORTVA __declspec(dllexport)
3771.1Schristos#    else
3781.1Schristos#      define ZEXPORT   __declspec(dllimport)
3791.1Schristos#      define ZEXPORTVA __declspec(dllimport)
3801.1Schristos#    endif
3811.1Schristos#  endif
3821.1Schristos#endif
3831.1Schristos
3841.1Schristos#ifndef ZEXTERN
3851.1Schristos#  define ZEXTERN extern
3861.1Schristos#endif
3871.1Schristos#ifndef ZEXPORT
3881.1Schristos#  define ZEXPORT
3891.1Schristos#endif
3901.1Schristos#ifndef ZEXPORTVA
3911.1Schristos#  define ZEXPORTVA
3921.1Schristos#endif
3931.1Schristos
3941.1Schristos#ifndef FAR
3951.1Schristos#  define FAR
3961.1Schristos#endif
3971.1Schristos
3981.1Schristos#if !defined(__MACTYPES__)
3991.1Schristostypedef unsigned char  Byte;  /* 8 bits */
4001.1Schristos#endif
4011.1Schristostypedef unsigned int   uInt;  /* 16 bits or more */
4021.1Schristostypedef unsigned long  uLong; /* 32 bits or more */
4031.1Schristos
4041.1Schristos#ifdef SMALL_MEDIUM
4051.1Schristos   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
4061.1Schristos#  define Bytef Byte FAR
4071.1Schristos#else
4081.1Schristos   typedef Byte  FAR Bytef;
4091.1Schristos#endif
4101.1Schristostypedef char  FAR charf;
4111.1Schristostypedef int   FAR intf;
4121.1Schristostypedef uInt  FAR uIntf;
4131.1Schristostypedef uLong FAR uLongf;
4141.1Schristos
4151.1Schristos#ifdef STDC
4161.1Schristos   typedef void const *voidpc;
4171.1Schristos   typedef void FAR   *voidpf;
4181.1Schristos   typedef void       *voidp;
4191.1Schristos#else
4201.1Schristos   typedef Byte const *voidpc;
4211.1Schristos   typedef Byte FAR   *voidpf;
4221.1Schristos   typedef Byte       *voidp;
4231.1Schristos#endif
4241.1Schristos
4251.1Schristos#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
4261.1Schristos#  include <limits.h>
4271.1Schristos#  if (UINT_MAX == 0xffffffffUL)
4281.1Schristos#    define Z_U4 unsigned
4291.1Schristos#  elif (ULONG_MAX == 0xffffffffUL)
4301.1Schristos#    define Z_U4 unsigned long
4311.1Schristos#  elif (USHRT_MAX == 0xffffffffUL)
4321.1Schristos#    define Z_U4 unsigned short
4331.1Schristos#  endif
4341.1Schristos#endif
4351.1Schristos
4361.1Schristos#ifdef Z_U4
4371.1Schristos   typedef Z_U4 z_crc_t;
4381.1Schristos#else
4391.1Schristos   typedef unsigned long z_crc_t;
4401.1Schristos#endif
4411.1Schristos
4421.1Schristos#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
4431.1Schristos#  define Z_HAVE_UNISTD_H
4441.1Schristos#endif
4451.1Schristos
4461.1Schristos#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
4471.1Schristos#  define Z_HAVE_STDARG_H
4481.1Schristos#endif
4491.1Schristos
4501.1Schristos#ifdef STDC
4511.1Schristos#  ifndef Z_SOLO
4521.1Schristos#    include <sys/types.h>      /* for off_t */
4531.1Schristos#  endif
4541.1Schristos#endif
4551.1Schristos
4561.1Schristos#if defined(STDC) || defined(Z_HAVE_STDARG_H)
4571.1Schristos#  ifndef Z_SOLO
4581.1Schristos#    include <stdarg.h>         /* for va_list */
4591.1Schristos#  endif
4601.1Schristos#endif
4611.1Schristos
4621.1Schristos#ifdef _WIN32
4631.1Schristos#  ifndef Z_SOLO
4641.1Schristos#    include <stddef.h>         /* for wchar_t */
4651.1Schristos#  endif
4661.1Schristos#endif
4671.1Schristos
4681.1Schristos/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
4691.1Schristos * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
4701.1Schristos * though the former does not conform to the LFS document), but considering
4711.1Schristos * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
4721.1Schristos * equivalently requesting no 64-bit operations
4731.1Schristos */
4741.1Schristos#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
4751.1Schristos#  undef _LARGEFILE64_SOURCE
4761.1Schristos#endif
4771.1Schristos
4781.1.1.2Schristos#ifndef Z_HAVE_UNISTD_H
4791.1.1.2Schristos#  ifdef __WATCOMC__
4801.1.1.2Schristos#    define Z_HAVE_UNISTD_H
4811.1.1.2Schristos#  endif
4821.1.1.2Schristos#endif
4831.1.1.2Schristos#ifndef Z_HAVE_UNISTD_H
4841.1.1.2Schristos#  if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
4851.1.1.2Schristos#    define Z_HAVE_UNISTD_H
4861.1.1.2Schristos#  endif
4871.1Schristos#endif
4881.1Schristos#ifndef Z_SOLO
4891.1.1.2Schristos#  if defined(Z_HAVE_UNISTD_H)
4901.1Schristos#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
4911.1Schristos#    ifdef VMS
4921.1Schristos#      include <unixio.h>       /* for off_t */
4931.1Schristos#    endif
4941.1Schristos#    ifndef z_off_t
4951.1Schristos#      define z_off_t off_t
4961.1Schristos#    endif
4971.1Schristos#  endif
4981.1Schristos#endif
4991.1Schristos
5001.1Schristos#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
5011.1Schristos#  define Z_LFS64
5021.1Schristos#endif
5031.1Schristos
5041.1Schristos#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
5051.1Schristos#  define Z_LARGE64
5061.1Schristos#endif
5071.1Schristos
5081.1Schristos#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
5091.1Schristos#  define Z_WANT64
5101.1Schristos#endif
5111.1Schristos
5121.1Schristos#if !defined(SEEK_SET) && !defined(Z_SOLO)
5131.1Schristos#  define SEEK_SET        0       /* Seek from beginning of file.  */
5141.1Schristos#  define SEEK_CUR        1       /* Seek from current position.  */
5151.1Schristos#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
5161.1Schristos#endif
5171.1Schristos
5181.1Schristos#ifndef z_off_t
5191.1Schristos#  define z_off_t long
5201.1Schristos#endif
5211.1Schristos
5221.1Schristos#if !defined(_WIN32) && defined(Z_LARGE64)
5231.1Schristos#  define z_off64_t off64_t
5241.1Schristos#else
5251.1Schristos#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
5261.1Schristos#    define z_off64_t __int64
5271.1Schristos#  else
5281.1Schristos#    define z_off64_t z_off_t
5291.1Schristos#  endif
5301.1Schristos#endif
5311.1Schristos
5321.1Schristos/* MVS linker does not support external names larger than 8 bytes */
5331.1Schristos#if defined(__MVS__)
5341.1Schristos  #pragma map(deflateInit_,"DEIN")
5351.1Schristos  #pragma map(deflateInit2_,"DEIN2")
5361.1Schristos  #pragma map(deflateEnd,"DEEND")
5371.1Schristos  #pragma map(deflateBound,"DEBND")
5381.1Schristos  #pragma map(inflateInit_,"ININ")
5391.1Schristos  #pragma map(inflateInit2_,"ININ2")
5401.1Schristos  #pragma map(inflateEnd,"INEND")
5411.1Schristos  #pragma map(inflateSync,"INSY")
5421.1Schristos  #pragma map(inflateSetDictionary,"INSEDI")
5431.1Schristos  #pragma map(compressBound,"CMBND")
5441.1Schristos  #pragma map(inflate_table,"INTABL")
5451.1Schristos  #pragma map(inflate_fast,"INFA")
5461.1Schristos  #pragma map(inflate_copyright,"INCOPY")
5471.1Schristos#endif
5481.1Schristos
5491.1Schristos#endif /* ZCONF_H */
550