external/zlib-1.2.11/zconf.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 26 Oct 2018 14:58:01 -0700
changeset 617 d64228a395fc
parent 521 9ed2f7d4a251
permissions -rw-r--r--
Fixed webp library detection when cross-compiling for Windows
slouken@521
     1
/* zconf.h -- configuration of the zlib compression library
slouken@521
     2
 * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
slouken@521
     3
 * For conditions of distribution and use, see copyright notice in zlib.h
slouken@521
     4
 */
slouken@521
     5
slouken@521
     6
/* @(#) $Id$ */
slouken@521
     7
slouken@521
     8
#ifndef ZCONF_H
slouken@521
     9
#define ZCONF_H
slouken@521
    10
slouken@521
    11
/*
slouken@521
    12
 * If you *really* need a unique prefix for all types and library functions,
slouken@521
    13
 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
slouken@521
    14
 * Even better than compiling with -DZ_PREFIX would be to use configure to set
slouken@521
    15
 * this permanently in zconf.h using "./configure --zprefix".
slouken@521
    16
 */
slouken@521
    17
#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
slouken@521
    18
#  define Z_PREFIX_SET
slouken@521
    19
slouken@521
    20
/* all linked symbols and init macros */
slouken@521
    21
#  define _dist_code            z__dist_code
slouken@521
    22
#  define _length_code          z__length_code
slouken@521
    23
#  define _tr_align             z__tr_align
slouken@521
    24
#  define _tr_flush_bits        z__tr_flush_bits
slouken@521
    25
#  define _tr_flush_block       z__tr_flush_block
slouken@521
    26
#  define _tr_init              z__tr_init
slouken@521
    27
#  define _tr_stored_block      z__tr_stored_block
slouken@521
    28
#  define _tr_tally             z__tr_tally
slouken@521
    29
#  define adler32               z_adler32
slouken@521
    30
#  define adler32_combine       z_adler32_combine
slouken@521
    31
#  define adler32_combine64     z_adler32_combine64
slouken@521
    32
#  define adler32_z             z_adler32_z
slouken@521
    33
#  ifndef Z_SOLO
slouken@521
    34
#    define compress              z_compress
slouken@521
    35
#    define compress2             z_compress2
slouken@521
    36
#    define compressBound         z_compressBound
slouken@521
    37
#  endif
slouken@521
    38
#  define crc32                 z_crc32
slouken@521
    39
#  define crc32_combine         z_crc32_combine
slouken@521
    40
#  define crc32_combine64       z_crc32_combine64
slouken@521
    41
#  define crc32_z               z_crc32_z
slouken@521
    42
#  define deflate               z_deflate
slouken@521
    43
#  define deflateBound          z_deflateBound
slouken@521
    44
#  define deflateCopy           z_deflateCopy
slouken@521
    45
#  define deflateEnd            z_deflateEnd
slouken@521
    46
#  define deflateGetDictionary  z_deflateGetDictionary
slouken@521
    47
#  define deflateInit           z_deflateInit
slouken@521
    48
#  define deflateInit2          z_deflateInit2
slouken@521
    49
#  define deflateInit2_         z_deflateInit2_
slouken@521
    50
#  define deflateInit_          z_deflateInit_
slouken@521
    51
#  define deflateParams         z_deflateParams
slouken@521
    52
#  define deflatePending        z_deflatePending
slouken@521
    53
#  define deflatePrime          z_deflatePrime
slouken@521
    54
#  define deflateReset          z_deflateReset
slouken@521
    55
#  define deflateResetKeep      z_deflateResetKeep
slouken@521
    56
#  define deflateSetDictionary  z_deflateSetDictionary
slouken@521
    57
#  define deflateSetHeader      z_deflateSetHeader
slouken@521
    58
#  define deflateTune           z_deflateTune
slouken@521
    59
#  define deflate_copyright     z_deflate_copyright
slouken@521
    60
#  define get_crc_table         z_get_crc_table
slouken@521
    61
#  ifndef Z_SOLO
slouken@521
    62
#    define gz_error              z_gz_error
slouken@521
    63
#    define gz_intmax             z_gz_intmax
slouken@521
    64
#    define gz_strwinerror        z_gz_strwinerror
slouken@521
    65
#    define gzbuffer              z_gzbuffer
slouken@521
    66
#    define gzclearerr            z_gzclearerr
slouken@521
    67
#    define gzclose               z_gzclose
slouken@521
    68
#    define gzclose_r             z_gzclose_r
slouken@521
    69
#    define gzclose_w             z_gzclose_w
slouken@521
    70
#    define gzdirect              z_gzdirect
slouken@521
    71
#    define gzdopen               z_gzdopen
slouken@521
    72
#    define gzeof                 z_gzeof
slouken@521
    73
#    define gzerror               z_gzerror
slouken@521
    74
#    define gzflush               z_gzflush
slouken@521
    75
#    define gzfread               z_gzfread
slouken@521
    76
#    define gzfwrite              z_gzfwrite
slouken@521
    77
#    define gzgetc                z_gzgetc
slouken@521
    78
#    define gzgetc_               z_gzgetc_
slouken@521
    79
#    define gzgets                z_gzgets
slouken@521
    80
#    define gzoffset              z_gzoffset
slouken@521
    81
#    define gzoffset64            z_gzoffset64
slouken@521
    82
#    define gzopen                z_gzopen
slouken@521
    83
#    define gzopen64              z_gzopen64
slouken@521
    84
#    ifdef _WIN32
slouken@521
    85
#      define gzopen_w              z_gzopen_w
slouken@521
    86
#    endif
slouken@521
    87
#    define gzprintf              z_gzprintf
slouken@521
    88
#    define gzputc                z_gzputc
slouken@521
    89
#    define gzputs                z_gzputs
slouken@521
    90
#    define gzread                z_gzread
slouken@521
    91
#    define gzrewind              z_gzrewind
slouken@521
    92
#    define gzseek                z_gzseek
slouken@521
    93
#    define gzseek64              z_gzseek64
slouken@521
    94
#    define gzsetparams           z_gzsetparams
slouken@521
    95
#    define gztell                z_gztell
slouken@521
    96
#    define gztell64              z_gztell64
slouken@521
    97
#    define gzungetc              z_gzungetc
slouken@521
    98
#    define gzvprintf             z_gzvprintf
slouken@521
    99
#    define gzwrite               z_gzwrite
slouken@521
   100
#  endif
slouken@521
   101
#  define inflate               z_inflate
slouken@521
   102
#  define inflateBack           z_inflateBack
slouken@521
   103
#  define inflateBackEnd        z_inflateBackEnd
slouken@521
   104
#  define inflateBackInit       z_inflateBackInit
slouken@521
   105
#  define inflateBackInit_      z_inflateBackInit_
slouken@521
   106
#  define inflateCodesUsed      z_inflateCodesUsed
slouken@521
   107
#  define inflateCopy           z_inflateCopy
slouken@521
   108
#  define inflateEnd            z_inflateEnd
slouken@521
   109
#  define inflateGetDictionary  z_inflateGetDictionary
slouken@521
   110
#  define inflateGetHeader      z_inflateGetHeader
slouken@521
   111
#  define inflateInit           z_inflateInit
slouken@521
   112
#  define inflateInit2          z_inflateInit2
slouken@521
   113
#  define inflateInit2_         z_inflateInit2_
slouken@521
   114
#  define inflateInit_          z_inflateInit_
slouken@521
   115
#  define inflateMark           z_inflateMark
slouken@521
   116
#  define inflatePrime          z_inflatePrime
slouken@521
   117
#  define inflateReset          z_inflateReset
slouken@521
   118
#  define inflateReset2         z_inflateReset2
slouken@521
   119
#  define inflateResetKeep      z_inflateResetKeep
slouken@521
   120
#  define inflateSetDictionary  z_inflateSetDictionary
slouken@521
   121
#  define inflateSync           z_inflateSync
slouken@521
   122
#  define inflateSyncPoint      z_inflateSyncPoint
slouken@521
   123
#  define inflateUndermine      z_inflateUndermine
slouken@521
   124
#  define inflateValidate       z_inflateValidate
slouken@521
   125
#  define inflate_copyright     z_inflate_copyright
slouken@521
   126
#  define inflate_fast          z_inflate_fast
slouken@521
   127
#  define inflate_table         z_inflate_table
slouken@521
   128
#  ifndef Z_SOLO
slouken@521
   129
#    define uncompress            z_uncompress
slouken@521
   130
#    define uncompress2           z_uncompress2
slouken@521
   131
#  endif
slouken@521
   132
#  define zError                z_zError
slouken@521
   133
#  ifndef Z_SOLO
slouken@521
   134
#    define zcalloc               z_zcalloc
slouken@521
   135
#    define zcfree                z_zcfree
slouken@521
   136
#  endif
slouken@521
   137
#  define zlibCompileFlags      z_zlibCompileFlags
slouken@521
   138
#  define zlibVersion           z_zlibVersion
slouken@521
   139
slouken@521
   140
/* all zlib typedefs in zlib.h and zconf.h */
slouken@521
   141
#  define Byte                  z_Byte
slouken@521
   142
#  define Bytef                 z_Bytef
slouken@521
   143
#  define alloc_func            z_alloc_func
slouken@521
   144
#  define charf                 z_charf
slouken@521
   145
#  define free_func             z_free_func
slouken@521
   146
#  ifndef Z_SOLO
slouken@521
   147
#    define gzFile                z_gzFile
slouken@521
   148
#  endif
slouken@521
   149
#  define gz_header             z_gz_header
slouken@521
   150
#  define gz_headerp            z_gz_headerp
slouken@521
   151
#  define in_func               z_in_func
slouken@521
   152
#  define intf                  z_intf
slouken@521
   153
#  define out_func              z_out_func
slouken@521
   154
#  define uInt                  z_uInt
slouken@521
   155
#  define uIntf                 z_uIntf
slouken@521
   156
#  define uLong                 z_uLong
slouken@521
   157
#  define uLongf                z_uLongf
slouken@521
   158
#  define voidp                 z_voidp
slouken@521
   159
#  define voidpc                z_voidpc
slouken@521
   160
#  define voidpf                z_voidpf
slouken@521
   161
slouken@521
   162
/* all zlib structs in zlib.h and zconf.h */
slouken@521
   163
#  define gz_header_s           z_gz_header_s
slouken@521
   164
#  define internal_state        z_internal_state
slouken@521
   165
slouken@521
   166
#endif
slouken@521
   167
slouken@521
   168
#if defined(__MSDOS__) && !defined(MSDOS)
slouken@521
   169
#  define MSDOS
slouken@521
   170
#endif
slouken@521
   171
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
slouken@521
   172
#  define OS2
slouken@521
   173
#endif
slouken@521
   174
#if defined(_WINDOWS) && !defined(WINDOWS)
slouken@521
   175
#  define WINDOWS
slouken@521
   176
#endif
slouken@521
   177
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
slouken@521
   178
#  ifndef WIN32
slouken@521
   179
#    define WIN32
slouken@521
   180
#  endif
slouken@521
   181
#endif
slouken@521
   182
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
slouken@521
   183
#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
slouken@521
   184
#    ifndef SYS16BIT
slouken@521
   185
#      define SYS16BIT
slouken@521
   186
#    endif
slouken@521
   187
#  endif
slouken@521
   188
#endif
slouken@521
   189
slouken@521
   190
/*
slouken@521
   191
 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
slouken@521
   192
 * than 64k bytes at a time (needed on systems with 16-bit int).
slouken@521
   193
 */
slouken@521
   194
#ifdef SYS16BIT
slouken@521
   195
#  define MAXSEG_64K
slouken@521
   196
#endif
slouken@521
   197
#ifdef MSDOS
slouken@521
   198
#  define UNALIGNED_OK
slouken@521
   199
#endif
slouken@521
   200
slouken@521
   201
#ifdef __STDC_VERSION__
slouken@521
   202
#  ifndef STDC
slouken@521
   203
#    define STDC
slouken@521
   204
#  endif
slouken@521
   205
#  if __STDC_VERSION__ >= 199901L
slouken@521
   206
#    ifndef STDC99
slouken@521
   207
#      define STDC99
slouken@521
   208
#    endif
slouken@521
   209
#  endif
slouken@521
   210
#endif
slouken@521
   211
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
slouken@521
   212
#  define STDC
slouken@521
   213
#endif
slouken@521
   214
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
slouken@521
   215
#  define STDC
slouken@521
   216
#endif
slouken@521
   217
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
slouken@521
   218
#  define STDC
slouken@521
   219
#endif
slouken@521
   220
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
slouken@521
   221
#  define STDC
slouken@521
   222
#endif
slouken@521
   223
slouken@521
   224
#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
slouken@521
   225
#  define STDC
slouken@521
   226
#endif
slouken@521
   227
slouken@521
   228
#ifndef STDC
slouken@521
   229
#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
slouken@521
   230
#    define const       /* note: need a more gentle solution here */
slouken@521
   231
#  endif
slouken@521
   232
#endif
slouken@521
   233
slouken@521
   234
#if defined(ZLIB_CONST) && !defined(z_const)
slouken@521
   235
#  define z_const const
slouken@521
   236
#else
slouken@521
   237
#  define z_const
slouken@521
   238
#endif
slouken@521
   239
slouken@521
   240
#ifdef Z_SOLO
slouken@521
   241
   typedef unsigned long z_size_t;
slouken@521
   242
#else
slouken@521
   243
#  define z_longlong long long
slouken@521
   244
#  if defined(NO_SIZE_T)
slouken@521
   245
     typedef unsigned NO_SIZE_T z_size_t;
slouken@521
   246
#  elif defined(STDC)
slouken@521
   247
#    include <stddef.h>
slouken@521
   248
     typedef size_t z_size_t;
slouken@521
   249
#  else
slouken@521
   250
     typedef unsigned long z_size_t;
slouken@521
   251
#  endif
slouken@521
   252
#  undef z_longlong
slouken@521
   253
#endif
slouken@521
   254
slouken@521
   255
/* Maximum value for memLevel in deflateInit2 */
slouken@521
   256
#ifndef MAX_MEM_LEVEL
slouken@521
   257
#  ifdef MAXSEG_64K
slouken@521
   258
#    define MAX_MEM_LEVEL 8
slouken@521
   259
#  else
slouken@521
   260
#    define MAX_MEM_LEVEL 9
slouken@521
   261
#  endif
slouken@521
   262
#endif
slouken@521
   263
slouken@521
   264
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
slouken@521
   265
 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
slouken@521
   266
 * created by gzip. (Files created by minigzip can still be extracted by
slouken@521
   267
 * gzip.)
slouken@521
   268
 */
slouken@521
   269
#ifndef MAX_WBITS
slouken@521
   270
#  define MAX_WBITS   15 /* 32K LZ77 window */
slouken@521
   271
#endif
slouken@521
   272
slouken@521
   273
/* The memory requirements for deflate are (in bytes):
slouken@521
   274
            (1 << (windowBits+2)) +  (1 << (memLevel+9))
slouken@521
   275
 that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
slouken@521
   276
 plus a few kilobytes for small objects. For example, if you want to reduce
slouken@521
   277
 the default memory requirements from 256K to 128K, compile with
slouken@521
   278
     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
slouken@521
   279
 Of course this will generally degrade compression (there's no free lunch).
slouken@521
   280
slouken@521
   281
   The memory requirements for inflate are (in bytes) 1 << windowBits
slouken@521
   282
 that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
slouken@521
   283
 for small objects.
slouken@521
   284
*/
slouken@521
   285
slouken@521
   286
                        /* Type declarations */
slouken@521
   287
slouken@521
   288
#ifndef OF /* function prototypes */
slouken@521
   289
#  ifdef STDC
slouken@521
   290
#    define OF(args)  args
slouken@521
   291
#  else
slouken@521
   292
#    define OF(args)  ()
slouken@521
   293
#  endif
slouken@521
   294
#endif
slouken@521
   295
slouken@521
   296
#ifndef Z_ARG /* function prototypes for stdarg */
slouken@521
   297
#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
slouken@521
   298
#    define Z_ARG(args)  args
slouken@521
   299
#  else
slouken@521
   300
#    define Z_ARG(args)  ()
slouken@521
   301
#  endif
slouken@521
   302
#endif
slouken@521
   303
slouken@521
   304
/* The following definitions for FAR are needed only for MSDOS mixed
slouken@521
   305
 * model programming (small or medium model with some far allocations).
slouken@521
   306
 * This was tested only with MSC; for other MSDOS compilers you may have
slouken@521
   307
 * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
slouken@521
   308
 * just define FAR to be empty.
slouken@521
   309
 */
slouken@521
   310
#ifdef SYS16BIT
slouken@521
   311
#  if defined(M_I86SM) || defined(M_I86MM)
slouken@521
   312
     /* MSC small or medium model */
slouken@521
   313
#    define SMALL_MEDIUM
slouken@521
   314
#    ifdef _MSC_VER
slouken@521
   315
#      define FAR _far
slouken@521
   316
#    else
slouken@521
   317
#      define FAR far
slouken@521
   318
#    endif
slouken@521
   319
#  endif
slouken@521
   320
#  if (defined(__SMALL__) || defined(__MEDIUM__))
slouken@521
   321
     /* Turbo C small or medium model */
slouken@521
   322
#    define SMALL_MEDIUM
slouken@521
   323
#    ifdef __BORLANDC__
slouken@521
   324
#      define FAR _far
slouken@521
   325
#    else
slouken@521
   326
#      define FAR far
slouken@521
   327
#    endif
slouken@521
   328
#  endif
slouken@521
   329
#endif
slouken@521
   330
slouken@521
   331
#if defined(WINDOWS) || defined(WIN32)
slouken@521
   332
   /* If building or using zlib as a DLL, define ZLIB_DLL.
slouken@521
   333
    * This is not mandatory, but it offers a little performance increase.
slouken@521
   334
    */
slouken@521
   335
#  ifdef ZLIB_DLL
slouken@521
   336
#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
slouken@521
   337
#      ifdef ZLIB_INTERNAL
slouken@521
   338
#        define ZEXTERN extern __declspec(dllexport)
slouken@521
   339
#      else
slouken@521
   340
#        define ZEXTERN extern __declspec(dllimport)
slouken@521
   341
#      endif
slouken@521
   342
#    endif
slouken@521
   343
#  endif  /* ZLIB_DLL */
slouken@521
   344
   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
slouken@521
   345
    * define ZLIB_WINAPI.
slouken@521
   346
    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
slouken@521
   347
    */
slouken@521
   348
#  ifdef ZLIB_WINAPI
slouken@521
   349
#    ifdef FAR
slouken@521
   350
#      undef FAR
slouken@521
   351
#    endif
slouken@521
   352
#    include <windows.h>
slouken@521
   353
     /* No need for _export, use ZLIB.DEF instead. */
slouken@521
   354
     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
slouken@521
   355
#    define ZEXPORT WINAPI
slouken@521
   356
#    ifdef WIN32
slouken@521
   357
#      define ZEXPORTVA WINAPIV
slouken@521
   358
#    else
slouken@521
   359
#      define ZEXPORTVA FAR CDECL
slouken@521
   360
#    endif
slouken@521
   361
#  endif
slouken@521
   362
#endif
slouken@521
   363
slouken@521
   364
#if defined (__BEOS__)
slouken@521
   365
#  ifdef ZLIB_DLL
slouken@521
   366
#    ifdef ZLIB_INTERNAL
slouken@521
   367
#      define ZEXPORT   __declspec(dllexport)
slouken@521
   368
#      define ZEXPORTVA __declspec(dllexport)
slouken@521
   369
#    else
slouken@521
   370
#      define ZEXPORT   __declspec(dllimport)
slouken@521
   371
#      define ZEXPORTVA __declspec(dllimport)
slouken@521
   372
#    endif
slouken@521
   373
#  endif
slouken@521
   374
#endif
slouken@521
   375
slouken@521
   376
#ifndef ZEXTERN
slouken@521
   377
#  define ZEXTERN extern
slouken@521
   378
#endif
slouken@521
   379
#ifndef ZEXPORT
slouken@521
   380
#  define ZEXPORT
slouken@521
   381
#endif
slouken@521
   382
#ifndef ZEXPORTVA
slouken@521
   383
#  define ZEXPORTVA
slouken@521
   384
#endif
slouken@521
   385
slouken@521
   386
#ifndef FAR
slouken@521
   387
#  define FAR
slouken@521
   388
#endif
slouken@521
   389
slouken@521
   390
#if !defined(__MACTYPES__)
slouken@521
   391
typedef unsigned char  Byte;  /* 8 bits */
slouken@521
   392
#endif
slouken@521
   393
typedef unsigned int   uInt;  /* 16 bits or more */
slouken@521
   394
typedef unsigned long  uLong; /* 32 bits or more */
slouken@521
   395
slouken@521
   396
#ifdef SMALL_MEDIUM
slouken@521
   397
   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
slouken@521
   398
#  define Bytef Byte FAR
slouken@521
   399
#else
slouken@521
   400
   typedef Byte  FAR Bytef;
slouken@521
   401
#endif
slouken@521
   402
typedef char  FAR charf;
slouken@521
   403
typedef int   FAR intf;
slouken@521
   404
typedef uInt  FAR uIntf;
slouken@521
   405
typedef uLong FAR uLongf;
slouken@521
   406
slouken@521
   407
#ifdef STDC
slouken@521
   408
   typedef void const *voidpc;
slouken@521
   409
   typedef void FAR   *voidpf;
slouken@521
   410
   typedef void       *voidp;
slouken@521
   411
#else
slouken@521
   412
   typedef Byte const *voidpc;
slouken@521
   413
   typedef Byte FAR   *voidpf;
slouken@521
   414
   typedef Byte       *voidp;
slouken@521
   415
#endif
slouken@521
   416
slouken@521
   417
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
slouken@521
   418
#  include <limits.h>
slouken@521
   419
#  if (UINT_MAX == 0xffffffffUL)
slouken@521
   420
#    define Z_U4 unsigned
slouken@521
   421
#  elif (ULONG_MAX == 0xffffffffUL)
slouken@521
   422
#    define Z_U4 unsigned long
slouken@521
   423
#  elif (USHRT_MAX == 0xffffffffUL)
slouken@521
   424
#    define Z_U4 unsigned short
slouken@521
   425
#  endif
slouken@521
   426
#endif
slouken@521
   427
slouken@521
   428
#ifdef Z_U4
slouken@521
   429
   typedef Z_U4 z_crc_t;
slouken@521
   430
#else
slouken@521
   431
   typedef unsigned long z_crc_t;
slouken@521
   432
#endif
slouken@521
   433
slouken@521
   434
#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
slouken@521
   435
#  define Z_HAVE_UNISTD_H
slouken@521
   436
#endif
slouken@521
   437
slouken@521
   438
#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
slouken@521
   439
#  define Z_HAVE_STDARG_H
slouken@521
   440
#endif
slouken@521
   441
slouken@521
   442
#ifdef STDC
slouken@521
   443
#  ifndef Z_SOLO
slouken@521
   444
#    include <sys/types.h>      /* for off_t */
slouken@521
   445
#  endif
slouken@521
   446
#endif
slouken@521
   447
slouken@521
   448
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
slouken@521
   449
#  ifndef Z_SOLO
slouken@521
   450
#    include <stdarg.h>         /* for va_list */
slouken@521
   451
#  endif
slouken@521
   452
#endif
slouken@521
   453
slouken@521
   454
#ifdef _WIN32
slouken@521
   455
#  ifndef Z_SOLO
slouken@521
   456
#    include <stddef.h>         /* for wchar_t */
slouken@521
   457
#  endif
slouken@521
   458
#endif
slouken@521
   459
slouken@521
   460
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
slouken@521
   461
 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
slouken@521
   462
 * though the former does not conform to the LFS document), but considering
slouken@521
   463
 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
slouken@521
   464
 * equivalently requesting no 64-bit operations
slouken@521
   465
 */
slouken@521
   466
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
slouken@521
   467
#  undef _LARGEFILE64_SOURCE
slouken@521
   468
#endif
slouken@521
   469
slouken@521
   470
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
slouken@521
   471
#  define Z_HAVE_UNISTD_H
slouken@521
   472
#endif
slouken@521
   473
#ifndef Z_SOLO
slouken@521
   474
#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
slouken@521
   475
#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
slouken@521
   476
#    ifdef VMS
slouken@521
   477
#      include <unixio.h>       /* for off_t */
slouken@521
   478
#    endif
slouken@521
   479
#    ifndef z_off_t
slouken@521
   480
#      define z_off_t off_t
slouken@521
   481
#    endif
slouken@521
   482
#  endif
slouken@521
   483
#endif
slouken@521
   484
slouken@521
   485
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
slouken@521
   486
#  define Z_LFS64
slouken@521
   487
#endif
slouken@521
   488
slouken@521
   489
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
slouken@521
   490
#  define Z_LARGE64
slouken@521
   491
#endif
slouken@521
   492
slouken@521
   493
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
slouken@521
   494
#  define Z_WANT64
slouken@521
   495
#endif
slouken@521
   496
slouken@521
   497
#if !defined(SEEK_SET) && !defined(Z_SOLO)
slouken@521
   498
#  define SEEK_SET        0       /* Seek from beginning of file.  */
slouken@521
   499
#  define SEEK_CUR        1       /* Seek from current position.  */
slouken@521
   500
#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
slouken@521
   501
#endif
slouken@521
   502
slouken@521
   503
#ifndef z_off_t
slouken@521
   504
#  define z_off_t long
slouken@521
   505
#endif
slouken@521
   506
slouken@521
   507
#if !defined(_WIN32) && defined(Z_LARGE64)
slouken@521
   508
#  define z_off64_t off64_t
slouken@521
   509
#else
slouken@521
   510
#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
slouken@521
   511
#    define z_off64_t __int64
slouken@521
   512
#  else
slouken@521
   513
#    define z_off64_t z_off_t
slouken@521
   514
#  endif
slouken@521
   515
#endif
slouken@521
   516
slouken@521
   517
/* MVS linker does not support external names larger than 8 bytes */
slouken@521
   518
#if defined(__MVS__)
slouken@521
   519
  #pragma map(deflateInit_,"DEIN")
slouken@521
   520
  #pragma map(deflateInit2_,"DEIN2")
slouken@521
   521
  #pragma map(deflateEnd,"DEEND")
slouken@521
   522
  #pragma map(deflateBound,"DEBND")
slouken@521
   523
  #pragma map(inflateInit_,"ININ")
slouken@521
   524
  #pragma map(inflateInit2_,"ININ2")
slouken@521
   525
  #pragma map(inflateEnd,"INEND")
slouken@521
   526
  #pragma map(inflateSync,"INSY")
slouken@521
   527
  #pragma map(inflateSetDictionary,"INSEDI")
slouken@521
   528
  #pragma map(compressBound,"CMBND")
slouken@521
   529
  #pragma map(inflate_table,"INTABL")
slouken@521
   530
  #pragma map(inflate_fast,"INFA")
slouken@521
   531
  #pragma map(inflate_copyright,"INCOPY")
slouken@521
   532
#endif
slouken@521
   533
slouken@521
   534
#endif /* ZCONF_H */