Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-05-18 08:30:30

0001 /* zconf.h -- configuration of the zlib compression library
0002  * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
0003  * For conditions of distribution and use, see copyright notice in zlib.h
0004  */
0005 
0006 #ifndef ZCONF_H
0007 #define ZCONF_H
0008 
0009 #include "zlib_name_mangling.h"
0010 
0011 #if !defined(_WIN32) && defined(__WIN32__)
0012 #  define _WIN32
0013 #endif
0014 
0015 /* Clang macro for detecting declspec support
0016  * https://clang.llvm.org/docs/LanguageExtensions.html#has-declspec-attribute
0017  */
0018 #ifndef __has_declspec_attribute
0019 #  define __has_declspec_attribute(x) 0
0020 #endif
0021 
0022 #if defined(ZLIB_CONST) && !defined(z_const)
0023 #  define z_const const
0024 #else
0025 #  define z_const
0026 #endif
0027 
0028 /* Maximum value for memLevel in deflateInit2 */
0029 #ifndef MAX_MEM_LEVEL
0030 #  define MAX_MEM_LEVEL 9
0031 #endif
0032 
0033 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
0034  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
0035  * created by gzip. (Files created by minigzip can still be extracted by
0036  * gzip.)
0037  */
0038 #ifndef MIN_WBITS
0039 #  define MIN_WBITS   8  /* 256 LZ77 window */
0040 #endif
0041 #ifndef MAX_WBITS
0042 #  define MAX_WBITS   15 /* 32K LZ77 window */
0043 #endif
0044 
0045 /* The memory requirements for deflate are (in bytes):
0046             (1 << (windowBits+2)) +  (1 << (memLevel+9))
0047  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
0048  plus a few kilobytes for small objects. For example, if you want to reduce
0049  the default memory requirements from 256K to 128K, compile with
0050      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
0051  Of course this will generally degrade compression (there's no free lunch).
0052 
0053    The memory requirements for inflate are (in bytes) 1 << windowBits
0054  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
0055  for small objects.
0056 */
0057 
0058 /* Type declarations */
0059 
0060 
0061 #ifndef OF /* function prototypes */
0062 #  define OF(args)  args
0063 #endif
0064 
0065 #ifdef ZLIB_INTERNAL
0066 #  define Z_INTERNAL ZLIB_INTERNAL
0067 #endif
0068 
0069 /* If building or using zlib as a DLL, define ZLIB_DLL.
0070  * This is not mandatory, but it offers a little performance increase.
0071  */
0072 #if defined(ZLIB_DLL) && (defined(_WIN32) || (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport)))
0073 #  ifdef Z_INTERNAL
0074 #    define Z_EXTERN extern __declspec(dllexport)
0075 #  else
0076 #    define Z_EXTERN extern __declspec(dllimport)
0077 #  endif
0078 #endif
0079 
0080 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
0081  * define ZLIB_WINAPI.
0082  * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
0083  */
0084 #if defined(ZLIB_WINAPI) && defined(_WIN32)
0085 #  ifndef WIN32_LEAN_AND_MEAN
0086 #    define WIN32_LEAN_AND_MEAN
0087 #  endif
0088 #  include <windows.h>
0089    /* No need for _export, use ZLIB.DEF instead. */
0090    /* For complete Windows compatibility, use WINAPI, not __stdcall. */
0091 #  define Z_EXPORT WINAPI
0092 #  define Z_EXPORTVA WINAPIV
0093 #endif
0094 
0095 #ifndef Z_EXTERN
0096 #  define Z_EXTERN extern
0097 #endif
0098 #ifndef Z_EXPORT
0099 #  define Z_EXPORT
0100 #endif
0101 #ifndef Z_EXPORTVA
0102 #  define Z_EXPORTVA
0103 #endif
0104 
0105 /* Conditional exports */
0106 #define ZNG_CONDEXPORT Z_INTERNAL
0107 
0108 /* For backwards compatibility */
0109 
0110 #ifndef ZEXTERN
0111 #  define ZEXTERN Z_EXTERN
0112 #endif
0113 #ifndef ZEXPORT
0114 #  define ZEXPORT Z_EXPORT
0115 #endif
0116 #ifndef ZEXPORTVA
0117 #  define ZEXPORTVA Z_EXPORTVA
0118 #endif
0119 
0120 /* Legacy zlib typedefs for backwards compatibility. Don't assume stdint.h is defined. */
0121 typedef unsigned char Byte;
0122 typedef Byte Bytef;
0123 
0124 typedef unsigned int   uInt;  /* 16 bits or more */
0125 typedef unsigned long  uLong; /* 32 bits or more */
0126 
0127 typedef char  charf;
0128 typedef int   intf;
0129 typedef uInt  uIntf;
0130 typedef uLong uLongf;
0131 
0132 typedef void const *voidpc;
0133 typedef void       *voidpf;
0134 typedef void       *voidp;
0135 
0136 typedef unsigned int z_crc_t;
0137 
0138 #if 1    /* was set to #if 1 by configure/cmake/etc */
0139 #  define Z_HAVE_UNISTD_H
0140 #endif
0141 
0142 #ifdef NEED_PTRDIFF_T    /* may be set to #if 1 by configure/cmake/etc */
0143 typedef PTRDIFF_TYPE ptrdiff_t;
0144 #endif
0145 
0146 #include <sys/types.h>      /* for off_t */
0147 
0148 #include <stddef.h>         /* for wchar_t and NULL */
0149 
0150 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
0151  * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
0152  * though the former does not conform to the LFS document), but considering
0153  * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
0154  * equivalently requesting no 64-bit operations
0155  */
0156 #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
0157 #  undef _LARGEFILE64_SOURCE
0158 #endif
0159 
0160 #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
0161 #  include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
0162 #  ifndef z_off_t
0163 #    define z_off_t off_t
0164 #  endif
0165 #endif
0166 
0167 #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
0168 #  define Z_LFS64
0169 #endif
0170 
0171 #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
0172 #  define Z_LARGE64
0173 #endif
0174 
0175 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
0176 #  define Z_WANT64
0177 #endif
0178 
0179 #if !defined(SEEK_SET)
0180 #  define SEEK_SET        0       /* Seek from beginning of file.  */
0181 #  define SEEK_CUR        1       /* Seek from current position.  */
0182 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
0183 #endif
0184 
0185 #ifndef z_off_t
0186 #  define z_off_t long
0187 #endif
0188 
0189 #if !defined(_WIN32) && defined(Z_LARGE64)
0190 #  define z_off64_t off64_t
0191 #else
0192 #  if defined(__MSYS__)
0193 #    define z_off64_t _off64_t
0194 #  elif defined(_WIN32) && !defined(__GNUC__)
0195 #    define z_off64_t __int64
0196 #  else
0197 #    define z_off64_t z_off_t
0198 #  endif
0199 #endif
0200 
0201 typedef size_t z_size_t;
0202 
0203 #endif /* ZCONF_H */