Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6617 | IgorA | 1 | ; zconf.inc -- configuration of the zlib compression library |
2 | ; Copyright (C) 1995-2013 Jean-loup Gailly. |
||
3 | ; For conditions of distribution and use, see copyright notice in zlib.inc |
||
4 | |||
5 | ; Compile with -DMAXSEG_64K if the alloc function cannot allocate more |
||
6 | ; than 64k bytes at a time (needed on systems with 16-bit int). |
||
7 | |||
8 | ;if MSDOS |
||
9 | ;# define UNALIGNED_OK |
||
10 | ;end if |
||
11 | |||
12 | ; Maximum value for memLevel in deflateInit2 |
||
13 | MAX_MEM_LEVEL equ 9 |
||
14 | |||
15 | ; Maximum value for windowBits in deflateInit2 and inflateInit2. |
||
16 | ; WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files |
||
17 | ; created by gzip. (Files created by minigzip can still be extracted by |
||
18 | ; gzip.) |
||
19 | |||
20 | MAX_WBITS equ 15 ;32K LZ77 window |
||
21 | |||
22 | ; The memory requirements for deflate are (in bytes): |
||
23 | ; (1 << (windowBits+2)) + (1 << (memLevel+9)) |
||
24 | ; that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) |
||
25 | ; plus a few kilobytes for small objects. For example, if you want to reduce |
||
26 | ; the default memory requirements from 256K to 128K, compile with |
||
27 | ; make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" |
||
28 | ; Of course this will generally degrade compression (there's no free lunch). |
||
29 | |||
30 | ; The memory requirements for inflate are (in bytes) 1 << windowBits |
||
31 | ; that is, 32K for windowBits=15 (default value) plus a few kilobytes |
||
32 | ; for small objects. |
||
33 | |||
34 | ; /* Type declarations */ |
||
35 | |||
36 | ;#ifndef OF /* function prototypes */ |
||
37 | ;# ifdef STDC |
||
38 | ;# define OF(args) args |
||
39 | ;# else |
||
40 | ;# define OF(args) () |
||
41 | ;# endif |
||
42 | ;end if |
||
43 | |||
44 | ;#ifndef Z_ARG /* function prototypes for stdarg */ |
||
45 | ;# if defined(STDC) || defined(Z_HAVE_STDARG_H) |
||
46 | ;# define Z_ARG(args) args |
||
47 | ;# else |
||
48 | ;# define Z_ARG(args) () |
||
49 | ;# endif |
||
50 | ;end if |
||
51 | |||
52 | ; The following definitions for FAR are needed only for MSDOS mixed |
||
53 | ; model programming (small or medium model with some far allocations). |
||
54 | ; This was tested only with MSC; for other MSDOS compilers you may have |
||
55 | ; to define NO_MEMCPY in zutil.h. If you don't need the mixed model, |
||
56 | ; just define FAR to be empty. |
||
57 | |||
58 | ;#if defined(WINDOWS) || defined(WIN32) |
||
59 | ; If building or using zlib as a DLL, define ZLIB_DLL. |
||
60 | ; This is not mandatory, but it offers a little performance increase. |
||
61 | |||
62 | ;# ifdef ZLIB_DLL |
||
63 | ;# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) |
||
64 | ;# ifdef ZLIB_INTERNAL |
||
65 | ;# define ZEXTERN extern __declspec(dllexport) |
||
66 | ;# else |
||
67 | ;# define ZEXTERN extern __declspec(dllimport) |
||
68 | ;# endif |
||
69 | ;# endif |
||
70 | ;# endif /* ZLIB_DLL */ |
||
71 | ; If building or using zlib with the WINAPI/WINAPIV calling convention, |
||
72 | ; define ZLIB_WINAPI. |
||
73 | ; Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. |
||
74 | |||
75 | ;#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) |
||
76 | ;# include |
||
77 | ;# if (UINT_MAX == 0xffffffffUL) |
||
78 | ;# define Z_U4 unsigned |
||
79 | ;# elif (ULONG_MAX == 0xffffffffUL) |
||
80 | ;# define Z_U4 unsigned long |
||
81 | ;# elif (USHRT_MAX == 0xffffffffUL) |
||
82 | ;# define Z_U4 unsigned short |
||
83 | ;# endif |
||
84 | ;end if |
||
85 | |||
86 | ;if Z_U4 |
||
87 | ; typedef Z_U4 z_crc_t; |
||
88 | ;else |
||
89 | ; typedef unsigned long z_crc_t; |
||
90 | ;end if |
||
91 | |||
92 | ;if HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ |
||
93 | ;# define Z_HAVE_UNISTD_H |
||
94 | ;end if |
||
95 | |||
96 | ;if HAVE_STDARG_H /* may be set to #if 1 by ./configure */ |
||
97 | ;# define Z_HAVE_STDARG_H |
||
98 | ;end if |
||
99 | |||
100 | ;if STDC |
||
101 | ;# ifndef Z_SOLO |
||
102 | ;# include |
||
103 | ;# endif |
||
104 | ;end if |
||
105 | |||
106 | ;#if defined(STDC) || defined(Z_HAVE_STDARG_H) |
||
107 | ;# ifndef Z_SOLO |
||
108 | ;# include |
||
109 | ;# endif |
||
110 | ;end if |
||
111 | |||
112 | ; a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and |
||
113 | ; "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even |
||
114 | ; though the former does not conform to the LFS document), but considering |
||
115 | ; both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as |
||
116 | ; equivalently requesting no 64-bit operations |
||
117 | |||
118 | ;#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 |
||
119 | ;# undef _LARGEFILE64_SOURCE |
||
120 | ;end if |
||
121 | |||
122 | ;#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) |
||
123 | ;# define Z_HAVE_UNISTD_H |
||
124 | ;end if |
||
125 | ;#ifndef Z_SOLO |
||
126 | ;# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) |
||
127 | ;# include |
||
128 | ;# ifdef VMS |
||
129 | ;# include |
||
130 | ;# endif |
||
131 | ;# ifndef z_off_t |
||
132 | ;# define z_off_t off_t |
||
133 | ;# endif |
||
134 | ;# endif |
||
135 | ;end if |
||
136 | |||
137 | ;#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 |
||
138 | ;# define Z_LFS64 |
||
139 | ;end if |
||
140 | |||
141 | ;#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) |
||
142 | ;# define Z_LARGE64 |
||
143 | ;end if |
||
144 | |||
145 | ;#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) |
||
146 | ;# define Z_WANT64 |
||
147 | ;end if |
||
148 | |||
149 | ;#if !defined(SEEK_SET) && !defined(Z_SOLO) |
||
150 | ;# define SEEK_SET 0 /* Seek from beginning of file. */ |
||
151 | ;# define SEEK_CUR 1 /* Seek from current position. */ |
||
152 | ;# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ |
||
153 | ;end if |
||
154 | |||
155 | ;# define z_off_t long |
||
156 | |||
157 | ;#if !defined(_WIN32) && defined(Z_LARGE64) |
||
158 | ;# define z_off64_t off64_t |
||
159 | ;else |
||
160 | ;# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) |
||
161 | ;# define z_off64_t __int64 |
||
162 | ;# else |
||
163 | ;# define z_off64_t z_off_t |
||
164 | ;# endif |
||
165 | ;end if><>><>><> |