暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

zconf.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /* zconf.h -- configuration of the zlib compression library
  2. * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
  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. * Even better than compiling with -DZ_PREFIX would be to use configure to set
  12. * this permanently in zconf.h using "./configure --zprefix".
  13. */
  14. #define Z_PREFIX 1
  15. #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
  16. # define Z_PREFIX_SET
  17. /* all linked symbols and init macros */
  18. # define _dist_code il2cpp_z__dist_code
  19. # define _length_code il2cpp_z__length_code
  20. # define _tr_align il2cpp_z__tr_align
  21. # define _tr_flush_bits il2cpp_z__tr_flush_bits
  22. # define _tr_flush_block il2cpp_z__tr_flush_block
  23. # define _tr_init il2cpp_z__tr_init
  24. # define _tr_stored_block il2cpp_z__tr_stored_block
  25. # define _tr_tally il2cpp_z__tr_tally
  26. # define adler32 il2cpp_z_adler32
  27. # define adler32_combine il2cpp_z_adler32_combine
  28. # define adler32_combine64 il2cpp_z_adler32_combine64
  29. # define adler32_z il2cpp_z_adler32_z
  30. # ifndef Z_SOLO
  31. # define compress il2cpp_z_compress
  32. # define compress2 il2cpp_z_compress2
  33. # define compressBound il2cpp_z_compressBound
  34. # endif
  35. # define crc32 il2cpp_z_crc32
  36. # define crc32_combine il2cpp_z_crc32_combine
  37. # define crc32_combine64 il2cpp_z_crc32_combine64
  38. # define crc32_combine_gen il2cpp_z_crc32_combine_gen
  39. # define crc32_combine_gen64 il2cpp_z_crc32_combine_gen64
  40. # define crc32_combine_op il2cpp_z_crc32_combine_op
  41. # define crc32_z il2cpp_z_crc32_z
  42. # define deflate il2cpp_z_deflate
  43. # define deflateBound il2cpp_z_deflateBound
  44. # define deflateCopy il2cpp_z_deflateCopy
  45. # define deflateEnd il2cpp_z_deflateEnd
  46. # define deflateGetDictionary il2cpp_z_deflateGetDictionary
  47. # define deflateInit il2cpp_z_deflateInit
  48. # define deflateInit2 il2cpp_z_deflateInit2
  49. # define deflateInit2_ il2cpp_z_deflateInit2_
  50. # define deflateInit_ il2cpp_z_deflateInit_
  51. # define deflateParams il2cpp_z_deflateParams
  52. # define deflatePending il2cpp_z_deflatePending
  53. # define deflatePrime il2cpp_z_deflatePrime
  54. # define deflateReset il2cpp_z_deflateReset
  55. # define deflateResetKeep il2cpp_z_deflateResetKeep
  56. # define deflateSetDictionary il2cpp_z_deflateSetDictionary
  57. # define deflateSetHeader il2cpp_z_deflateSetHeader
  58. # define deflateTune il2cpp_z_deflateTune
  59. # define deflate_copyright il2cpp_z_deflate_copyright
  60. # define get_crc_table il2cpp_z_get_crc_table
  61. # ifndef Z_SOLO
  62. # define gz_error il2cpp_z_gz_error
  63. # define gz_intmax il2cpp_z_gz_intmax
  64. # define gz_strwinerror il2cpp_z_gz_strwinerror
  65. # define gzbuffer il2cpp_z_gzbuffer
  66. # define gzclearerr il2cpp_z_gzclearerr
  67. # define gzclose il2cpp_z_gzclose
  68. # define gzclose_r il2cpp_z_gzclose_r
  69. # define gzclose_w il2cpp_z_gzclose_w
  70. # define gzdirect il2cpp_z_gzdirect
  71. # define gzdopen il2cpp_z_gzdopen
  72. # define gzeof il2cpp_z_gzeof
  73. # define gzerror il2cpp_z_gzerror
  74. # define gzflush il2cpp_z_gzflush
  75. # define gzfread il2cpp_z_gzfread
  76. # define gzfwrite il2cpp_z_gzfwrite
  77. # define gzgetc il2cpp_z_gzgetc
  78. # define gzgetc_ il2cpp_z_gzgetc_
  79. # define gzgets il2cpp_z_gzgets
  80. # define gzoffset il2cpp_z_gzoffset
  81. # define gzoffset64 il2cpp_z_gzoffset64
  82. # define gzopen il2cpp_z_gzopen
  83. # define gzopen64 il2cpp_z_gzopen64
  84. # ifdef _WIN32
  85. # define gzopen_w il2cpp_z_gzopen_w
  86. # endif
  87. # define gzprintf il2cpp_z_gzprintf
  88. # define gzputc il2cpp_z_gzputc
  89. # define gzputs il2cpp_z_gzputs
  90. # define gzread il2cpp_z_gzread
  91. # define gzrewind il2cpp_z_gzrewind
  92. # define gzseek il2cpp_z_gzseek
  93. # define gzseek64 il2cpp_z_gzseek64
  94. # define gzsetparams il2cpp_z_gzsetparams
  95. # define gztell il2cpp_z_gztell
  96. # define gztell64 il2cpp_z_gztell64
  97. # define gzungetc il2cpp_z_gzungetc
  98. # define gzvprintf il2cpp_z_gzvprintf
  99. # define gzwrite il2cpp_z_gzwrite
  100. # endif
  101. # define inflate il2cpp_z_inflate
  102. # define inflateBack il2cpp_z_inflateBack
  103. # define inflateBackEnd il2cpp_z_inflateBackEnd
  104. # define inflateBackInit il2cpp_z_inflateBackInit
  105. # define inflateBackInit_ il2cpp_z_inflateBackInit_
  106. # define inflateCodesUsed il2cpp_z_inflateCodesUsed
  107. # define inflateCopy il2cpp_z_inflateCopy
  108. # define inflateEnd il2cpp_z_inflateEnd
  109. # define inflateGetDictionary il2cpp_z_inflateGetDictionary
  110. # define inflateGetHeader il2cpp_z_inflateGetHeader
  111. # define inflateInit il2cpp_z_inflateInit
  112. # define inflateInit2 il2cpp_z_inflateInit2
  113. # define inflateInit2_ il2cpp_z_inflateInit2_
  114. # define inflateInit_ il2cpp_z_inflateInit_
  115. # define inflateMark il2cpp_z_inflateMark
  116. # define inflatePrime il2cpp_z_inflatePrime
  117. # define inflateReset il2cpp_z_inflateReset
  118. # define inflateReset2 il2cpp_z_inflateReset2
  119. # define inflateResetKeep il2cpp_z_inflateResetKeep
  120. # define inflateSetDictionary il2cpp_z_inflateSetDictionary
  121. # define inflateSync il2cpp_z_inflateSync
  122. # define inflateSyncPoint il2cpp_z_inflateSyncPoint
  123. # define inflateUndermine il2cpp_z_inflateUndermine
  124. # define inflateValidate il2cpp_z_inflateValidate
  125. # define inflate_copyright il2cpp_z_inflate_copyright
  126. # define inflate_fast il2cpp_z_inflate_fast
  127. # define inflate_table il2cpp_z_inflate_table
  128. # ifndef Z_SOLO
  129. # define uncompress il2cpp_z_uncompress
  130. # define uncompress2 il2cpp_z_uncompress2
  131. # endif
  132. # define zError il2cpp_z_zError
  133. # ifndef Z_SOLO
  134. # define zcalloc il2cpp_z_zcalloc
  135. # define zcfree il2cpp_z_zcfree
  136. # endif
  137. # define zlibCompileFlags il2cpp_z_zlibCompileFlags
  138. # define zlibVersion il2cpp_z_zlibVersion
  139. /* all zlib typedefs in zlib.h and zconf.h */
  140. # define Byte il2cpp_z_Byte
  141. # define Bytef il2cpp_z_Bytef
  142. # define alloc_func il2cpp_z_alloc_func
  143. # define charf il2cpp_z_charf
  144. # define free_func il2cpp_z_free_func
  145. # ifndef Z_SOLO
  146. # define gzFile il2cpp_z_gzFile
  147. # endif
  148. # define gz_header il2cpp_z_gz_header
  149. # define gz_headerp il2cpp_z_gz_headerp
  150. # define in_func il2cpp_z_in_func
  151. # define intf il2cpp_z_intf
  152. # define out_func il2cpp_z_out_func
  153. # define uInt il2cpp_z_uInt
  154. # define uIntf il2cpp_z_uIntf
  155. # define uLong il2cpp_z_uLong
  156. # define uLongf il2cpp_z_uLongf
  157. # define voidp il2cpp_z_voidp
  158. # define voidpc il2cpp_z_voidpc
  159. # define voidpf il2cpp_z_voidpf
  160. /* all zlib structs in zlib.h and zconf.h */
  161. # define gz_header_s il2cpp_z_gz_header_s
  162. # define internal_state il2cpp_z_internal_state
  163. #endif
  164. #if defined(__MSDOS__) && !defined(MSDOS)
  165. # define MSDOS
  166. #endif
  167. #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
  168. # define OS2
  169. #endif
  170. #if defined(_WINDOWS) && !defined(WINDOWS)
  171. # define WINDOWS
  172. #endif
  173. #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
  174. # ifndef WIN32
  175. # define WIN32
  176. # endif
  177. #endif
  178. #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
  179. # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
  180. # ifndef SYS16BIT
  181. # define SYS16BIT
  182. # endif
  183. # endif
  184. #endif
  185. #if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
  186. #define HAVE_UNISTD_H
  187. #endif
  188. /*
  189. * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
  190. * than 64k bytes at a time (needed on systems with 16-bit int).
  191. */
  192. #ifdef SYS16BIT
  193. # define MAXSEG_64K
  194. #endif
  195. #ifdef MSDOS
  196. # define UNALIGNED_OK
  197. #endif
  198. #ifdef __STDC_VERSION__
  199. # ifndef STDC
  200. # define STDC
  201. # endif
  202. # if __STDC_VERSION__ >= 199901L
  203. # ifndef STDC99
  204. # define STDC99
  205. # endif
  206. # endif
  207. #endif
  208. #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
  209. # define STDC
  210. #endif
  211. #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
  212. # define STDC
  213. #endif
  214. #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
  215. # define STDC
  216. #endif
  217. #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
  218. # define STDC
  219. #endif
  220. #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
  221. # define STDC
  222. #endif
  223. #ifndef STDC
  224. # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
  225. # define const /* note: need a more gentle solution here */
  226. # endif
  227. #endif
  228. #if defined(ZLIB_CONST) && !defined(z_const)
  229. # define z_const const
  230. #else
  231. # define z_const
  232. #endif
  233. #ifdef Z_SOLO
  234. # ifdef _WIN64
  235. typedef unsigned long long z_size_t;
  236. # else
  237. typedef unsigned long z_size_t;
  238. # endif
  239. #else
  240. # define z_longlong long long
  241. # if defined(NO_SIZE_T)
  242. typedef unsigned NO_SIZE_T z_size_t;
  243. # elif defined(STDC)
  244. # include <stddef.h>
  245. typedef size_t z_size_t;
  246. # else
  247. typedef unsigned long z_size_t;
  248. # endif
  249. # undef z_longlong
  250. #endif
  251. /* Maximum value for memLevel in deflateInit2 */
  252. #ifndef MAX_MEM_LEVEL
  253. # ifdef MAXSEG_64K
  254. # define MAX_MEM_LEVEL 8
  255. # else
  256. # define MAX_MEM_LEVEL 9
  257. # endif
  258. #endif
  259. /* Maximum value for windowBits in deflateInit2 and inflateInit2.
  260. * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  261. * created by gzip. (Files created by minigzip can still be extracted by
  262. * gzip.)
  263. */
  264. #ifndef MAX_WBITS
  265. # define MAX_WBITS 15 /* 32K LZ77 window */
  266. #endif
  267. /* The memory requirements for deflate are (in bytes):
  268. (1 << (windowBits+2)) + (1 << (memLevel+9))
  269. that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
  270. plus a few kilobytes for small objects. For example, if you want to reduce
  271. the default memory requirements from 256K to 128K, compile with
  272. make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  273. Of course this will generally degrade compression (there's no free lunch).
  274. The memory requirements for inflate are (in bytes) 1 << windowBits
  275. that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
  276. for small objects.
  277. */
  278. /* Type declarations */
  279. #ifndef OF /* function prototypes */
  280. # ifdef STDC
  281. # define OF(args) args
  282. # else
  283. # define OF(args) ()
  284. # endif
  285. #endif
  286. /* The following definitions for FAR are needed only for MSDOS mixed
  287. * model programming (small or medium model with some far allocations).
  288. * This was tested only with MSC; for other MSDOS compilers you may have
  289. * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
  290. * just define FAR to be empty.
  291. */
  292. #ifdef SYS16BIT
  293. # if defined(M_I86SM) || defined(M_I86MM)
  294. /* MSC small or medium model */
  295. # define SMALL_MEDIUM
  296. # ifdef _MSC_VER
  297. # define FAR _far
  298. # else
  299. # define FAR far
  300. # endif
  301. # endif
  302. # if (defined(__SMALL__) || defined(__MEDIUM__))
  303. /* Turbo C small or medium model */
  304. # define SMALL_MEDIUM
  305. # ifdef __BORLANDC__
  306. # define FAR _far
  307. # else
  308. # define FAR far
  309. # endif
  310. # endif
  311. #endif
  312. #if defined(WINDOWS) || defined(WIN32)
  313. /* If building or using zlib as a DLL, define ZLIB_DLL.
  314. * This is not mandatory, but it offers a little performance increase.
  315. */
  316. # ifdef ZLIB_DLL
  317. # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
  318. # ifdef ZLIB_INTERNAL
  319. # define ZEXTERN extern __declspec(dllexport)
  320. # else
  321. # define ZEXTERN extern __declspec(dllimport)
  322. # endif
  323. # endif
  324. # endif /* ZLIB_DLL */
  325. /* If building or using zlib with the WINAPI/WINAPIV calling convention,
  326. * define ZLIB_WINAPI.
  327. * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
  328. */
  329. # ifdef ZLIB_WINAPI
  330. # ifdef FAR
  331. # undef FAR
  332. # endif
  333. # ifndef WIN32_LEAN_AND_MEAN
  334. # define WIN32_LEAN_AND_MEAN
  335. # endif
  336. # include <windows.h>
  337. /* No need for _export, use ZLIB.DEF instead. */
  338. /* For complete Windows compatibility, use WINAPI, not __stdcall. */
  339. # define ZEXPORT WINAPI
  340. # ifdef WIN32
  341. # define ZEXPORTVA WINAPIV
  342. # else
  343. # define ZEXPORTVA FAR CDECL
  344. # endif
  345. # endif
  346. #endif
  347. #if defined (__BEOS__)
  348. # ifdef ZLIB_DLL
  349. # ifdef ZLIB_INTERNAL
  350. # define ZEXPORT __declspec(dllexport)
  351. # define ZEXPORTVA __declspec(dllexport)
  352. # else
  353. # define ZEXPORT __declspec(dllimport)
  354. # define ZEXPORTVA __declspec(dllimport)
  355. # endif
  356. # endif
  357. #endif
  358. #ifndef ZEXTERN
  359. # define ZEXTERN extern
  360. #endif
  361. #ifndef ZEXPORT
  362. # define ZEXPORT
  363. #endif
  364. #ifndef ZEXPORTVA
  365. # define ZEXPORTVA
  366. #endif
  367. #ifndef FAR
  368. # define FAR
  369. #endif
  370. #if !defined(__MACTYPES__)
  371. typedef unsigned char Byte; /* 8 bits */
  372. #endif
  373. typedef unsigned int uInt; /* 16 bits or more */
  374. typedef unsigned long uLong; /* 32 bits or more */
  375. #ifdef SMALL_MEDIUM
  376. /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
  377. # define Bytef Byte FAR
  378. #else
  379. typedef Byte FAR Bytef;
  380. #endif
  381. typedef char FAR charf;
  382. typedef int FAR intf;
  383. typedef uInt FAR uIntf;
  384. typedef uLong FAR uLongf;
  385. #ifdef STDC
  386. typedef void const *voidpc;
  387. typedef void FAR *voidpf;
  388. typedef void *voidp;
  389. #else
  390. typedef Byte const *voidpc;
  391. typedef Byte FAR *voidpf;
  392. typedef Byte *voidp;
  393. #endif
  394. #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
  395. # include <limits.h>
  396. # if (UINT_MAX == 0xffffffffUL)
  397. # define Z_U4 unsigned
  398. # elif (ULONG_MAX == 0xffffffffUL)
  399. # define Z_U4 unsigned long
  400. # elif (USHRT_MAX == 0xffffffffUL)
  401. # define Z_U4 unsigned short
  402. # endif
  403. #endif
  404. #ifdef Z_U4
  405. typedef Z_U4 z_crc_t;
  406. #else
  407. typedef unsigned long z_crc_t;
  408. #endif
  409. #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
  410. # define Z_HAVE_UNISTD_H
  411. #endif
  412. #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
  413. # define Z_HAVE_STDARG_H
  414. #endif
  415. #ifdef STDC
  416. # ifndef Z_SOLO
  417. # include <sys/types.h> /* for off_t */
  418. # endif
  419. #endif
  420. #if defined(STDC) || defined(Z_HAVE_STDARG_H)
  421. # ifndef Z_SOLO
  422. # include <stdarg.h> /* for va_list */
  423. # endif
  424. #endif
  425. #ifdef _WIN32
  426. # ifndef Z_SOLO
  427. # include <stddef.h> /* for wchar_t */
  428. # endif
  429. #endif
  430. /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
  431. * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
  432. * though the former does not conform to the LFS document), but considering
  433. * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
  434. * equivalently requesting no 64-bit operations
  435. */
  436. #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
  437. # undef _LARGEFILE64_SOURCE
  438. #endif
  439. #ifndef Z_HAVE_UNISTD_H
  440. # ifdef __WATCOMC__
  441. # define Z_HAVE_UNISTD_H
  442. # endif
  443. #endif
  444. #ifndef Z_HAVE_UNISTD_H
  445. # if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
  446. # define Z_HAVE_UNISTD_H
  447. # endif
  448. #endif
  449. #ifndef Z_SOLO
  450. # if defined(Z_HAVE_UNISTD_H)
  451. # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
  452. # ifdef VMS
  453. # include <unixio.h> /* for off_t */
  454. # endif
  455. # ifndef z_off_t
  456. # define z_off_t off_t
  457. # endif
  458. # endif
  459. #endif
  460. #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
  461. # define Z_LFS64
  462. #endif
  463. #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
  464. # define Z_LARGE64
  465. #endif
  466. #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
  467. # define Z_WANT64
  468. #endif
  469. #if !defined(SEEK_SET) && !defined(Z_SOLO)
  470. # define SEEK_SET 0 /* Seek from beginning of file. */
  471. # define SEEK_CUR 1 /* Seek from current position. */
  472. # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
  473. #endif
  474. #ifndef z_off_t
  475. # define z_off_t long
  476. #endif
  477. #if !defined(_WIN32) && defined(Z_LARGE64)
  478. # define z_off64_t off64_t
  479. #else
  480. # if defined(_WIN32) && !defined(__GNUC__)
  481. # define z_off64_t __int64
  482. # else
  483. # define z_off64_t z_off_t
  484. # endif
  485. #endif
  486. /* MVS linker does not support external names larger than 8 bytes */
  487. #if defined(__MVS__)
  488. #pragma map(deflateInit_,"DEIN")
  489. #pragma map(deflateInit2_,"DEIN2")
  490. #pragma map(deflateEnd,"DEEND")
  491. #pragma map(deflateBound,"DEBND")
  492. #pragma map(inflateInit_,"ININ")
  493. #pragma map(inflateInit2_,"ININ2")
  494. #pragma map(inflateEnd,"INEND")
  495. #pragma map(inflateSync,"INSY")
  496. #pragma map(inflateSetDictionary,"INSEDI")
  497. #pragma map(compressBound,"CMBND")
  498. #pragma map(inflate_table,"INTABL")
  499. #pragma map(inflate_fast,"INFA")
  500. #pragma map(inflate_copyright,"INCOPY")
  501. #endif
  502. #endif /* ZCONF_H */