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