Clone of Akilla's ac2d @ https://github.com/deregtd/AC2D

zconf.h 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. /* zconf.h -- configuration of the zlib compression library
  2. * Copyright (C) 1995-1998 Jean-loup Gailly.
  3. * For conditions of distribution and use, see copyright notice in zlib.h
  4. */
  5. /* @(#) $Id$ */
  6. #ifndef _ZCONF_H
  7. #define _ZCONF_H
  8. /*
  9. * If you *really* need a unique prefix for all types and library functions,
  10. * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
  11. */
  12. #ifdef Z_PREFIX
  13. # define deflateInit_ z_deflateInit_
  14. # define deflate z_deflate
  15. # define deflateEnd z_deflateEnd
  16. # define inflateInit_ z_inflateInit_
  17. # define inflate z_inflate
  18. # define inflateEnd z_inflateEnd
  19. # define deflateInit2_ z_deflateInit2_
  20. # define deflateSetDictionary z_deflateSetDictionary
  21. # define deflateCopy z_deflateCopy
  22. # define deflateReset z_deflateReset
  23. # define deflateParams z_deflateParams
  24. # define inflateInit2_ z_inflateInit2_
  25. # define inflateSetDictionary z_inflateSetDictionary
  26. # define inflateSync z_inflateSync
  27. # define inflateSyncPoint z_inflateSyncPoint
  28. # define inflateReset z_inflateReset
  29. # define compress z_compress
  30. # define compress2 z_compress2
  31. # define uncompress z_uncompress
  32. # define adler32 z_adler32
  33. # define crc32 z_crc32
  34. # define get_crc_table z_get_crc_table
  35. # define Byte z_Byte
  36. # define uInt z_uInt
  37. # define uLong z_uLong
  38. # define Bytef z_Bytef
  39. # define charf z_charf
  40. # define intf z_intf
  41. # define uIntf z_uIntf
  42. # define uLongf z_uLongf
  43. # define voidpf z_voidpf
  44. # define voidp z_voidp
  45. #endif
  46. #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
  47. # define WIN32
  48. #endif
  49. #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
  50. # ifndef __32BIT__
  51. # define __32BIT__
  52. # endif
  53. #endif
  54. #if defined(__MSDOS__) && !defined(MSDOS)
  55. # define MSDOS
  56. #endif
  57. /*
  58. * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
  59. * than 64k bytes at a time (needed on systems with 16-bit int).
  60. */
  61. #if defined(MSDOS) && !defined(__32BIT__)
  62. # define MAXSEG_64K
  63. #endif
  64. #ifdef MSDOS
  65. # define UNALIGNED_OK
  66. #endif
  67. #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
  68. # define STDC
  69. #endif
  70. #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
  71. # ifndef STDC
  72. # define STDC
  73. # endif
  74. #endif
  75. #ifndef STDC
  76. # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
  77. # define const
  78. # endif
  79. #endif
  80. /* Some Mac compilers merge all .h files incorrectly: */
  81. #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
  82. # define NO_DUMMY_DECL
  83. #endif
  84. /* Old Borland C incorrectly complains about missing returns: */
  85. #if defined(__BORLANDC__) && (__BORLANDC__ < 0x460)
  86. # define NEED_DUMMY_RETURN
  87. #endif
  88. #if defined(__TURBOC__) && !defined(__BORLANDC__)
  89. # define NEED_DUMMY_RETURN
  90. #endif
  91. /* Maximum value for memLevel in deflateInit2 */
  92. #ifndef MAX_MEM_LEVEL
  93. # ifdef MAXSEG_64K
  94. # define MAX_MEM_LEVEL 8
  95. # else
  96. # define MAX_MEM_LEVEL 9
  97. # endif
  98. #endif
  99. /* Maximum value for windowBits in deflateInit2 and inflateInit2.
  100. * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  101. * created by gzip. (Files created by minigzip can still be extracted by
  102. * gzip.)
  103. */
  104. #ifndef MAX_WBITS
  105. # define MAX_WBITS 15 /* 32K LZ77 window */
  106. #endif
  107. /* The memory requirements for deflate are (in bytes):
  108. (1 << (windowBits+2)) + (1 << (memLevel+9))
  109. that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
  110. plus a few kilobytes for small objects. For example, if you want to reduce
  111. the default memory requirements from 256K to 128K, compile with
  112. make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  113. Of course this will generally degrade compression (there's no free lunch).
  114. The memory requirements for inflate are (in bytes) 1 << windowBits
  115. that is, 32K for windowBits=15 (default value) plus a few kilobytes
  116. for small objects.
  117. */
  118. /* Type declarations */
  119. #ifndef OF /* function prototypes */
  120. # ifdef STDC
  121. # define OF(args) args
  122. # else
  123. # define OF(args) ()
  124. # endif
  125. #endif
  126. /* The following definitions for FAR are needed only for MSDOS mixed
  127. * model programming (small or medium model with some far allocations).
  128. * This was tested only with MSC; for other MSDOS compilers you may have
  129. * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
  130. * just define FAR to be empty.
  131. */
  132. #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
  133. /* MSC small or medium model */
  134. # define SMALL_MEDIUM
  135. # ifdef _MSC_VER
  136. # define FAR _far
  137. # else
  138. # define FAR far
  139. # endif
  140. #endif
  141. #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
  142. # ifndef __32BIT__
  143. # define SMALL_MEDIUM
  144. # define FAR _far
  145. # endif
  146. #endif
  147. #if defined(WIN32) && (!defined(ZLIB_WIN32_NODLL)) && (!defined(ZLIB_DLL))
  148. # define ZLIB_DLL
  149. #endif
  150. /* Compile with -DZLIB_DLL for Windows DLL support */
  151. #if defined(ZLIB_DLL)
  152. # if defined(_WINDOWS) || defined(WINDOWS) || defined(WIN32)
  153. # ifndef WINAPI
  154. # ifdef FAR
  155. # undef FAR
  156. # endif
  157. # include <windows.h>
  158. # endif
  159. # ifdef WIN32
  160. # define ZEXPORT WINAPI
  161. # define ZEXPORTVA WINAPIV
  162. # else
  163. # define ZEXPORT WINAPI _export
  164. # define ZEXPORTVA FAR _cdecl _export
  165. # endif
  166. # endif
  167. # if defined (__BORLANDC__)
  168. # if (__BORLANDC__ >= 0x0500) && defined (WIN32)
  169. # include <windows.h>
  170. # define ZEXPORT __declspec(dllexport) WINAPI
  171. # define ZEXPORTVA __declspec(dllexport) WINAPIV
  172. # else
  173. # if defined (_Windows) && defined (__DLL__)
  174. # define ZEXPORT _export
  175. # define ZEXPORTVA _export
  176. # endif
  177. # endif
  178. # endif
  179. #endif
  180. #if defined (__BEOS__)
  181. # if defined (ZLIB_DLL)
  182. # define ZEXTERN extern __declspec(dllexport)
  183. # else
  184. # define ZEXTERN extern __declspec(dllimport)
  185. # endif
  186. #endif
  187. #ifndef ZEXPORT
  188. # define ZEXPORT
  189. #endif
  190. #ifndef ZEXPORTVA
  191. # define ZEXPORTVA
  192. #endif
  193. #ifndef ZEXTERN
  194. # define ZEXTERN extern
  195. #endif
  196. #ifndef FAR
  197. # define FAR
  198. #endif
  199. #if !defined(MACOS) && !defined(TARGET_OS_MAC)
  200. typedef unsigned char Byte; /* 8 bits */
  201. #endif
  202. typedef unsigned int uInt; /* 16 bits or more */
  203. typedef unsigned long uLong; /* 32 bits or more */
  204. #ifdef SMALL_MEDIUM
  205. /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
  206. # define Bytef Byte FAR
  207. #else
  208. typedef Byte FAR Bytef;
  209. #endif
  210. typedef char FAR charf;
  211. typedef int FAR intf;
  212. typedef uInt FAR uIntf;
  213. typedef uLong FAR uLongf;
  214. #ifdef STDC
  215. typedef void FAR *voidpf;
  216. typedef void *voidp;
  217. #else
  218. typedef Byte FAR *voidpf;
  219. typedef Byte *voidp;
  220. #endif
  221. #ifdef HAVE_UNISTD_H
  222. # include <sys/types.h> /* for off_t */
  223. # include <unistd.h> /* for SEEK_* and off_t */
  224. # ifdef VMS
  225. # include <unixio.h> /* for off_t */
  226. # endif
  227. # define z_off_t off_t
  228. #endif
  229. #ifndef SEEK_SET
  230. # define SEEK_SET 0 /* Seek from beginning of file. */
  231. # define SEEK_CUR 1 /* Seek from current position. */
  232. # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
  233. #endif
  234. #ifndef z_off_t
  235. # define z_off_t long
  236. #endif
  237. /* MVS linker does not support external names larger than 8 bytes */
  238. #if defined(__MVS__)
  239. # pragma map(deflateInit_,"DEIN")
  240. # pragma map(deflateInit2_,"DEIN2")
  241. # pragma map(deflateEnd,"DEEND")
  242. # pragma map(inflateInit_,"ININ")
  243. # pragma map(inflateInit2_,"ININ2")
  244. # pragma map(inflateEnd,"INEND")
  245. # pragma map(inflateSync,"INSY")
  246. # pragma map(inflateSetDictionary,"INSEDI")
  247. # pragma map(inflate_blocks,"INBL")
  248. # pragma map(inflate_blocks_new,"INBLNE")
  249. # pragma map(inflate_blocks_free,"INBLFR")
  250. # pragma map(inflate_blocks_reset,"INBLRE")
  251. # pragma map(inflate_codes_free,"INCOFR")
  252. # pragma map(inflate_codes,"INCO")
  253. # pragma map(inflate_fast,"INFA")
  254. # pragma map(inflate_flush,"INFLU")
  255. # pragma map(inflate_mask,"INMA")
  256. # pragma map(inflate_set_dictionary,"INSEDI2")
  257. # pragma map(inflate_copyright,"INCOPY")
  258. # pragma map(inflate_trees_bits,"INTRBI")
  259. # pragma map(inflate_trees_dynamic,"INTRDY")
  260. # pragma map(inflate_trees_fixed,"INTRFI")
  261. # pragma map(inflate_trees_free,"INTRFR")
  262. #endif
  263. #endif /* _ZCONF_H */